rails_apps_composer 1.0.26 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.textile CHANGED
@@ -10,12 +10,10 @@ The Rails Apps Composer gem is a fork of "Michael Bleigh's RailsWizard gem":http
10
10
 
11
11
  Any issues? Please create a "GitHub issue":http://github.com/RailsApps/rails_apps_composer/issues.
12
12
 
13
- h2. !http://twitter-badges.s3.amazonaws.com/t_logo-a.png(Follow on Twitter)!:http://www.twitter.com/rails_apps Follow on Twitter !http://railsapps.github.com/images/mailing-list-icon.jpg(Join the Mailing List)!:http://eepurl.com/dQx3o Join the Mailing List
13
+ h2. !http://twitter-badges.s3.amazonaws.com/t_logo-a.png(Follow on Twitter)!:http://www.twitter.com/rails_apps Follow on Twitter
14
14
 
15
15
  Follow the project on Twitter: "@rails_apps":http://twitter.com/rails_apps. Tweet some praise if you like what you've found.
16
16
 
17
- <a href="http://eepurl.com/dQx3o">Join the email list</a> (low volume, announcements only) for project updates and my tips about Rails resources.
18
-
19
17
  h2. Suggested Use
20
18
 
21
19
  Any developer can quickly generate a Rails web application using the @rails new@ command. In practice, experienced Rails developers typically add an assortment of useful additional packages (gems) before beginning development of any web application. A developer often uses the same set of packages to get started and may create a "starter app" that can be copied and reused for any new project.
@@ -31,11 +29,9 @@ h2. Dependencies
31
29
  Before generating a new Rails app, you will need:
32
30
 
33
31
  * The Ruby language (version 1.9.3)
34
- * Rails 3.1
35
-
36
- Recipes will detect which version of Rails is in use. Some of the recipes behave differently depending on the version of Rails.
32
+ * Rails 3.1 or newer
37
33
 
38
- See "Managing Rails Versions and Gems":http://railsapps.github.com/managing-rails-versions-gems.html for detailed instructions and advice.
34
+ See "Installing Rails 3.2":http://railsapps.github.com/installing-rails.html for detailed instructions and advice.
39
35
 
40
36
  h2. Installation
41
37
 
@@ -67,16 +63,16 @@ h2. Make Your Own Starter App for One-Time Use
67
63
 
68
64
  h4. Select Recipes
69
65
 
70
- You can mix and match recipes to create your own customized starter app. See an annotated list of available "recipes for the Rails Apps Composer gem":http://railsapps.github.com/rails-apps-recipes.html. For an up-to-date list, browse the repository "recipes directory":https://github.com/RailsApps/rails_apps_composer/tree/master/recipes to see what is available. Then provide your list of recipes to the Rails Apps Composer gem using the @-r@ option and generate an app as needed. Here's an example that creates a simple app using jquery and haml:
66
+ You can mix and match recipes to create your own customized starter app. See an annotated list of available "recipes for the Rails Apps Composer gem":http://railsapps.github.com/rails-apps-recipes.html. For an up-to-date list, browse the repository "recipes directory":https://github.com/RailsApps/rails_apps_composer/tree/master/recipes to see what is available. Then provide your list of recipes to the Rails Apps Composer gem using the @-r@ option and generate an app as needed. Here's an example that creates a simple app using haml:
71
67
 
72
68
  <pre>
73
- $ rails_apps_composer new myapp -r jquery haml
69
+ $ rails_apps_composer new myapp -r haml
74
70
  </pre>
75
71
 
76
72
  For example, to build the "rails3-mongoid-devise":http://github.com/RailsApps/rails3-mongoid-devise/ example application, run the command:
77
73
 
78
74
  <pre>
79
- $ rails_apps_composer new myapp -r jquery haml rspec cucumber guard mongoid action_mailer devise add_user home_page home_page_users seed_database users_page css_setup application_layout html5 navigation cleanup ban_spiders extras git
75
+ $ rails_apps_composer new myapp -r haml rspec cucumber guard mongoid action_mailer devise add_user home_page home_page_users seed_database users_page css_setup application_layout html5 navigation cleanup ban_spiders extras git
80
76
  </pre>
81
77
 
82
78
  Replace @myapp@ with the name you want for your application.
@@ -115,7 +111,7 @@ The Rails Apps Composer gem creates an application template that can be used by
115
111
  $ rails new myapp -m ~/Desktop/template.txt
116
112
  </pre>
117
113
 
118
- You can specify the @-T -O@ flags as needed to skip Test::Unit files and Active Record files. For Rails 3.0, you can also specify the @-J@ flag to skip Prototype files (not needed for Rails 3.1).
114
+ You can specify the @-T -O@ flags as needed to skip Test::Unit files and Active Record files.
119
115
 
120
116
  That's all it takes. You'll have a ready-to-customize Rails web application in minutes.
121
117
 
@@ -124,7 +120,7 @@ h4. Template for Rails 3 + Devise + RSpec + Cucumber
124
120
  To build a reusable application template for the "rails3-devise-rspec-cucumber":http://github.com/RailsApps/rails3-devise-rspec-cucumber/ example application, run the command:
125
121
 
126
122
  <pre>
127
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,guard,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,html5,navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
123
+ $ rake print --silent RECIPES=haml,rspec,cucumber,guard,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,html5,navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
128
124
  </pre>
129
125
 
130
126
  Then generate the application using the @-T@ flag.
@@ -138,7 +134,7 @@ h4. Template for Rails 3 + Mongoid + Devise
138
134
  To build a reusable application template for the "rails3-mongoid-devise":http://github.com/RailsApps/rails3-mongoid-devise/ example application, run the command:
139
135
 
140
136
  <pre>
141
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,guard,mongoid,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,html5,navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
137
+ $ rake print --silent RECIPES=haml,rspec,cucumber,guard,mongoid,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,html5,navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
142
138
  </pre>
143
139
 
144
140
  Then generate the application using the @-T -O@ flags.
@@ -152,7 +148,7 @@ h4. Template for Rails 3 + Mongoid + OmniAuth
152
148
  To build a reusable application template for the "rails3-mongoid-omniauth":http://github.com/RailsApps/rails3-mongoid-omniauth/ example application, run the command:
153
149
 
154
150
  <pre>
155
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,guard,mongoid,seed_database,add_user,omniauth,home_page,home_page_users,css_setup,application_layout,html5,navigation,users_page,omniauth_email,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
151
+ $ rake print --silent RECIPES=haml,rspec,cucumber,guard,mongoid,seed_database,add_user,omniauth,home_page,home_page_users,css_setup,application_layout,html5,navigation,users_page,omniauth_email,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
156
152
  </pre>
157
153
 
158
154
  Then generate the application using the @-T -O@ flags.
@@ -166,7 +162,7 @@ h4. Template for Rails 3 + Subdomains
166
162
  To build a reusable application template for the "rails3-subdomains":https://github.com/RailsApps/rails3-subdomains example application, run the command:
167
163
 
168
164
  <pre>
169
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,guard,mongoid,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,subdomains,html5,navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
165
+ $ rake print --silent RECIPES=haml,rspec,cucumber,guard,mongoid,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,subdomains,html5,navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
170
166
  </pre>
171
167
 
172
168
  Then generate the application using the @-T -O@ flags.
@@ -209,10 +205,10 @@ h4. Rails Apps Composer Differences
209
205
  The Rails Apps Composer gem is very similar to the rails_wizard gem, with one significant difference. The rails_wizard gem allows specification of execution order for recipes with @run_after@ and @run_after@ configuration flags. The Rails Apps Composer gem does not support @run_after@ or @run_after@; instead, the order which you provide the recipes sets the execution order. This makes it easier to chain a series of recipes in the order you prefer. For example,
210
206
 
211
207
  <pre>
212
- $ rails_apps_composer new myapp -r git jquery haml
208
+ $ rails_apps_composer new myapp -r git haml
213
209
  </pre>
214
210
 
215
- installs jquery before haml.
211
+ installs git before haml.
216
212
 
217
213
  h4. Recipe Differences
218
214
 
@@ -3,11 +3,6 @@ if config['database']
3
3
  old_gem = gem_for_database
4
4
  @options = @options.dup.merge(:database => config['database'])
5
5
  gsub_file 'Gemfile', "gem '#{old_gem}'", "gem '#{gem_for_database}'"
6
- if config['database'] == 'mysql'
7
- if recipes.include? 'rails 3.0'
8
- gsub_file 'Gemfile', "gem 'mysql2'", "gem 'mysql2', '<= 0.3.0'"
9
- end
10
- end
11
6
  template "config/databases/#{@options[:database]}.yml", "config/database.yml.new"
12
7
  run 'mv config/database.yml.new config/database.yml'
13
8
  end
@@ -20,21 +20,16 @@ after_bundler do
20
20
  = csrf_meta_tags
21
21
  %body
22
22
  - flash.each do |name, msg|
23
- = content_tag :div, msg, :id => "flash_\#{name}" if msg.is_a?(String)
23
+ = content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)
24
24
  = yield
25
25
  HAML
26
26
  end
27
- if recipes.include? 'rails 3.0'
28
- gsub_file 'app/views/layouts/application.html.haml', /stylesheet_link_tag :application/, 'stylesheet_link_tag :all'
29
- gsub_file 'app/views/layouts/application.html.haml', /javascript_include_tag :application/, 'javascript_include_tag :defaults'
30
- gsub_file 'app/views/layouts/application.html.haml', /csrf_meta_tags/, 'csrf_meta_tag'
31
- end
32
27
  else
33
28
  unless recipes.include? 'html5'
34
29
  inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
35
30
  <<-ERB
36
31
  <%- flash.each do |name, msg| -%>
37
- <%= content_tag :div, msg, :id => "flash_\#{name}" if msg.is_a?(String) %>
32
+ <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
38
33
  <%- end -%>
39
34
  ERB
40
35
  end
data/recipes/backbone.rb CHANGED
@@ -1,15 +1,7 @@
1
1
  if config['backbone']
2
- # rails-backbone is preferred, but only support rails 3.1
3
- if recipes.include? 'rails 3.1'
4
- gem 'rails-backbone', :version => '~> 0.5.3'
5
- after_bundler do
6
- generate 'backbone:install'
7
- end
8
- else
9
- gem 'backbone-rails', :version => '~> 0.5.2'
10
- after_bundler do
11
- generate 'backbone:install'
12
- end
2
+ gem 'rails-backbone', :version => '~> 0.6.1'
3
+ after_bundler do
4
+ generate 'backbone:install'
13
5
  end
14
6
  else
15
7
  recipes.delete('backbone')
data/recipes/cleanup.rb CHANGED
@@ -10,18 +10,9 @@ after_bundler do
10
10
  README
11
11
  doc/README_FOR_APP
12
12
  public/index.html
13
+ app/assets/images/rails.png
13
14
  }.each { |file| remove_file file }
14
-
15
- if recipes.include? 'rails 3.0'
16
- %w{
17
- public/images/rails.png
18
- }.each { |file| remove_file file }
19
- else
20
- %w{
21
- app/assets/images/rails.png
22
- }.each { |file| remove_file file }
23
- end
24
-
15
+
25
16
  # add placeholder READMEs
26
17
  get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/sample_readme.txt", "README"
27
18
  get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/sample_readme.textile", "README.textile"
data/recipes/compass.rb CHANGED
@@ -1,27 +1,18 @@
1
1
  if config['compass']
2
- if recipes.include? 'rails 3.1'
3
- gem 'compass', :version => '~> 0.12.alpha.0'
4
-
5
- after_bundler do
6
- remove_file 'app/assets/stylesheets/application.css'
7
- create_file 'app/assets/stylesheets/application.css.sass' do <<-SASS
2
+ gem 'compass', :version => '~> 0.12.alpha.4'
3
+ after_bundler do
4
+ remove_file 'app/assets/stylesheets/application.css'
5
+ create_file 'app/assets/stylesheets/application.css.sass' do <<-SASS
8
6
  //= require_self
9
- //= require_tree .
7
+ //= require_tree .
10
8
 
11
9
  @import compass
12
10
  @import _blueprint
13
11
  SASS
14
- end
15
- end
16
- else
17
- gem 'compass', :version => '~> 0.11'
18
-
19
- after_bundler do
20
- run 'compass init rails'
21
12
  end
22
13
  end
23
14
  else
24
- receipes.delete('compass')
15
+ recipes.delete('compass')
25
16
  end
26
17
 
27
18
  __END__
data/recipes/css_setup.rb CHANGED
@@ -57,16 +57,15 @@ header nav ul li {
57
57
 
58
58
  CSS
59
59
 
60
- if recipes.include? 'rails 3.0'
61
- create_file 'public/stylesheets/application.css', css
60
+ # rename the application stylesheet to use SCSS
61
+ copy_file 'app/assets/stylesheets/application.css', 'app/assets/stylesheets/application.css.scss'
62
+ remove_file 'app/assets/stylesheets/application.css'
63
+ if recipes.include? 'html5'
64
+ append_file 'app/assets/stylesheets/application.css.scss', css_html5
62
65
  else
63
- if recipes.include? 'html5'
64
- append_file 'app/assets/stylesheets/application.css', css_html5
65
- else
66
- append_file 'app/assets/stylesheets/application.css', css
67
- end
66
+ append_file 'app/assets/stylesheets/application.css.scss', css
68
67
  end
69
-
68
+
70
69
  end
71
70
 
72
71
  __END__
data/recipes/cucumber.rb CHANGED
@@ -2,19 +2,10 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/cucumber.rb
3
3
 
4
4
  if config['cucumber']
5
- if recipes.include? 'rails 3.0'
6
- # for Rails 3.0, use only gem versions we know that work
7
- gem 'cucumber-rails', '0.5.1', :group => :test
8
- gem 'capybara', '1.0.0', :group => :test
9
- gem 'database_cleaner', '0.6.7', :group => :test
10
- gem 'launchy', '0.4.0', :group => :test
11
- else
12
- # for Rails 3.1+, use optimistic versioning for gems
13
- gem 'cucumber-rails', '>= 1.2.0', :group => :test
14
- gem 'capybara', '>= 1.1.2', :group => :test
15
- gem 'database_cleaner', '>= 0.7.0', :group => :test
16
- gem 'launchy', '>= 2.0.5', :group => :test
17
- end
5
+ gem 'cucumber-rails', '>= 1.2.1', :group => :test
6
+ gem 'capybara', '>= 1.1.2', :group => :test
7
+ gem 'database_cleaner', '>= 0.7.1', :group => :test
8
+ gem 'launchy', '>= 2.0.5', :group => :test
18
9
  else
19
10
  recipes.delete('cucumber')
20
11
  end
data/recipes/devise.rb CHANGED
@@ -2,18 +2,11 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/devise.rb
3
3
 
4
4
  if config['devise']
5
- if recipes.include? 'rails 3.0'
6
- # for Rails 3.0, use only gem versions we know that work
7
- gem 'devise', '1.3.4'
8
- else
9
- # for Rails 3.1+, use optimistic versioning for gems
10
- gem 'devise', '>= 1.5.0'
11
- end
5
+ gem 'devise', '>= 2.0.0'
12
6
  else
13
7
  recipes.delete('devise')
14
8
  end
15
9
 
16
-
17
10
  if config['devise']
18
11
  after_bundler do
19
12
 
data/recipes/guard.rb CHANGED
@@ -1,7 +1,15 @@
1
1
  if config['guard']
2
2
  gem 'guard', '>= 0.6.2', :group => :development
3
-
3
+
4
+ prepend_file 'Gemfile' do <<-RUBY
5
+ require 'rbconfig'
6
+ HOST_OS = RbConfig::CONFIG['host_os']
7
+
8
+ RUBY
9
+ end
10
+
4
11
  append_file 'Gemfile' do <<-RUBY
12
+ # need newline here!
5
13
  case HOST_OS
6
14
  when /darwin/i
7
15
  gem 'rb-fsevent', :group => :development
@@ -24,29 +32,29 @@ end
24
32
  def guard(name, version = nil)
25
33
  args = []
26
34
  if version
27
- args << version
35
+ args << version
28
36
  end
29
37
  args << { :group => :development }
30
38
  gem "guard-#{name}", *args
31
39
  guards << name
32
40
  end
33
41
 
34
- guard 'bundler', '>= 0.1.3'
42
+ guard 'bundler', '>= 0.1.3'
35
43
 
36
- unless recipes.include? 'pow'
37
- guard 'rails', '>= 0.0.3'
44
+ unless recipes.include? 'pow'
45
+ guard 'rails', '>= 0.0.3'
38
46
  end
39
47
 
40
48
  if config['livereload']
41
49
  guard 'livereload', '>= 0.3.0'
42
50
  end
43
51
 
44
- if recipes.include? 'rspec'
45
- guard 'rspec', '>= 0.4.3'
52
+ if recipes.include? 'rspec'
53
+ guard 'rspec', '>= 0.4.3'
46
54
  end
47
55
 
48
- if recipes.include? 'cucumber'
49
- guard 'cucumber', '>= 0.6.1'
56
+ if recipes.include? 'cucumber'
57
+ guard 'cucumber', '>= 0.6.1'
50
58
  end
51
59
 
52
60
  after_bundler do
@@ -57,7 +65,7 @@ end
57
65
  end
58
66
 
59
67
  else
60
- recipes.delete 'guard'
68
+ recipes.delete 'guard'
61
69
  end
62
70
 
63
71
  __END__
data/recipes/haml.rb CHANGED
@@ -2,15 +2,8 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/haml.rb
3
3
 
4
4
  if config['haml']
5
- if recipes.include? 'rails 3.0'
6
- # for Rails 3.0, use only gem versions we know that work
7
- gem 'haml', '3.1.1'
8
- gem 'haml-rails', '0.3.4', :group => :development
9
- else
10
- # for Rails 3.1+, use optimistic versioning for gems
11
- gem 'haml', '>= 3.1.2'
12
- gem 'haml-rails', '>= 0.3.4', :group => :development
13
- end
5
+ gem 'haml', '>= 3.1.4'
6
+ gem 'haml-rails', '>= 0.3.4', :group => :development
14
7
  else
15
8
  recipes.delete('haml')
16
9
  end
data/recipes/heroku.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  heroku_name = app_name.gsub('_','')
2
2
 
3
+ gem 'heroku', group: :development
4
+
3
5
  after_everything do
4
6
  if config['create']
5
- say_wizard "Creating Heroku app '#{heroku_name}.heroku.com'"
7
+ say_wizard "Creating Heroku app '#{heroku_name}.heroku.com'"
8
+ # system "heroku apps:destroy --app #{heroku_name} --confirm #{heroku_name}"
9
+
6
10
  while !system("heroku create #{heroku_name}")
7
11
  heroku_name = ask_wizard("What do you want to call your app? ")
8
12
  end
@@ -54,5 +58,5 @@ config:
54
58
  if: create
55
59
  - deploy:
56
60
  prompt: "Deploy immediately?"
57
- type: boolean
61
+ type: boolean
58
62
  if: create
data/recipes/html5.rb CHANGED
@@ -1,68 +1,62 @@
1
1
  # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/html5.rb
3
3
 
4
- if recipes.include? 'rails 3.1'
4
+ case config['css_option']
5
+ when 'foundation'
6
+ # https://github.com/zurb/foundation-rails
7
+ gem 'zurb-foundation'
8
+ when 'bootstrap'
9
+ # https://github.com/thomas-mcdonald/bootstrap-sass
10
+ # http://rubysource.com/twitter-bootstrap-less-and-sass-understanding-your-options-for-rails-3-1/
11
+ gem 'bootstrap-sass'
12
+ end
13
+ after_bundler do
14
+ say_wizard "HTML5 recipe running 'after bundler'"
15
+ # add a humans.txt file
16
+ get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/humans.txt", "public/humans.txt"
17
+ # install a front-end framework for HTML5 and CSS3
5
18
  case config['css_option']
19
+ when 'nothing'
20
+ say_wizard "no HTML5 front-end framework selected"
6
21
  when 'foundation'
7
- # https://github.com/zurb/foundation-rails
8
- gem 'zurb-foundation'
22
+ say_wizard "installing Zurb Foundation HTML5 framework"
23
+ insert_into_file "app/assets/javascripts/application.js", "//= require foundation\n", :after => "jquery_ujs\n"
24
+ insert_into_file "app/assets/stylesheets/application.css.scss", " *= require foundation\n", :after => "require_self\n"
9
25
  when 'bootstrap'
10
- # https://github.com/seyhunak/twitter-bootstrap-rails
11
- gem 'twitter-bootstrap-rails'
26
+ say_wizard "installing Twitter Bootstrap HTML5 framework"
27
+ insert_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n", :after => "jquery_ujs\n"
28
+ insert_into_file "app/assets/stylesheets/application.css.scss", " *= require bootstrap\n", :after => "require_self\n"
29
+ when 'skeleton'
30
+ say_wizard "installing Skeleton HTML5 framework"
31
+ get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
32
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css", "app/assets/stylesheets/base.css.scss"
33
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css", "app/assets/stylesheets/layout.css.scss"
34
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css", "app/assets/stylesheets/skeleton.css.scss"
35
+ get "https://raw.github.com/dhgamache/Skeleton/master/javascripts/tabs.js", "app/assets/javascripts/tabs.js"
36
+ when 'normalize'
37
+ say_wizard "normalizing CSS for consistent styling"
38
+ get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
12
39
  end
13
- after_bundler do
14
- say_wizard "HTML5 recipe running 'after bundler'"
15
- # add a humans.txt file
16
- get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/humans.txt", "public/humans.txt"
17
- # install a front-end framework for HTML5 and CSS3
18
- case config['css_option']
19
- when 'nothing'
20
- say_wizard "no HTML5 front-end framework selected"
21
- when 'foundation'
22
- say_wizard "installing Zurb Foundation HTML5 framework"
23
- insert_into_file "app/assets/javascripts/application.js", "//= require foundation\n", :after => "jquery_ujs\n"
24
- insert_into_file "app/assets/stylesheets/application.css", " *= require foundation\n", :after => "require_self\n"
25
- when 'bootstrap'
26
- say_wizard "installing Twitter Bootstrap HTML5 framework"
27
- insert_into_file "app/assets/javascripts/application.js", "//= require twitter/bootstrap\n", :after => "jquery_ujs\n"
28
- insert_into_file "app/assets/stylesheets/application.css", " *= require twitter/bootstrap\n", :after => "require_self\n"
29
- when 'skeleton'
30
- say_wizard "installing Skeleton HTML5 framework"
31
- get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
32
- get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css", "app/assets/stylesheets/base.css.scss"
33
- get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css", "app/assets/stylesheets/layout.css.scss"
34
- get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css", "app/assets/stylesheets/skeleton.css.scss"
35
- get "https://raw.github.com/dhgamache/Skeleton/master/javascripts/tabs.js", "app/assets/javascripts/tabs.js"
36
- when 'normalize'
37
- say_wizard "normalizing CSS for consistent styling"
38
- get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
39
- end
40
- # Set up the default application layout
41
- if recipes.include? 'haml'
42
- # Haml version of default application layout
43
- remove_file 'app/views/layouts/application.html.erb'
44
- remove_file 'app/views/layouts/application.html.haml'
45
- get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layouts/application.html.haml", "app/views/layouts/application.html.haml"
46
- gsub_file "app/views/layouts/application.html.haml", /App_Name/, "#{app_name.humanize.titleize}"
47
- else
48
- # ERB version of default application layout
49
- remove_file 'app/views/layouts/application.html.erb'
50
- remove_file 'app/views/layouts/application.html.haml'
51
- get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
52
- gsub_file "app/views/layouts/application.html.erb", /App_Name/, "#{app_name.humanize.titleize}"
53
- end
40
+ # Set up the default application layout
41
+ if recipes.include? 'haml'
42
+ # Haml version of default application layout
43
+ remove_file 'app/views/layouts/application.html.erb'
44
+ remove_file 'app/views/layouts/application.html.haml'
45
+ get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layouts/application.html.haml", "app/views/layouts/application.html.haml"
46
+ gsub_file "app/views/layouts/application.html.haml", /App_Name/, "#{app_name.humanize.titleize}"
47
+ else
48
+ # ERB version of default application layout
49
+ remove_file 'app/views/layouts/application.html.erb'
50
+ remove_file 'app/views/layouts/application.html.haml'
51
+ get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
52
+ gsub_file "app/views/layouts/application.html.erb", /App_Name/, "#{app_name.humanize.titleize}"
54
53
  end
55
- elsif recipes.include? 'rails 3.0'
56
- say_wizard "Not supported for Rails version #{Rails::VERSION::STRING}. HTML5 recipe skipped."
57
- else
58
- say_wizard "Don't know what to do for Rails version #{Rails::VERSION::STRING}. HTML5 recipe skipped."
59
54
  end
60
55
 
61
-
62
56
  __END__
63
57
 
64
58
  name: html5
65
- description: "Install a front-end framework for HTML5 and CSS3."
59
+ description: "Install a front-end framework for HTML5 and CSS."
66
60
  author: RailsApps
67
61
 
68
62
  category: other
@@ -71,6 +65,6 @@ tags: [utilities, configuration]
71
65
  config:
72
66
  - css_option:
73
67
  type: multiple_choice
74
- prompt: "Which front-end framework would you like for HTML5 and CSS3?"
68
+ prompt: "Which front-end framework would you like for HTML5 and CSS?"
75
69
  choices: [["None", nothing], ["Zurb Foundation", foundation], ["Twitter Bootstrap", bootstrap], ["Skeleton", skeleton], ["Just normalize CSS for consistent styling", normalize]]
76
70