Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
This GEM provides some generators to simplify managing and creating Under Construction or coming soon page.
features:
In Rails 3, simply add the GEM to your gemfile:
gem 'under_construction'
Then run the config
generator. This will edit your application_controller
to
redirect all the URLs to under construction page (make a config file before, see config
section)
rails g under_construction:config
For removing configs you have to use clear
generator (After launch time automatically will be run):
rails g under_construction:clear
Note: the clear generator won't work if you edit the codes generated by config
,
you need to manually remove them later.
Note: After launch time clear generator will be run.
Put your configs in config/under_construction.yml file and edit it as you wish. Depending on the theme using, not all options may be used:
theme: 'site-under-construction'
launch_time: "24 Feb 2050 7:00pm"
time_zone: "UTC" # Used in scheduler. For opetions, see http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
progress: "60" # Percent
progress_label: "Progress"
website_address: "http://example.com"
host_name: "localhost:3000"
info:
site_title: "My Website"
logo_url: "/assets/under_construction/site-under-construction/logo.png"
email: "support@example.com"
phone: "phone : 555-123456"
heading: "This website is under construction"
counter_heading: "Estimated Time Remaining Before Launch:"
about_title: "Some words about us"
about_content: |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Phasellus hendrerit. Pellentesque aliquet nibh nec urna. I
n nisi neque, aliquet vel, dapibus id, mattis vel, nisi.
inform_by_email: "Type your email id to get the updates!"
email_field_value: "Enter Your E-mail"
copyright: "Copyright ©"
site_developer:
name: "Great Developer"
socials_title: "You may find us below:"
socials:
twitter: "#" #Full URL: http://twitter.com/great_developer
facebook: "#"
yahoo: "#"
# stumbleupon: "#"
flickr: "#"
#google: "#"
youtube: "#"
skype: "#"
deviantart: "#"
identica: "#"
notify_mail:
sender_email_address: "do_not_reply@example.com"
email_subject: "My Website just launched!"
email_content: |
Hi! Our site, "Example", has just launched!
Click the flowing link to view the website: http://example.com
Note: you need to restart the rails server for scheduler to be able to initialize after configuration.
There are two themes for under construction but you can design another one and send it for us or you can modify theme in your views/under_construction/theme.
Currently two themes are:
Every theme has its own asset. First make two directive files in your assets app:
/assets/javascripts/under_construction.js
/assets/stylesheets/under_construction.css
In stylesheet, you have to include under_construction/theme like below:
/*
*= require under_construction/site-under-construction
*/
In javascript, you have to include under_construction/theme like below:
//= require under_construction/site-under-construction
//= require jquery_ujs
Make a file in config/initializers
named assets.rb
and put following code inside it or Rails 4 may:
Rails.application.config.assets.precompile += %w( under_construction.js under_construction.css )
Rails 3 Note: If you want your under construction works on production mode you must adds under_construction.js and under_construction.css in your production env in config.assets.precompile like below:
config.assets.precompile += %w( under_construction.js under_construction.css )
config/initializers/assets.rb
file or Rails will throw an errorclear
task instantly if the date provided is past. Because of Rails 4 spring
feature that keeps Rails loaded, when testing, the clear
task may run repeatedly. So please make sure you stop spring
everytime you change the time in under_construction.yml
.This gem is using standard Rails I18n translation for the error message generated and name of models.
en:
email_storage:
form:
submit: "SUBMIT"
controllers:
under_construction_email_storage:
create:
flash:
success: "Your email added successfully."
activemodel:
errors:
models:
under_construction_email_storage:
attributes:
email:
format: "format is invalid"
uniqueness: "is registered before"
models:
under_construction_email_storage: "Under Construction Email Storage"
attributes:
under_construction_email_storage:
email: "Email"
Email of those who have submited their email in the under construction page will be saved in a simple text file under db/under_construction_mails.txt
. There's a rake task that automatically reads the file and sends notification mails:
rake under_construction:send_mails
Note: After launch time, it will be run by scheduler.
This project is a gem for under construction page in rails. Copyright (C) 2012 Naqsh Jahan Toos Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
FAQs
Unknown package
We found that under_construction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.