rails_apps_composer 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -12,7 +12,7 @@ Any issues? Please create a "GitHub issue":http://github.com/RailsApps/rails_app
12
12
 
13
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
14
14
 
15
- Follow the project on Twitter: "rails_apps":http://twitter.com/rails_apps. Tweet some praise if you like what you've found.
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
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
18
 
@@ -31,9 +31,9 @@ h2. Dependencies
31
31
  Before generating a new Rails app, you will need:
32
32
 
33
33
  * The Ruby language (version 1.9.2)
34
- * Rails
34
+ * Rails (3.0 or 3.1)
35
35
 
36
- Recipes can be written to detect which version of Rails is in use. Some of the recipes behave differently depending on the version of Rails.
36
+ Recipes will detect which version of Rails is in use. Some of the recipes behave differently depending on the version of Rails.
37
37
 
38
38
  See "Managing Rails Versions and Gems":http://railsapps.github.com/managing-rails-versions-gems.html for detailed instructions and advice.
39
39
 
@@ -67,7 +67,7 @@ h2. Make Your Own Starter App for One-Time Use
67
67
 
68
68
  h4. Select Recipes
69
69
 
70
- You can mix and match recipes to create your own customized starter app. 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:
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:
71
71
 
72
72
  <pre>
73
73
  $ rails_apps_composer new APP_NAME -r jquery haml
@@ -79,6 +79,8 @@ For example, to build the "rails3-mongoid-devise":http://github.com/RailsApps/ra
79
79
  $ rails_apps_composer new APP_NAME -r jquery haml rspec cucumber mongoid action_mailer devise add_user home_page home_page_users seed_database users_page css_setup application_layout devise_navigation cleanup ban_spiders git
80
80
  </pre>
81
81
 
82
+ Replace @APP_NAME@ with the name you want for your application.
83
+
82
84
  h2. Make Your Own Starter App with a Reusable Application Template
83
85
 
84
86
  You can modify the recipes and save an application template that creates your own customized starter app.
@@ -122,13 +124,13 @@ h4. Template for Rails 3 + Devise + RSpec + Cucumber
122
124
  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:
123
125
 
124
126
  <pre>
125
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,devise_navigation,cleanup,ban_spiders,git > ~/Desktop/template.txt
127
+ $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,html5,devise_navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
126
128
  </pre>
127
129
 
128
130
  Then generate the application using the @-T@ flag. Add the @-J@ flag for Rails 3.0.
129
131
 
130
132
  <pre>
131
- $ rails new testapp -m ~/Desktop/template.txt -T -J
133
+ $ rails new testapp -m ~/Desktop/template.txt -T
132
134
  </pre>
133
135
 
134
136
  h4. Template for Rails 3 + Mongoid + Devise
@@ -136,13 +138,13 @@ h4. Template for Rails 3 + Mongoid + Devise
136
138
  To build a reusable application template for the "rails3-mongoid-devise":http://github.com/RailsApps/rails3-mongoid-devise/ example application, run the command:
137
139
 
138
140
  <pre>
139
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,mongoid,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,devise_navigation,cleanup,ban_spiders,git > ~/Desktop/template.txt
141
+ $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,mongoid,action_mailer,devise,add_user,home_page,home_page_users,seed_database,users_page,css_setup,application_layout,html5,devise_navigation,cleanup,ban_spiders,extras,git > ~/Desktop/template.txt
140
142
  </pre>
141
143
 
142
144
  Then generate the application using the @-T -O@ flags. Add the @-J@ flag for Rails 3.0.
143
145
 
144
146
  <pre>
145
- $ rails new testapp -m ~/Desktop/template.txt -T -O -J
147
+ $ rails new testapp -m ~/Desktop/template.txt -T -O
146
148
  </pre>
147
149
 
148
150
  h4. Template for Rails 3 + Mongoid + OmniAuth
@@ -150,13 +152,13 @@ h4. Template for Rails 3 + Mongoid + OmniAuth
150
152
  To build a reusable application template for the "rails3-mongoid-omniauth":http://github.com/RailsApps/rails3-mongoid-omniauth/ example application, run the command:
151
153
 
152
154
  <pre>
153
- $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,mongoid,seed_database,add_user,omniauth,home_page,home_page_users,css_setup,application_layout,navigation,users_page,omniauth_email,cleanup,ban_spiders,git > ~/Desktop/template.txt
155
+ $ rake print --silent RECIPES=jquery,haml,rspec,cucumber,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
154
156
  </pre>
155
157
 
156
158
  Then generate the application using the @-T -O@ flags. Add the @-J@ flag for Rails 3.0.
157
159
 
158
160
  <pre>
159
- $ rails new testapp -m ~/Desktop/template.txt -T -O -J
161
+ $ rails new testapp -m ~/Desktop/template.txt -T -O
160
162
  </pre>
161
163
 
162
164
  h2. The Recipes
@@ -241,7 +243,7 @@ RSpec, Cucumber, and Yard recipes were contributed by "Ramon Brooker":http://cog
241
243
  Additional recipes by Daniel Kehoe, "http://danielkehoe.com/":http://danielkehoe.com/.
242
244
 
243
245
  Is the gem useful to you? Follow the project on Twitter:
244
- "rails_apps":http://twitter.com/rails_apps
246
+ "@rails_apps":http://twitter.com/rails_apps
245
247
  and tweet some praise. I'd love to know you were helped out by the gem.
246
248
 
247
249
  h2. License
@@ -30,7 +30,7 @@ HAML
30
30
  gsub_file 'app/views/layouts/application.html.haml', /csrf_meta_tags/, 'csrf_meta_tag'
31
31
  end
32
32
  else
33
- unless recipes.include? 'boilerplate'
33
+ unless recipes.include? 'html5'
34
34
  inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
35
35
  <<-ERB
36
36
  <%- flash.each do |name, msg| -%>
data/recipes/css_setup.rb CHANGED
@@ -60,7 +60,7 @@ CSS
60
60
  if recipes.include? 'rails 3.0'
61
61
  create_file 'public/stylesheets/application.css', css
62
62
  else
63
- if recipes.include? 'boilerplate'
63
+ if recipes.include? 'html5'
64
64
  append_file 'app/assets/stylesheets/application.css', css_boilerplate
65
65
  else
66
66
  append_file 'app/assets/stylesheets/application.css', css
data/recipes/cucumber.rb CHANGED
@@ -10,7 +10,7 @@ if config['cucumber']
10
10
  gem 'launchy', '0.4.0', :group => :test
11
11
  else
12
12
  # for Rails 3.1+, use optimistic versioning for gems
13
- gem 'cucumber-rails', '>= 1.0.0', :group => :test
13
+ gem 'cucumber-rails', '>= 1.0.2', :group => :test
14
14
  gem 'capybara', '>= 1.0.0', :group => :test
15
15
  gem 'database_cleaner', '>= 0.6.7', :group => :test
16
16
  gem 'launchy', '>= 0.4.0', :group => :test
data/recipes/devise.rb CHANGED
@@ -7,7 +7,7 @@ if config['devise']
7
7
  gem 'devise', '1.3.4'
8
8
  else
9
9
  # for Rails 3.1+, use optimistic versioning for gems
10
- gem 'devise', '>= 1.3.4'
10
+ gem 'devise', '>= 1.4.0'
11
11
  end
12
12
  else
13
13
  recipes.delete('devise')
@@ -61,7 +61,7 @@ ERB
61
61
  end
62
62
 
63
63
  # Add navigation links to the default application layout
64
- if recipes.include? 'boilerplate'
64
+ if recipes.include? 'html5'
65
65
  if recipes.include? 'haml'
66
66
  # There is Haml code in this script. Changing the indentation is perilous between HAMLs.
67
67
  inject_into_file 'app/views/layouts/application.html.haml', :after => "%header\n" do <<-HAML
data/recipes/html5.rb CHANGED
@@ -10,10 +10,16 @@ if config['html5']
10
10
  get "https://raw.github.com/paulirish/html5-boilerplate/master/js/libs/respond.min.js", "app/assets/javascripts/respond.js"
11
11
  # Download stylesheet to normalize or reset CSS
12
12
  case config['css_option']
13
+ when 'skeleton'
14
+ get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
15
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css", "app/assets/stylesheets/base.css.scss"
16
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css", "app/assets/stylesheets/layout.css.scss"
17
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css", "app/assets/stylesheets/skeleton.css.scss"
18
+ get "https://raw.github.com/dhgamache/Skeleton/master/javascripts/app.js", "app/assets/javascripts/tabs.js"
13
19
  when 'normalize'
14
- get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.scss"
20
+ get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
15
21
  when 'reset'
16
- get "https://raw.github.com/paulirish/html5-boilerplate/master/css/style.css", "app/assets/stylesheets/reset.scss"
22
+ get "https://raw.github.com/paulirish/html5-boilerplate/master/css/style.css", "app/assets/stylesheets/reset.css.scss"
17
23
  end
18
24
  # Download HTML5 Boilerplate Site Root Assets
19
25
  get "https://raw.github.com/paulirish/html5-boilerplate/master/apple-touch-icon-114x114-precomposed.png", "public/apple-touch-icon-114x114-precomposed.png"
@@ -69,11 +75,14 @@ RUBY
69
75
  - ie_html :lang => 'en', :class => 'no-js' do
70
76
  %head
71
77
  %title #{app_name}
78
+ %meta{:charset => "utf-8"}
79
+ %meta{:http-equiv => "X-UA-Compatible", :content => "IE=edge,chrome=1"}
80
+ %meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
72
81
  = stylesheet_link_tag :application
73
82
  = javascript_include_tag :application
74
83
  = csrf_meta_tags
75
84
  %body
76
- #container
85
+ #container.container
77
86
  %header
78
87
  - flash.each do |name, msg|
79
88
  = content_tag :div, msg, :id => "flash_\#{name}" if msg.is_a?(String)
@@ -104,7 +113,7 @@ HAML
104
113
  <%= csrf_meta_tags %>
105
114
  </head>
106
115
  <body>
107
- <div id="container">
116
+ <div id="container" class="container">
108
117
  <header>
109
118
  </header>
110
119
  <div id="main" role="main">
@@ -151,5 +160,5 @@ config:
151
160
  - css_option:
152
161
  type: multiple_choice
153
162
  prompt: "How do you like your CSS?"
154
- choices: [["Normalize CSS for consistent styling across browsers", normalize], ["Completely reset all CSS to eliminate styling", reset]]
163
+ choices: [["Normalize CSS and add Skeleton styling", skeleton], ["Normalize CSS for consistent styling across browsers", normalize], ["Completely reset all CSS to eliminate styling", reset]]
155
164
 
@@ -39,20 +39,39 @@ ERB
39
39
  end
40
40
 
41
41
  # Add navigation links to the default application layout
42
- if recipes.include? 'haml'
43
- # There is Haml code in this script. Changing the indentation is perilous between HAMLs.
44
- inject_into_file 'app/views/layouts/application.html.haml', :after => "%body\n" do <<-HAML
45
- %ul.hmenu
46
- = render 'shared/navigation'
42
+ if recipes.include? 'html5'
43
+ if recipes.include? 'haml'
44
+ # There is Haml code in this script. Changing the indentation is perilous between HAMLs.
45
+ inject_into_file 'app/views/layouts/application.html.haml', :after => "%header\n" do <<-HAML
46
+ %ul.hmenu
47
+ = render 'shared/navigation'
47
48
  HAML
49
+ end
50
+ else
51
+ inject_into_file 'app/views/layouts/application.html.erb', :after => "<header>\n" do
52
+ <<-ERB
53
+ <ul class="hmenu">
54
+ <%= render 'shared/navigation' %>
55
+ </ul>
56
+ ERB
57
+ end
48
58
  end
49
59
  else
50
- inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
60
+ if recipes.include? 'haml'
61
+ # There is Haml code in this script. Changing the indentation is perilous between HAMLs.
62
+ inject_into_file 'app/views/layouts/application.html.haml', :after => "%body\n" do <<-HAML
63
+ %ul.hmenu
64
+ = render 'shared/navigation'
65
+ HAML
66
+ end
67
+ else
68
+ inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
51
69
  <<-ERB
52
70
  <ul class="hmenu">
53
71
  <%= render 'shared/navigation' %>
54
72
  </ul>
55
73
  ERB
74
+ end
56
75
  end
57
76
  end
58
77
 
data/recipes/omniauth.rb CHANGED
@@ -46,21 +46,17 @@ RUBY
46
46
  inject_into_file 'app/models/user.rb', :before => 'end' do <<-RUBY
47
47
 
48
48
  def self.create_with_omniauth(auth)
49
- begin
50
- create! do |user|
51
- user.provider = auth['provider']
52
- user.uid = auth['uid']
53
- if auth['user_info']
54
- user.name = auth['user_info']['name'] if auth['user_info']['name'] # Twitter, Google, Yahoo, GitHub
55
- user.email = auth['user_info']['email'] if auth['user_info']['email'] # Google, Yahoo, GitHub
56
- end
57
- if auth['extra']['user_hash']
58
- user.name = auth['extra']['user_hash']['name'] if auth['extra']['user_hash']['name'] # Facebook
59
- user.email = auth['extra']['user_hash']['email'] if auth['extra']['user_hash']['email'] # Facebook
60
- end
49
+ create! do |user|
50
+ user.provider = auth['provider']
51
+ user.uid = auth['uid']
52
+ if auth['user_info']
53
+ user.name = auth['user_info']['name'] if auth['user_info']['name'] # Twitter, Google, Yahoo, GitHub
54
+ user.email = auth['user_info']['email'] if auth['user_info']['email'] # Google, Yahoo, GitHub
55
+ end
56
+ if auth['extra'] && auth['extra']['user_hash']
57
+ user.name = auth['extra']['user_hash']['name'] if auth['extra']['user_hash']['name'] # Facebook
58
+ user.email = auth['extra']['user_hash']['email'] if auth['extra']['user_hash']['email'] # Facebook
61
59
  end
62
- rescue Exception
63
- raise Exception, "cannot create user record"
64
60
  end
65
61
  end
66
62
 
data/recipes/rspec.rb CHANGED
@@ -28,7 +28,7 @@ if config['rspec']
28
28
  end
29
29
  if config['factory_girl']
30
30
  # use the factory_girl gem for test fixtures
31
- gem 'factory_girl_rails', '>= 1.1.beta1', :group => :test
31
+ gem 'factory_girl_rails', '>= 1.1.beta3', :group => :test
32
32
  end
33
33
  end
34
34
  else
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "1.0.10"
2
+ VERSION = "1.0.11"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.10
5
+ version: 1.0.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Kehoe
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-21 00:00:00 Z
13
+ date: 2011-06-29 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n
@@ -177,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
- hash: 1920492739263753196
180
+ hash: -2521305615818415648
181
181
  segments:
182
182
  - 0
183
183
  version: "0"
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - ">="
188
188
  - !ruby/object:Gem::Version
189
- hash: 1920492739263753196
189
+ hash: -2521305615818415648
190
190
  segments:
191
191
  - 0
192
192
  version: "0"