template/suspenders.rb in suspenders-0.2.3 vs template/suspenders.rb in suspenders-0.2.4
- old
+ new
@@ -67,32 +67,26 @@
copy_file "_javascript.html.erb", "app/views/shared/_javascript.html.erb"
template "suspenders_layout.html.erb.erb",
"app/views/layouts/application.html.erb",
:force => true
+trout 'Gemfile'
+run "bundle install"
+
say "Let's use jQuery"
+generate "jquery:install", "--ui"
-%w(jquery jquery-ui).each do |file|
- trout "public/javascripts/#{file}.js"
-end
-
-download_file "https://github.com/rails/jquery-ujs/raw/master/src/rails.js",
- "public/javascripts/rails.js"
-
say "Pulling in some common javascripts"
trout "public/javascripts/prefilled_input.js"
say "Documentation"
copy_file "README_FOR_SUSPENDERS", "doc/README_FOR_SUSPENDERS"
say "Get ready for bundler... (this will take a while)"
-trout 'Gemfile'
-run "bundle install"
-
say "Let's use MySQL"
template "mysql_database.yml.erb", "config/database.yml", :force => true
rake "db:create"
@@ -130,21 +124,33 @@
rake "flutie:install"
say "Ignore the right files"
concat_file "suspenders_gitignore", ".gitignore"
-empty_directory_with_gitkeep "app/models"
-empty_directory_with_gitkeep "app/views/pages"
-empty_directory_with_gitkeep "db/migrate"
-empty_directory_with_gitkeep "log"
-empty_directory_with_gitkeep "public/images"
-empty_directory_with_gitkeep "spec/support"
+["app/models",
+ "app/views/pages",
+ "db/migrate",
+ "log",
+ "public/images",
+ "spec/support",
+ "spec/lib",
+ "spec/models",
+ "spec/views",
+ "spec/controllers",
+ "spec/helpers",
+ "spec/support/matchers",
+ "spec/support/helpers",
+ "spec/support/shared_examples"].each do |dir|
+ empty_directory_with_gitkeep dir
+end
+
say "Copying miscellaneous support files"
copy_file "errors.rb", "config/initializers/errors.rb"
copy_file "time_formats.rb", "config/initializers/time_formats.rb"
copy_file "body_class_helper.rb", "app/helpers/body_class_helper.rb"
+
say "Setting up a root route"
route "root :to => 'Clearance::Sessions#new'"