monban 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 93dddea63fce739f0a549c7ef8c97b7fee4cd7d7
4
+ data.tar.gz: 24df0ad211ea5bd21d23e8fa8607b53854b9be60
5
+ SHA512:
6
+ metadata.gz: fdbe4a23900c1d89b81aa077b237c394a7120b3840decd40a95bedcb9659bb29697e313aead7f6b837c30f52385bcf3aa2a8c34a7294f0ff658dfbf81c58aba1
7
+ data.tar.gz: f618ece4acd9ba1128268b0ace5f78d629febc676e7f9dced7ea4b1eea4abb1811b850c9687040f379d53b6b8bf269abf3fd469d64aaf1e8004a73fb99b8241e
@@ -19,12 +19,20 @@ module Monban
19
19
  end
20
20
 
21
21
  def using_strong_parameters
22
- if Kernel.const_defined?("StrongParameters")
22
+ if rails4? || strong_parameters_gem?
23
23
  true
24
24
  else
25
25
  yes?("Using strong_parameters?")
26
26
  end
27
27
  end
28
+
29
+ def strong_parameters_gem?
30
+ Kernel.const_defined?("StrongParameters")
31
+ end
32
+
33
+ def rails4?
34
+ Rails::VERSION::MAJOR == 4
35
+ end
28
36
  end
29
37
  end
30
38
  end
@@ -1,7 +1,7 @@
1
1
  class User < ActiveRecord::Base
2
2
  <% if !config[:use_strong_parameters] -%>
3
3
  attr_accessible :email, :password_digest
4
- <% elsif Gem::Version.new(Rails.version) < Gem::Version.new('4') -%>
4
+ <% elsif Gem::Version.new(Rails.version).segments[0] < 4 -%>
5
5
  include ActiveModel::ForbiddenAttributesProtection
6
6
  <% end -%>
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module Monban
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - halogenandtoast
@@ -10,166 +9,146 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-02-22 00:00:00.000000000 Z
12
+ date: 2013-06-24 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rails
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: bcrypt-ruby
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: warden
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: rake
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - '>='
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - '>='
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: rspec
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - '>='
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - '>='
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rspec-rails
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: capybara
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ! '>='
102
+ - - '>='
117
103
  - !ruby/object:Gem::Version
118
104
  version: '0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
- - - ! '>='
109
+ - - '>='
125
110
  - !ruby/object:Gem::Version
126
111
  version: '0'
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: pry
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
- - - ! '>='
116
+ - - '>='
133
117
  - !ruby/object:Gem::Version
134
118
  version: '0'
135
119
  type: :development
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
- - - ! '>='
123
+ - - '>='
141
124
  - !ruby/object:Gem::Version
142
125
  version: '0'
143
126
  - !ruby/object:Gem::Dependency
144
127
  name: sqlite3
145
128
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
129
  requirements:
148
- - - ! '>='
130
+ - - '>='
149
131
  - !ruby/object:Gem::Version
150
132
  version: '0'
151
133
  type: :development
152
134
  prerelease: false
153
135
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
136
  requirements:
156
- - - ! '>='
137
+ - - '>='
157
138
  - !ruby/object:Gem::Version
158
139
  version: '0'
159
140
  - !ruby/object:Gem::Dependency
160
141
  name: active_hash
161
142
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
143
  requirements:
164
- - - ! '>='
144
+ - - '>='
165
145
  - !ruby/object:Gem::Version
166
146
  version: '0'
167
147
  type: :development
168
148
  prerelease: false
169
149
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
150
  requirements:
172
- - - ! '>='
151
+ - - '>='
173
152
  - !ruby/object:Gem::Version
174
153
  version: '0'
175
154
  description: simple rails authentication
@@ -250,27 +229,26 @@ files:
250
229
  - spec/spec_helper.rb
251
230
  homepage: https://github.com/halogenandtoast/monban
252
231
  licenses: []
232
+ metadata: {}
253
233
  post_install_message:
254
234
  rdoc_options: []
255
235
  require_paths:
256
236
  - lib
257
237
  required_ruby_version: !ruby/object:Gem::Requirement
258
- none: false
259
238
  requirements:
260
- - - ! '>='
239
+ - - '>='
261
240
  - !ruby/object:Gem::Version
262
241
  version: '0'
263
242
  required_rubygems_version: !ruby/object:Gem::Requirement
264
- none: false
265
243
  requirements:
266
- - - ! '>='
244
+ - - '>='
267
245
  - !ruby/object:Gem::Version
268
246
  version: '0'
269
247
  requirements: []
270
248
  rubyforge_project:
271
- rubygems_version: 1.8.23
249
+ rubygems_version: 2.0.3
272
250
  signing_key:
273
- specification_version: 3
251
+ specification_version: 4
274
252
  summary: Making rails authentication as simple as possible
275
253
  test_files:
276
254
  - spec/features/visitor/visitor_signs_up_spec.rb
@@ -313,4 +291,3 @@ test_files:
313
291
  - spec/rails_app/public/favicon.ico
314
292
  - spec/rails_app/script/rails
315
293
  - spec/spec_helper.rb
316
- has_rdoc: