rails_apps_composer 1.4.4 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -126,7 +126,7 @@ h4. Template for Rails 3 + Devise + RSpec + Cucumber
126
126
  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:
127
127
 
128
128
  <pre>
129
- $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard action_mailer devise add_user home_page home_page_users seed_database users_page html5 cleanup extras git
129
+ $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard action_mailer devise add_user home_page home_page_users seed_database users_page html5 simple_form cleanup extras git
130
130
  </pre>
131
131
 
132
132
  Then generate the application using the @-T@ flag.
@@ -140,7 +140,7 @@ h4. Template for Rails 3 + Mongoid + Devise
140
140
  To build a reusable application template for the "rails3-mongoid-devise":http://github.com/RailsApps/rails3-mongoid-devise/ example application, run the command:
141
141
 
142
142
  <pre>
143
- $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard mongoid action_mailer devise add_user home_page home_page_users seed_database users_page html5 cleanup extras git
143
+ $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard mongoid action_mailer devise add_user home_page home_page_users seed_database users_page html5 simple_form cleanup extras git
144
144
  </pre>
145
145
 
146
146
  Then generate the application using the @-T -O@ flags.
@@ -154,7 +154,7 @@ h4. Template for Rails 3 + Mongoid + OmniAuth
154
154
  To build a reusable application template for the "rails3-mongoid-omniauth":http://github.com/RailsApps/rails3-mongoid-omniauth/ example application, run the command:
155
155
 
156
156
  <pre>
157
- $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard mongoid seed_database omniauth home_page home_page_users html5 users_page omniauth_email cleanup extras git
157
+ $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard mongoid seed_database omniauth home_page home_page_users html5 simple_form users_page omniauth_email cleanup extras git
158
158
  </pre>
159
159
 
160
160
  Then generate the application using the @-T -O@ flags.
@@ -168,7 +168,7 @@ h4. Template for Rails 3 + Subdomains
168
168
  To build a reusable application template for the "rails3-subdomains":https://github.com/RailsApps/rails3-subdomains example application, run the command:
169
169
 
170
170
  <pre>
171
- $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard mongoid action_mailer devise add_user home_page home_page_users seed_database users_page subdomains html5 cleanup extras git
171
+ $ rails_apps_composer template ~/Desktop/template.txt -r haml rspec cucumber guard mongoid action_mailer devise add_user home_page home_page_users seed_database users_page subdomains html5 simple_form cleanup extras git
172
172
  </pre>
173
173
 
174
174
  Then generate the application using the @-T -O@ flags.
@@ -208,7 +208,7 @@ author: mbleigh
208
208
 
209
209
  h4. Rails Apps Composer Differences
210
210
 
211
- 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,
211
+ 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_before@ and @run_after@ configuration flags. The Rails Apps Composer gem supports only the @run_after@ flag; additionally, the order in 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,
212
212
 
213
213
  <pre>
214
214
  $ rails_apps_composer new myapp -r git haml
@@ -258,11 +258,18 @@ This gem is based on "Michael Bleigh's RailsWizard gem":https://github.com/intri
258
258
 
259
259
  h4. Contributors
260
260
 
261
+ Recipes:
262
+
263
+ * 'compass_960', 'redis' and 'resque' recipes contributed by Julián Porta
264
+ * 'datamapper' recipe contributed by Peter Fern
265
+ * 'active_admin' recipe contributed by Philippe Van Eerdenbrugghe
261
266
  * 'inherited_resources' and 'simple_form' recipes contributed by gmgp
262
267
  * Slim recipe contributed by "Claudio B.":https://github.com/claudiob
263
268
  * MongoLab recipe contributed by "Leo Lou":https://github.com/l4u
264
- * RSpec, Cucumber, and Yard recipes contributed by "Ramon Brooker":http://cogniton-mind.tumblr.com/.
265
- * Compass, Backbone, and Guard recipes contributed by "Ashley Woodard":https://github.com/ashley-woodard.
269
+ * RSpec, Cucumber, and Yard recipes contributed by "Ramon Brooker":http://cogniton-mind.tumblr.com/
270
+ * Compass, Backbone, and Guard recipes contributed by "Ashley Woodard":https://github.com/ashley-woodard
271
+
272
+ plus many patches and improvements contributed by many valued contributors (see CHANGELOG).
266
273
 
267
274
  h4. What You Can Do
268
275
 
data/recipes/add_user.rb CHANGED
@@ -58,6 +58,13 @@ RUBY
58
58
  gsub_file 'app/models/user.rb', /# field :unconfirmed_email/, "field :unconfirmed_email"
59
59
  end
60
60
  end
61
+
62
+ if recipes.include? 'canard'
63
+ say_wizard "modifying User class to add an admin role"
64
+ inject_into_file 'app/models/user.rb', :after => 'ActiveRecord::Base' do
65
+ "\n acts_as_user :roles => :admin\n"
66
+ end
67
+ end
61
68
 
62
69
  unless recipes.include? 'haml'
63
70
 
data/recipes/devise.rb CHANGED
@@ -20,6 +20,11 @@ case config['devise']
20
20
  say_wizard "Devise recipe skipped."
21
21
  end
22
22
 
23
+ if config['canard']
24
+ gem 'cancan', '>= 0.2.7'
25
+ recipes << 'canard'
26
+ end
27
+
23
28
  if recipes.include? 'devise'
24
29
  after_bundler do
25
30
 
@@ -76,7 +81,7 @@ if recipes.include? 'devise'
76
81
  remove_file 'spec/helpers/home_helper_spec.rb'
77
82
  remove_file 'spec/helpers/users_helper_spec.rb'
78
83
  end
79
-
84
+
80
85
  end
81
86
  end
82
87
 
@@ -94,3 +99,6 @@ config:
94
99
  type: multiple_choice
95
100
  prompt: Would you like to use Devise for authentication?
96
101
  choices: [["No", no], ["Devise with default modules", standard], ["Devise with Confirmable module", confirmable], ["Devise with Confirmable and Invitable modules", invitable]]
102
+ - canard:
103
+ type: boolean
104
+ prompt: Would you like to manage authorization with CanCan, RoleModel, and Canard?
@@ -39,6 +39,12 @@ FILE
39
39
  puts 'SETTING UP DEFAULT USER LOGIN'
40
40
  user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please'
41
41
  puts 'New user created: ' << user.name
42
+ FILE
43
+ end
44
+ end
45
+ if recipes.include? 'canard'
46
+ append_file 'db/seeds.rb' do <<-FILE
47
+ user.roles = [:admin]
42
48
  FILE
43
49
  end
44
50
  end
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "1.4.4"
2
+ VERSION = "1.4.5"
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.4.4
4
+ version: 1.4.5
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-04-08 00:00:00.000000000 Z
12
+ date: 2012-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2153367840 !ruby/object:Gem::Requirement
16
+ requirement: &2157713800 !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: *2153367840
24
+ version_requirements: *2157713800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2153367320 !ruby/object:Gem::Requirement
27
+ requirement: &2157713300 !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: *2153367320
35
+ version_requirements: *2157713300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thor
38
- requirement: &2153366900 !ruby/object:Gem::Requirement
38
+ requirement: &2157712800 !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: *2153366900
46
+ version_requirements: *2157712800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &2153366400 !ruby/object:Gem::Requirement
49
+ requirement: &2157712260 !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: *2153366400
57
+ version_requirements: *2157712260
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &2153365840 !ruby/object:Gem::Requirement
60
+ requirement: &2157711700 !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: *2153365840
68
+ version_requirements: *2157711700
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mg
71
- requirement: &2153365380 !ruby/object:Gem::Requirement
71
+ requirement: &2157711240 !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: *2153365380
79
+ version_requirements: *2157711240
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: activesupport
82
- requirement: &2153364820 !ruby/object:Gem::Requirement
82
+ requirement: &2157710700 !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: *2153364820
90
+ version_requirements: *2157710700
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: i18n
93
- requirement: &2153364400 !ruby/object:Gem::Requirement
93
+ requirement: &2157710280 !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: *2153364400
101
+ version_requirements: *2157710280
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:
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  segments:
184
184
  - 0
185
- hash: 717910648765548289
185
+ hash: 378750494196992519
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  none: false
188
188
  requirements:
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  segments:
193
193
  - 0
194
- hash: 717910648765548289
194
+ hash: 378750494196992519
195
195
  requirements: []
196
196
  rubyforge_project: rails_apps_composer
197
197
  rubygems_version: 1.8.16