rails_apps_composer 1.1.6 → 1.1.7

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
@@ -72,7 +72,7 @@ $ rails_apps_composer new myapp -r haml
72
72
  For example, to build the "rails3-mongoid-devise":http://github.com/RailsApps/rails3-mongoid-devise/ example application, run the command:
73
73
 
74
74
  <pre>
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 html5 navigation cleanup 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 html5 navigation cleanup extras git
76
76
  </pre>
77
77
 
78
78
  Replace @myapp@ with the name you want for your application.
@@ -120,7 +120,7 @@ h4. Template for Rails 3 + Devise + RSpec + Cucumber
120
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:
121
121
 
122
122
  <pre>
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,html5,navigation,cleanup,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,html5,navigation,cleanup,extras,git > ~/Desktop/template.txt
124
124
  </pre>
125
125
 
126
126
  Then generate the application using the @-T@ flag.
@@ -134,7 +134,7 @@ h4. Template for Rails 3 + Mongoid + Devise
134
134
  To build a reusable application template for the "rails3-mongoid-devise":http://github.com/RailsApps/rails3-mongoid-devise/ example application, run the command:
135
135
 
136
136
  <pre>
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,html5,navigation,cleanup,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,html5,navigation,cleanup,extras,git > ~/Desktop/template.txt
138
138
  </pre>
139
139
 
140
140
  Then generate the application using the @-T -O@ flags.
@@ -148,7 +148,7 @@ h4. Template for Rails 3 + Mongoid + OmniAuth
148
148
  To build a reusable application template for the "rails3-mongoid-omniauth":http://github.com/RailsApps/rails3-mongoid-omniauth/ example application, run the command:
149
149
 
150
150
  <pre>
151
- $ rake print --silent RECIPES=haml,rspec,cucumber,guard,mongoid,seed_database,add_user,omniauth,home_page,home_page_users,css_setup,html5,navigation,users_page,omniauth_email,cleanup,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,html5,navigation,users_page,omniauth_email,cleanup,extras,git > ~/Desktop/template.txt
152
152
  </pre>
153
153
 
154
154
  Then generate the application using the @-T -O@ flags.
@@ -162,7 +162,7 @@ h4. Template for Rails 3 + Subdomains
162
162
  To build a reusable application template for the "rails3-subdomains":https://github.com/RailsApps/rails3-subdomains example application, run the command:
163
163
 
164
164
  <pre>
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,subdomains,html5,navigation,cleanup,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,subdomains,html5,navigation,cleanup,extras,git > ~/Desktop/template.txt
166
166
  </pre>
167
167
 
168
168
  Then generate the application using the @-T -O@ flags.
@@ -244,15 +244,21 @@ Any issues? Please create a "GitHub issue":http://github.com/RailsApps/rails_app
244
244
 
245
245
  h2. Credits
246
246
 
247
- This project is based on "Michael Bleigh's RailsWizard gem":https://github.com/intridea/rails_wizard. The original idea for a RailsWizard and the innovative implementation is the work of Michael Bleigh.
247
+ Daniel Kehoe maintains this gem as part of the "RailsApps Project":http://railsapps.github.com/.
248
+
249
+ This gem is based on "Michael Bleigh's RailsWizard gem":https://github.com/intridea/rails_wizard. The original idea for a RailsWizard and the innovative implementation is the work of Michael Bleigh.
248
250
 
249
251
  "Fletcher Nichol's":http://silversky.ca/ project "fnichol/rails-template-recipes":https://github.com/fnichol/rails-template-recipes provides the basis for several recipes.
250
252
 
251
- RSpec, Cucumber, and Yard recipes were contributed by "Ramon Brooker":http://cogniton-mind.tumblr.com/.
253
+ h4. Contributors
252
254
 
253
- Guard recipe contributed by "Ashley Woodard":https://github.com/ashley-woodard.
255
+ * 'inherited_resources' and 'simple_form' recipes contributed by gmgp
256
+ * Slim recipe contributed by "Claudio B.":https://github.com/claudiob
257
+ * MongoLab recipe contributed by "Leo Lou":https://github.com/l4u
258
+ * RSpec, Cucumber, and Yard recipes contributed by "Ramon Brooker":http://cogniton-mind.tumblr.com/.
259
+ * Compass, Backbone, and Guard recipes contributed by "Ashley Woodard":https://github.com/ashley-woodard.
254
260
 
255
- Additional recipes by Daniel Kehoe, "http://danielkehoe.com/":http://danielkehoe.com/.
261
+ h4. What You Can Do
256
262
 
257
263
  Is the gem useful to you? Follow the project on Twitter:
258
264
  "@rails_apps":http://twitter.com/rails_apps
data/recipes/cleanup.rb CHANGED
@@ -19,11 +19,15 @@ after_bundler do
19
19
  gsub_file "README", /App_Name/, "#{app_name.humanize.titleize}"
20
20
  gsub_file "README.textile", /App_Name/, "#{app_name.humanize.titleize}"
21
21
 
22
- # remove commented lines from Gemfile
22
+ # remove commented lines and multiple blank lines from Gemfile
23
23
  # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
24
- gsub_file "Gemfile", /#.*\n/, "\n"
25
- gsub_file "Gemfile", /\n+/, "\n"
24
+ gsub_file 'Gemfile', /#.*\n/, "\n"
25
+ gsub_file 'Gemfile', /\n^\s*\n/, "\n"
26
26
 
27
+ # remove commented lines and multiple blank lines from config/routes.rb
28
+ gsub_file 'config/routes.rb', / #.*\n/, "\n"
29
+ gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
30
+
27
31
  end
28
32
 
29
33
  __END__
data/recipes/home_page.rb CHANGED
@@ -33,6 +33,17 @@ ERB
33
33
  # set routes
34
34
  gsub_file 'config/routes.rb', /get \"home\/index\"/, 'root :to => "home#index"'
35
35
 
36
+ if recipes.include? 'devise'
37
+ inject_into_file 'config/routes.rb', :before => " root :to" do
38
+ <<-RUBY
39
+ authenticated :user do
40
+ root :to => 'home#index'
41
+ end
42
+ \n
43
+ RUBY
44
+ end
45
+ end
46
+
36
47
  end
37
48
 
38
49
  __END__
data/recipes/html5.rb CHANGED
@@ -2,30 +2,48 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/html5.rb
3
3
 
4
4
  case config['css_option']
5
+
5
6
  when 'foundation'
6
7
  # https://github.com/zurb/foundation-rails
7
8
  gem 'zurb-foundation'
8
- when 'bootstrap'
9
+
10
+ when 'bootstrap_less'
11
+ # https://github.com/seyhunak/twitter-bootstrap-rails
12
+ # http://railscasts.com/episodes/328-twitter-bootstrap-basics
13
+ gem 'twitter-bootstrap-rails', '~> 2.0.3', :group => :assets
14
+ recipes << 'bootstrap'
15
+
16
+ when 'bootstrap_sass'
9
17
  # https://github.com/thomas-mcdonald/bootstrap-sass
10
18
  # http://rubysource.com/twitter-bootstrap-less-and-sass-understanding-your-options-for-rails-3-1/
11
19
  gem 'bootstrap-sass', '~> 2.0.1'
20
+ recipes << 'bootstrap'
21
+
12
22
  end
13
23
  after_bundler do
14
24
  say_wizard "HTML5 recipe running 'after bundler'"
15
25
  # add a humans.txt file
16
26
  get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/humans.txt", "public/humans.txt"
17
27
  # install a front-end framework for HTML5 and CSS3
28
+ remove_file 'app/assets/stylesheets/application.css'
29
+ get 'https://raw.github.com/gist/1974706/f22d3bd5940e173707c6f7c3e5716eeb36882a08/application.css.scss', 'app/assets/stylesheets/application.css.scss'
18
30
  case config['css_option']
19
- when 'nothing'
20
- say_wizard "no HTML5 front-end framework selected"
31
+
32
+ when 'bootstrap_less'
33
+ say_wizard "installing Twitter Bootstrap HTML5 framework (less) "
34
+ generate 'bootstrap:install'
35
+ remove_file 'app/assets/stylesheets/application.css'
36
+
37
+ when 'bootstrap_sass'
38
+ say_wizard "installing Twitter Bootstrap HTML5 framework (sass) "
39
+ insert_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n", :after => "jquery_ujs\n"
40
+ create_file "app/assets/stylesheets/bootstrap_and_overrides.css.scss", "\n@import 'bootstrap';\n"
41
+
21
42
  when 'foundation'
22
43
  say_wizard "installing Zurb Foundation HTML5 framework"
23
44
  insert_into_file "app/assets/javascripts/application.js", "//= require foundation\n", :after => "jquery_ujs\n"
24
45
  insert_into_file "app/assets/stylesheets/application.css.scss", " *= 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 bootstrap\n", :after => "jquery_ujs\n"
28
- insert_into_file "app/assets/stylesheets/application.css.scss", "\n@import 'bootstrap';\n", :after => "*/\n"
46
+
29
47
  when 'skeleton'
30
48
  say_wizard "installing Skeleton HTML5 framework"
31
49
  get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
@@ -33,9 +51,14 @@ after_bundler do
33
51
  get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css", "app/assets/stylesheets/layout.css.scss"
34
52
  get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css", "app/assets/stylesheets/skeleton.css.scss"
35
53
  get "https://raw.github.com/dhgamache/Skeleton/master/javascripts/tabs.js", "app/assets/javascripts/tabs.js"
54
+
36
55
  when 'normalize'
37
56
  say_wizard "normalizing CSS for consistent styling"
38
57
  get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
58
+
59
+ when 'nothing'
60
+ say_wizard "no HTML5 front-end framework selected"
61
+
39
62
  end
40
63
  # Set up the default application layout
41
64
  if recipes.include? 'haml'
@@ -66,5 +89,4 @@ config:
66
89
  - css_option:
67
90
  type: multiple_choice
68
91
  prompt: "Which front-end framework would you like for HTML5 and CSS?"
69
- choices: [["None", nothing], ["Zurb Foundation", foundation], ["Twitter Bootstrap", bootstrap], ["Skeleton", skeleton], ["Just normalize CSS for consistent styling", normalize]]
70
-
92
+ choices: [["None", nothing], ["Zurb Foundation", foundation], ["Twitter Bootstrap (less)", bootstrap_less], ["Twitter Bootstrap (sass)", bootstrap_sass], ["Skeleton", skeleton], ["Just normalize CSS for consistent styling", normalize]]
@@ -0,0 +1,23 @@
1
+ # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
+ # https://github.com/gmgp/rails_apps_composer/blob/master/recipes/inherited_resources.rb
3
+
4
+ if config['inherited_resources']
5
+ gem 'inherited_resources'
6
+ else
7
+ recipes.delete('inherited_resources')
8
+ end
9
+
10
+
11
+ __END__
12
+
13
+ name: InheritedResources
14
+ description: "Include inherited_resources "
15
+ author: Gmgp
16
+
17
+ category: other
18
+ tags: [utilities, configuration]
19
+
20
+ config:
21
+ - inherited_resources:
22
+ type: boolean
23
+ prompt: Would you like to use 'inherited_resources'?
@@ -27,20 +27,25 @@ FILE
27
27
  end
28
28
 
29
29
  if recipes.include? 'devise'
30
- # create a default user
31
- append_file 'db/seeds.rb' do <<-FILE
30
+ if recipes.include? 'devise-confirmable'
31
+ append_file 'db/seeds.rb' do <<-FILE
32
+ puts 'SETTING UP DEFAULT USER LOGIN'
33
+ user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please', :confirmed_at => DateTime.now
34
+ puts 'New user created: ' << user.name
35
+ FILE
36
+ end
37
+ else
38
+ append_file 'db/seeds.rb' do <<-FILE
32
39
  puts 'SETTING UP DEFAULT USER LOGIN'
33
40
  user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please'
34
41
  puts 'New user created: ' << user.name
35
42
  FILE
36
- end
37
- if recipes.include? 'devise-confirmable'
38
- gsub_file 'db/seeds.rb', /:password_confirmation => 'please'/, ":password_confirmation => 'please', :confirmed_at => DateTime.now"
43
+ end
39
44
  end
40
45
  end
41
-
46
+
42
47
  run 'bundle exec rake db:seed'
43
-
48
+
44
49
  end
45
50
 
46
51
  __END__
@@ -0,0 +1,54 @@
1
+ # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
+ # https://github.com/gmgp/rails_apps_composer/blob/master/recipes/simple_form.rb
3
+
4
+ case config['form_option']
5
+ when 'no'
6
+ say_wizard "Form help recipe skipped."
7
+ when 'simple_form'
8
+ gem 'simple_form'
9
+ # for external test
10
+ recipes << 'simple_form'
11
+ when 'simple_form_bootstrap'
12
+ gem 'simple_form'
13
+ # for external test
14
+ recipes << 'simple_form'
15
+ recipes << 'simple_form_bootstrap'
16
+ else
17
+ say_wizard "Form help recipe skipped."
18
+ end
19
+
20
+
21
+
22
+ after_bundler do
23
+
24
+ say_wizard "Simple form recipe running 'after bundler'"
25
+
26
+ case config['form_option']
27
+ when 'simple_form'
28
+ generate 'simple_form:install'
29
+ when 'simple_form_bootstrap'
30
+ if recipes.include? 'bootstrap'
31
+ generate 'simple_form:install --bootstrap'
32
+ else
33
+ say_wizard "Bootstrap not found."
34
+ end
35
+ end
36
+ end
37
+
38
+
39
+ __END__
40
+
41
+ name: SimpleForm
42
+ description: "Check for 'simple_form'."
43
+ author: Gmgp
44
+
45
+ category: other
46
+ tags: [utilities, configuration]
47
+
48
+ before: [html5]
49
+
50
+ config:
51
+ - form_option:
52
+ type: multiple_choice
53
+ prompt: "Which form gem would you like?"
54
+ choices: [["None", no], ["simple form", simple_form], ["simple form (bootstrap)", simple_form_bootstrap]]
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-29 00:00:00.000000000 Z
12
+ date: 2012-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2153726080 !ruby/object:Gem::Requirement
16
+ requirement: &2153522160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153726080
24
+ version_requirements: *2153522160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2153725580 !ruby/object:Gem::Requirement
27
+ requirement: &2153521660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2153725580
35
+ version_requirements: *2153521660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thor
38
- requirement: &2153725140 !ruby/object:Gem::Requirement
38
+ requirement: &2153521220 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2153725140
46
+ version_requirements: *2153521220
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &2153718800 !ruby/object:Gem::Requirement
49
+ requirement: &2153514800 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2153718800
57
+ version_requirements: *2153514800
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &2153717820 !ruby/object:Gem::Requirement
60
+ requirement: &2153513940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 2.5.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2153717820
68
+ version_requirements: *2153513940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mg
71
- requirement: &2153717300 !ruby/object:Gem::Requirement
71
+ requirement: &2153513460 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2153717300
79
+ version_requirements: *2153513460
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: activesupport
82
- requirement: &2153716660 !ruby/object:Gem::Requirement
82
+ requirement: &2153512840 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 3.0.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2153716660
90
+ version_requirements: *2153512840
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: i18n
93
- requirement: &2153716220 !ruby/object:Gem::Requirement
93
+ requirement: &2153512400 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2153716220
101
+ version_requirements: *2153512400
102
102
  description: A gem with recipes to create Rails application templates you can use
103
103
  to generate Rails starter apps.
104
104
  email:
@@ -121,7 +121,6 @@ files:
121
121
  - recipes/capybara.rb
122
122
  - recipes/cleanup.rb
123
123
  - recipes/compass.rb
124
- - recipes/css_setup.rb
125
124
  - recipes/cucumber.rb
126
125
  - recipes/devise.rb
127
126
  - recipes/extras.rb
@@ -133,6 +132,7 @@ files:
133
132
  - recipes/home_page_users.rb
134
133
  - recipes/hoptoad.rb
135
134
  - recipes/html5.rb
135
+ - recipes/inherited_resources.rb
136
136
  - recipes/less.rb
137
137
  - recipes/mongohq.rb
138
138
  - recipes/mongoid.rb
@@ -145,6 +145,7 @@ files:
145
145
  - recipes/sass.rb
146
146
  - recipes/seed_database.rb
147
147
  - recipes/settingslogic.rb
148
+ - recipes/simple_form.rb
148
149
  - recipes/slim.rb
149
150
  - recipes/static_page.rb
150
151
  - recipes/subdomains.rb
@@ -177,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
178
  version: '0'
178
179
  segments:
179
180
  - 0
180
- hash: 4510411467452003519
181
+ hash: -4352216921287113977
181
182
  required_rubygems_version: !ruby/object:Gem::Requirement
182
183
  none: false
183
184
  requirements:
@@ -186,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
187
  version: '0'
187
188
  segments:
188
189
  - 0
189
- hash: 4510411467452003519
190
+ hash: -4352216921287113977
190
191
  requirements: []
191
192
  rubyforge_project: rails_apps_composer
192
193
  rubygems_version: 1.8.16
data/recipes/css_setup.rb DELETED
@@ -1,78 +0,0 @@
1
- # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
- # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/css_setup.rb
3
-
4
- after_bundler do
5
-
6
- say_wizard "CssSetup recipe running 'after bundler'"
7
-
8
- # Add a stylesheet with styles for a horizontal menu and flash messages
9
- css = <<-CSS
10
-
11
- ul.hmenu {
12
- list-style: none;
13
- margin: 0 0 2em;
14
- padding: 0;
15
- }
16
- ul.hmenu li {
17
- display: inline;
18
- }
19
- #flash_notice, #flash_alert {
20
- padding: 5px 8px;
21
- margin: 10px 0;
22
- }
23
- #flash_notice {
24
- background-color: #CFC;
25
- border: solid 1px #6C6;
26
- }
27
- #flash_alert {
28
- background-color: #FCC;
29
- border: solid 1px #C66;
30
- }
31
-
32
- CSS
33
-
34
- # Add a stylesheet for use with HTML5
35
- css_html5 = <<-CSS
36
-
37
- header nav ul {
38
- list-style: none;
39
- margin: 0 0 2em;
40
- padding: 0;
41
- }
42
- header nav ul li {
43
- display: inline;
44
- }
45
- #flash_notice, #flash_alert {
46
- padding: 5px 8px;
47
- margin: 10px 0;
48
- }
49
- #flash_notice {
50
- background-color: #CFC;
51
- border: solid 1px #6C6;
52
- }
53
- #flash_alert {
54
- background-color: #FCC;
55
- border: solid 1px #C66;
56
- }
57
-
58
- CSS
59
-
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
65
- else
66
- append_file 'app/assets/stylesheets/application.css.scss', css
67
- end
68
-
69
- end
70
-
71
- __END__
72
-
73
- name: CssSetup
74
- description: "Add a stylesheet with styles for a horizontal menu and flash messages."
75
- author: RailsApps
76
-
77
- category: other
78
- tags: [utilities, configuration]