cream 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +6 -3
- data/VERSION +1 -1
- data/cream.gemspec +2 -2
- data/lib/generators/cream/app/app_generator.rb +4 -4
- data/lib/generators/devise/users/routes_helper.rb +1 -1
- data/lib/generators/devise/users/users_generator.rb +9 -8
- data/lib/generators/permits/config/config_generator.rb +2 -1
- data/spec/generators/cream/app/app_generator_spec.rb +2 -2
- metadata +56 -56
data/README.textile
CHANGED
@@ -24,9 +24,12 @@ Cream comes with a suite of specialized generators that should let you configure
|
|
24
24
|
|
25
25
|
Note: Lately Cream also has options for some common customizations such as allowing login using either username or email.
|
26
26
|
|
27
|
-
h2. Status update (
|
27
|
+
h2. Status update (May 7, 2011)
|
28
28
|
|
29
|
-
|
29
|
+
*IMPORTANT*
|
30
|
+
|
31
|
+
The project has undergone a lot of bugfixes during 4-7 of May, thanks to @alecslupu who was patient enough to go through all the pain to find the bugs and assist me in fixing them. Thanks! Please use the latest master branches for cream, cancan-permits, roles_active_record, rails_assist and rails_artifactor. If you get problems from any other dependency gems, I recommend that you use their github master branch as the source.
|
32
|
+
I hope to release all gems ASAP when I know they all play nice ;)
|
30
33
|
|
31
34
|
h2. Objectives
|
32
35
|
|
@@ -47,7 +50,7 @@ h2. The magic behind the curtain...
|
|
47
50
|
Cream leverages an extensive "Tool suite":https://github.com/kristianmandrup/cream/wiki/Tool-suite-for-designing-powerful-generators-and-gems-for-Rails-3 I have created specifically to make it much easier/faster to create gems and generators for Rails 3 and spec/test them with RSpec 2, all using more natural DSLs and APIs.
|
48
51
|
If you look into the Cream code you can see extensive usage of this "magic" (especially in the generators).
|
49
52
|
|
50
|
-
Status (Jan 15): I'm currently in the process of refactoring and improving this underlying "tool suite". I might call it _rails-mixer_ or something
|
53
|
+
Status (Jan 15): I'm currently in the process of refactoring and improving this underlying "tool suite". I might call it _rails-mixer_ or something.
|
51
54
|
|
52
55
|
h2. Cream user group
|
53
56
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.1
|
data/cream.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{cream}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Kristian Mandrup}]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-07}
|
13
13
|
s.description = %q{An integrated Authentication, Authorization and Roles solution for your Rails 3 app with support for multiple ORMs}
|
14
14
|
s.email = %q{kmandrup@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -47,11 +47,11 @@ require "rails/test_unit/railtie"
|
|
47
47
|
|
48
48
|
def app_routes
|
49
49
|
routes = read_routes_file
|
50
|
-
# if no
|
50
|
+
# if no 'root' route
|
51
51
|
if !(routes =~ /root\s+:/)
|
52
|
-
# create
|
53
|
-
rgen "controller
|
54
|
-
File.insert_into routes_file, :after => 'do', :content => 'root :to => "
|
52
|
+
# create a MainController with an #index action.
|
53
|
+
rgen "controller Main index"
|
54
|
+
File.insert_into routes_file, :after => 'do', :content => 'root :to => "main#index"'
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -53,13 +53,14 @@ module Devise
|
|
53
53
|
|
54
54
|
registrations.each do |reg|
|
55
55
|
if user_type? reg
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
# create controller
|
57
|
+
controller = "#{reg}::Registrations".camelcase
|
58
|
+
rgen "controller #{controller} new"
|
59
|
+
rgen "view #{controller} new"
|
60
|
+
|
61
|
+
# make controller a devise controller
|
62
|
+
replace_controller_inheritance controller.underscore, 'Devise::RegistrationsController'
|
63
|
+
end
|
63
64
|
end
|
64
65
|
end
|
65
66
|
|
@@ -68,7 +69,7 @@ module Devise
|
|
68
69
|
extend RailsAssist::UseMacro
|
69
70
|
|
70
71
|
include Cream::GeneratorHelper
|
71
|
-
|
72
|
+
|
72
73
|
include DeviseUserGenerator::Helper
|
73
74
|
include DeviseUserGenerator::RoutesHelper
|
74
75
|
|
@@ -25,7 +25,8 @@ module Permits
|
|
25
25
|
permits_gems if gems?
|
26
26
|
|
27
27
|
# Run permits generator to generate permit for each role
|
28
|
-
rgen "cancan:permits
|
28
|
+
rgen "cancan:permits #{roles_list} --orm #{orm}"
|
29
|
+
# rgen "cancan:permits --roles #{roles_list} --orm #{orm}"
|
29
30
|
rgen "cancan:licenses"
|
30
31
|
end
|
31
32
|
|
@@ -36,8 +36,8 @@ describe 'Generator' do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
it "should generate
|
40
|
-
controller_file?(:
|
39
|
+
it "should generate MainController" do
|
40
|
+
controller_file?(:main).should be_true
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should add root to routes file" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
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: 2011-05-
|
12
|
+
date: 2011-05-07 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: devise-links
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156150280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.2.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156150280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: cancan-rest-links
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156149120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.2.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156149120
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: cancan-permits
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156148240 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.3.11
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156148240
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: require_all
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156147220 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.2.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156147220
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: devise
|
60
|
-
requirement: &
|
60
|
+
requirement: &2156146120 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.1.5
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156146120
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cancan
|
71
|
-
requirement: &
|
71
|
+
requirement: &2156145260 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.4.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2156145260
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rails
|
82
|
-
requirement: &
|
82
|
+
requirement: &2156144380 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 3.0.1
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2156144380
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rails_artifactor
|
93
|
-
requirement: &
|
93
|
+
requirement: &2156143700 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.3.3
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2156143700
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: r3_plugin_toolbox
|
104
|
-
requirement: &
|
104
|
+
requirement: &2156142840 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 0.4.0
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2156142840
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: sugar-high
|
115
|
-
requirement: &
|
115
|
+
requirement: &2156141880 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: 0.4.0
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2156141880
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: rspec
|
126
|
-
requirement: &
|
126
|
+
requirement: &2156135080 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 2.0.1
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *2156135080
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: generator-spec
|
137
|
-
requirement: &
|
137
|
+
requirement: &2156133700 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: 0.7.0
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *2156133700
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: rspec-action_view
|
148
|
-
requirement: &
|
148
|
+
requirement: &2156132680 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: 0.3.1
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *2156132680
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: rails-app-spec
|
159
|
-
requirement: &
|
159
|
+
requirement: &2156130620 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,10 +164,10 @@ dependencies:
|
|
164
164
|
version: 0.3.0
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *2156130620
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: devise-spec
|
170
|
-
requirement: &
|
170
|
+
requirement: &2156127260 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,10 +175,10 @@ dependencies:
|
|
175
175
|
version: 0.1.3
|
176
176
|
type: :development
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *2156127260
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: roles-spec
|
181
|
-
requirement: &
|
181
|
+
requirement: &2156121400 !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|
184
184
|
- - ! '>='
|
@@ -186,10 +186,10 @@ dependencies:
|
|
186
186
|
version: 0.1.3
|
187
187
|
type: :development
|
188
188
|
prerelease: false
|
189
|
-
version_requirements: *
|
189
|
+
version_requirements: *2156121400
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
name: require_all
|
192
|
-
requirement: &
|
192
|
+
requirement: &2156120880 !ruby/object:Gem::Requirement
|
193
193
|
none: false
|
194
194
|
requirements:
|
195
195
|
- - ~>
|
@@ -197,10 +197,10 @@ dependencies:
|
|
197
197
|
version: 1.2.0
|
198
198
|
type: :runtime
|
199
199
|
prerelease: false
|
200
|
-
version_requirements: *
|
200
|
+
version_requirements: *2156120880
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: colorize
|
203
|
-
requirement: &
|
203
|
+
requirement: &2156120000 !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
206
206
|
- - ! '>='
|
@@ -208,10 +208,10 @@ dependencies:
|
|
208
208
|
version: 0.5.8
|
209
209
|
type: :runtime
|
210
210
|
prerelease: false
|
211
|
-
version_requirements: *
|
211
|
+
version_requirements: *2156120000
|
212
212
|
- !ruby/object:Gem::Dependency
|
213
213
|
name: devise-links
|
214
|
-
requirement: &
|
214
|
+
requirement: &2156119260 !ruby/object:Gem::Requirement
|
215
215
|
none: false
|
216
216
|
requirements:
|
217
217
|
- - ! '>='
|
@@ -219,10 +219,10 @@ dependencies:
|
|
219
219
|
version: 0.2.1
|
220
220
|
type: :runtime
|
221
221
|
prerelease: false
|
222
|
-
version_requirements: *
|
222
|
+
version_requirements: *2156119260
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: cancan-rest-links
|
225
|
-
requirement: &
|
225
|
+
requirement: &2156118580 !ruby/object:Gem::Requirement
|
226
226
|
none: false
|
227
227
|
requirements:
|
228
228
|
- - ! '>='
|
@@ -230,10 +230,10 @@ dependencies:
|
|
230
230
|
version: 0.2.1
|
231
231
|
type: :runtime
|
232
232
|
prerelease: false
|
233
|
-
version_requirements: *
|
233
|
+
version_requirements: *2156118580
|
234
234
|
- !ruby/object:Gem::Dependency
|
235
235
|
name: cancan-permits
|
236
|
-
requirement: &
|
236
|
+
requirement: &2156117800 !ruby/object:Gem::Requirement
|
237
237
|
none: false
|
238
238
|
requirements:
|
239
239
|
- - ! '>='
|
@@ -241,10 +241,10 @@ dependencies:
|
|
241
241
|
version: 0.3.11
|
242
242
|
type: :runtime
|
243
243
|
prerelease: false
|
244
|
-
version_requirements: *
|
244
|
+
version_requirements: *2156117800
|
245
245
|
- !ruby/object:Gem::Dependency
|
246
246
|
name: devise
|
247
|
-
requirement: &
|
247
|
+
requirement: &2156117180 !ruby/object:Gem::Requirement
|
248
248
|
none: false
|
249
249
|
requirements:
|
250
250
|
- - ! '>='
|
@@ -252,10 +252,10 @@ dependencies:
|
|
252
252
|
version: 1.1.5
|
253
253
|
type: :runtime
|
254
254
|
prerelease: false
|
255
|
-
version_requirements: *
|
255
|
+
version_requirements: *2156117180
|
256
256
|
- !ruby/object:Gem::Dependency
|
257
257
|
name: cancan
|
258
|
-
requirement: &
|
258
|
+
requirement: &2156116580 !ruby/object:Gem::Requirement
|
259
259
|
none: false
|
260
260
|
requirements:
|
261
261
|
- - ! '>='
|
@@ -263,10 +263,10 @@ dependencies:
|
|
263
263
|
version: 1.4.1
|
264
264
|
type: :runtime
|
265
265
|
prerelease: false
|
266
|
-
version_requirements: *
|
266
|
+
version_requirements: *2156116580
|
267
267
|
- !ruby/object:Gem::Dependency
|
268
268
|
name: rails
|
269
|
-
requirement: &
|
269
|
+
requirement: &2156115960 !ruby/object:Gem::Requirement
|
270
270
|
none: false
|
271
271
|
requirements:
|
272
272
|
- - ! '>='
|
@@ -274,10 +274,10 @@ dependencies:
|
|
274
274
|
version: 3.0.1
|
275
275
|
type: :runtime
|
276
276
|
prerelease: false
|
277
|
-
version_requirements: *
|
277
|
+
version_requirements: *2156115960
|
278
278
|
- !ruby/object:Gem::Dependency
|
279
279
|
name: rails_artifactor
|
280
|
-
requirement: &
|
280
|
+
requirement: &2156115340 !ruby/object:Gem::Requirement
|
281
281
|
none: false
|
282
282
|
requirements:
|
283
283
|
- - ~>
|
@@ -285,10 +285,10 @@ dependencies:
|
|
285
285
|
version: 0.3.3
|
286
286
|
type: :runtime
|
287
287
|
prerelease: false
|
288
|
-
version_requirements: *
|
288
|
+
version_requirements: *2156115340
|
289
289
|
- !ruby/object:Gem::Dependency
|
290
290
|
name: r3_plugin_toolbox
|
291
|
-
requirement: &
|
291
|
+
requirement: &2156114720 !ruby/object:Gem::Requirement
|
292
292
|
none: false
|
293
293
|
requirements:
|
294
294
|
- - ! '>='
|
@@ -296,10 +296,10 @@ dependencies:
|
|
296
296
|
version: 0.4.0
|
297
297
|
type: :runtime
|
298
298
|
prerelease: false
|
299
|
-
version_requirements: *
|
299
|
+
version_requirements: *2156114720
|
300
300
|
- !ruby/object:Gem::Dependency
|
301
301
|
name: sugar-high
|
302
|
-
requirement: &
|
302
|
+
requirement: &2156113740 !ruby/object:Gem::Requirement
|
303
303
|
none: false
|
304
304
|
requirements:
|
305
305
|
- - ! '>='
|
@@ -307,7 +307,7 @@ dependencies:
|
|
307
307
|
version: 0.4.0
|
308
308
|
type: :runtime
|
309
309
|
prerelease: false
|
310
|
-
version_requirements: *
|
310
|
+
version_requirements: *2156113740
|
311
311
|
description: An integrated Authentication, Authorization and Roles solution for your
|
312
312
|
Rails 3 app with support for multiple ORMs
|
313
313
|
email: kmandrup@gmail.com
|