cream 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cream}
8
- s.version = "0.9.1"
8
+ s.version = "0.9.2"
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-07}
12
+ s.date = %q{2011-05-08}
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 = [
@@ -78,19 +78,29 @@ require "rails/test_unit/railtie"
78
78
  # attr_accessor :login, :password
79
79
  # attr_accessor :username, :email
80
80
  # attr_accessor :country, :country_code, :language, :language_code, :city
81
-
82
- def self.create options = {}
83
- Guest.new options.merge(session[:guest_options] || {})
84
- end
85
81
 
86
- def save
87
- false
88
- end
89
-
90
- def save!
91
- false
82
+ include ActiveModel::Validations
83
+ include ActiveModel::Conversion
84
+ extend ActiveModel::Naming
85
+
86
+ def initialize(attributes = {})
87
+ attributes.each do |name, value|
88
+ send("\#{name}=", value)
89
+ end
90
+ end
91
+
92
+ def self.create options = {}
93
+ Guest.new options
92
94
  end
93
95
 
96
+ # def save
97
+ # false
98
+ # end
99
+ #
100
+ # def save!
101
+ # false
102
+ # end
103
+
94
104
  def is? role
95
105
  role == :guest
96
106
  end
@@ -1,12 +1,12 @@
1
1
  module DeviseConfigGenerator
2
2
  module AppHelper
3
- def protection_configure!
4
- debug! "Configuring: devise authentication filter"
5
- ## Add Devise protection to Application controller:
6
- insert_into_controller :application do
7
- "before_filter :authenticate_user!"
8
- end
9
- end
3
+ # def protection_configure!
4
+ # debug! "Configuring: devise authentication filter"
5
+ # ## Add Devise protection to Application controller:
6
+ # insert_into_controller :application do
7
+ # "before_filter :authenticate_user!"
8
+ # end
9
+ # end
10
10
 
11
11
  # inside 'config/initializers/devise.rb' change to:
12
12
  # require 'devise/orm/mongo_mapper'
@@ -51,7 +51,8 @@ module Devise
51
51
 
52
52
  # see app_helper.rb
53
53
  def configure_devise!
54
- [:orm, :mailer, :protection].each{|m| send(:"#{m}_configure!") }
54
+ # :protection
55
+ [:orm, :mailer].each{|m| send(:"#{m}_configure!") }
55
56
  end
56
57
 
57
58
  def devise_gems
@@ -27,18 +27,20 @@ module DeviseUserGenerator
27
27
  name_default_users = user_class.underscore.gsub('/', '_').pluralize
28
28
  default_user_class = user_class.classify
29
29
  %Q{
30
- match '/sign_in' => 'main#index'
31
- match '/log_in' => 'main#index'
32
-
33
- devise_for :#{name_default_users} do
34
- get '/sign_in' => 'main#index', :as => :new_user_session
35
- end
36
30
 
37
31
  devise_for :#{name_default_users}, :class_name => '#{default_user_class}', :controllers => {:sessions => 'main'} do
38
32
  get '/sign_in' => 'main#index', :as => :new_user_session
39
33
  end}
40
34
  end
41
35
 
36
+ # match '/sign_in' => 'main#index'
37
+ # match '/log_in' => 'main#index'
38
+
39
+ # devise_for :#{name_default_users} do
40
+ # get '/sign_in' => 'main#index', :as => :new_user_session
41
+ # end
42
+
43
+
42
44
  def user_type_routes
43
45
  user_types_to_route.each do |user_type|
44
46
  name_user_types = user_type.pluralize
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.1
4
+ version: 0.9.2
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-07 00:00:00.000000000Z
12
+ date: 2011-05-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: devise-links
16
- requirement: &2156150280 !ruby/object:Gem::Requirement
16
+ requirement: &2157132340 !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: *2156150280
24
+ version_requirements: *2157132340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: cancan-rest-links
27
- requirement: &2156149120 !ruby/object:Gem::Requirement
27
+ requirement: &2157131320 !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: *2156149120
35
+ version_requirements: *2157131320
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cancan-permits
38
- requirement: &2156148240 !ruby/object:Gem::Requirement
38
+ requirement: &2157130100 !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: *2156148240
46
+ version_requirements: *2157130100
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: require_all
49
- requirement: &2156147220 !ruby/object:Gem::Requirement
49
+ requirement: &2157129120 !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: *2156147220
57
+ version_requirements: *2157129120
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: devise
60
- requirement: &2156146120 !ruby/object:Gem::Requirement
60
+ requirement: &2157127680 !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: *2156146120
68
+ version_requirements: *2157127680
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cancan
71
- requirement: &2156145260 !ruby/object:Gem::Requirement
71
+ requirement: &2157126940 !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: *2156145260
79
+ version_requirements: *2157126940
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rails
82
- requirement: &2156144380 !ruby/object:Gem::Requirement
82
+ requirement: &2157126140 !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: *2156144380
90
+ version_requirements: *2157126140
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rails_artifactor
93
- requirement: &2156143700 !ruby/object:Gem::Requirement
93
+ requirement: &2157125260 !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: *2156143700
101
+ version_requirements: *2157125260
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: r3_plugin_toolbox
104
- requirement: &2156142840 !ruby/object:Gem::Requirement
104
+ requirement: &2157124400 !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: *2156142840
112
+ version_requirements: *2157124400
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: sugar-high
115
- requirement: &2156141880 !ruby/object:Gem::Requirement
115
+ requirement: &2157123640 !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: *2156141880
123
+ version_requirements: *2157123640
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rspec
126
- requirement: &2156135080 !ruby/object:Gem::Requirement
126
+ requirement: &2157122740 !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: *2156135080
134
+ version_requirements: *2157122740
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: generator-spec
137
- requirement: &2156133700 !ruby/object:Gem::Requirement
137
+ requirement: &2157121740 !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: *2156133700
145
+ version_requirements: *2157121740
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: rspec-action_view
148
- requirement: &2156132680 !ruby/object:Gem::Requirement
148
+ requirement: &2157120920 !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: *2156132680
156
+ version_requirements: *2157120920
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: rails-app-spec
159
- requirement: &2156130620 !ruby/object:Gem::Requirement
159
+ requirement: &2157119920 !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: *2156130620
167
+ version_requirements: *2157119920
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: devise-spec
170
- requirement: &2156127260 !ruby/object:Gem::Requirement
170
+ requirement: &2157119080 !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: *2156127260
178
+ version_requirements: *2157119080
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: roles-spec
181
- requirement: &2156121400 !ruby/object:Gem::Requirement
181
+ requirement: &2157118140 !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: *2156121400
189
+ version_requirements: *2157118140
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: require_all
192
- requirement: &2156120880 !ruby/object:Gem::Requirement
192
+ requirement: &2157117180 !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: *2156120880
200
+ version_requirements: *2157117180
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: colorize
203
- requirement: &2156120000 !ruby/object:Gem::Requirement
203
+ requirement: &2157115960 !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: *2156120000
211
+ version_requirements: *2157115960
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: devise-links
214
- requirement: &2156119260 !ruby/object:Gem::Requirement
214
+ requirement: &2157114660 !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: *2156119260
222
+ version_requirements: *2157114660
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: cancan-rest-links
225
- requirement: &2156118580 !ruby/object:Gem::Requirement
225
+ requirement: &2157113540 !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: *2156118580
233
+ version_requirements: *2157113540
234
234
  - !ruby/object:Gem::Dependency
235
235
  name: cancan-permits
236
- requirement: &2156117800 !ruby/object:Gem::Requirement
236
+ requirement: &2157112400 !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: *2156117800
244
+ version_requirements: *2157112400
245
245
  - !ruby/object:Gem::Dependency
246
246
  name: devise
247
- requirement: &2156117180 !ruby/object:Gem::Requirement
247
+ requirement: &2157111560 !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: *2156117180
255
+ version_requirements: *2157111560
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: cancan
258
- requirement: &2156116580 !ruby/object:Gem::Requirement
258
+ requirement: &2157110660 !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: *2156116580
266
+ version_requirements: *2157110660
267
267
  - !ruby/object:Gem::Dependency
268
268
  name: rails
269
- requirement: &2156115960 !ruby/object:Gem::Requirement
269
+ requirement: &2157109720 !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: *2156115960
277
+ version_requirements: *2157109720
278
278
  - !ruby/object:Gem::Dependency
279
279
  name: rails_artifactor
280
- requirement: &2156115340 !ruby/object:Gem::Requirement
280
+ requirement: &2157109020 !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: *2156115340
288
+ version_requirements: *2157109020
289
289
  - !ruby/object:Gem::Dependency
290
290
  name: r3_plugin_toolbox
291
- requirement: &2156114720 !ruby/object:Gem::Requirement
291
+ requirement: &2157108380 !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: *2156114720
299
+ version_requirements: *2157108380
300
300
  - !ruby/object:Gem::Dependency
301
301
  name: sugar-high
302
- requirement: &2156113740 !ruby/object:Gem::Requirement
302
+ requirement: &2157107460 !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: *2156113740
310
+ version_requirements: *2157107460
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