quo_vadis 1.3.0 → 1.3.1

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: e30160599b54a7e2409a2b8b258014930d02fbfe
4
+ data.tar.gz: 94b738366da022015a9162be3edf4ebd8faf5ca1
5
+ SHA512:
6
+ metadata.gz: b0dab8ef0da12d87a195942f1364d0a9058a2e95fd5449be3d9a38eb81fabc57f0df1b3a2548c94adcdfa630bc8c9e33accbac3c65c42d7b02e91ce3b7c65412
7
+ data.tar.gz: 349ada3d2ddb4b5d23baa0c06eab4bd369cc3ea25ea5dd274f4b49dda41fe836179a804bcd0bfebc7a4cee997f4879e2327bc4d21607331f5172c099792bbe14
@@ -46,14 +46,12 @@ module ModelMixin
46
46
  end
47
47
  end
48
48
 
49
- # Instantiates a user suitable for user-activation.
49
+ # [Deprecated] Instantiates a user suitable for user-activation.
50
+ #
51
+ # NOTE: use instance method `#randomise_credentials` instead.
50
52
  def new_for_activation(attributes = nil)
51
53
  user = new attributes
52
- # Satisfy username and password validations by setting to random values.
53
- begin
54
- user.username = SecureRandom.base64(10)
55
- end while exists?(:username => user.username)
56
- user.password = SecureRandom.base64(10)
54
+ user.randomise_credentials
57
55
  user
58
56
  end
59
57
  END
@@ -66,6 +64,16 @@ module ModelMixin
66
64
  true
67
65
  end
68
66
 
67
+ # Sets the `username` and `password` to random values.
68
+ # Use this for a user who should authenticate where they need to activate
69
+ # themselves first.
70
+ def randomise_credentials
71
+ begin
72
+ self.username = SecureRandom.base64(10)
73
+ end while self.class.exists?(:username => username)
74
+ self.password = SecureRandom.base64(10)
75
+ end
76
+
69
77
  def password=(plain_text_password) # :nodoc:
70
78
  @password = plain_text_password
71
79
  unless @password.blank?
@@ -1,3 +1,3 @@
1
1
  module QuoVadis
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
@@ -19,10 +19,10 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ['lib']
21
21
 
22
- s.add_dependency 'rails', '~>3.0'
22
+ s.add_dependency 'rails', '~> 3.0.4'
23
23
  s.add_dependency 'bcrypt-ruby', '~> 3.0.0'
24
24
 
25
- s.add_development_dependency 'rails', '~>3.0.4' # so we can test CSRF protection
25
+ # s.add_development_dependency 'rails', '~> 3.0.4' # so we can test CSRF protection
26
26
  s.add_development_dependency 'sqlite3-ruby'
27
27
  s.add_development_dependency 'capybara', '~>1.1'
28
28
  s.add_development_dependency 'launchy'
@@ -2,8 +2,6 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag :all %>
6
- <%= javascript_include_tag :defaults %>
7
5
  <%= csrf_meta_tag %>
8
6
  </head>
9
7
  <body>
metadata CHANGED
@@ -1,126 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quo_vadis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
5
- prerelease:
4
+ version: 1.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andy Stewart
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-23 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '3.0'
19
+ version: 3.0.4
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '3.0'
26
+ version: 3.0.4
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bcrypt-ruby
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 3.0.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 3.0.0
46
- - !ruby/object:Gem::Dependency
47
- name: rails
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 3.0.4
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 3.0.4
62
41
  - !ruby/object:Gem::Dependency
63
42
  name: sqlite3-ruby
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ! '>='
45
+ - - ">="
68
46
  - !ruby/object:Gem::Version
69
47
  version: '0'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ! '>='
52
+ - - ">="
76
53
  - !ruby/object:Gem::Version
77
54
  version: '0'
78
55
  - !ruby/object:Gem::Dependency
79
56
  name: capybara
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ~>
59
+ - - "~>"
84
60
  - !ruby/object:Gem::Version
85
61
  version: '1.1'
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ~>
66
+ - - "~>"
92
67
  - !ruby/object:Gem::Version
93
68
  version: '1.1'
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: launchy
96
71
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
72
  requirements:
99
- - - ! '>='
73
+ - - ">="
100
74
  - !ruby/object:Gem::Version
101
75
  version: '0'
102
76
  type: :development
103
77
  prerelease: false
104
78
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
79
  requirements:
107
- - - ! '>='
80
+ - - ">="
108
81
  - !ruby/object:Gem::Version
109
82
  version: '0'
110
83
  - !ruby/object:Gem::Dependency
111
84
  name: rake
112
85
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
86
  requirements:
115
- - - ! '>='
87
+ - - ">="
116
88
  - !ruby/object:Gem::Version
117
89
  version: '0'
118
90
  type: :development
119
91
  prerelease: false
120
92
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
93
  requirements:
123
- - - ! '>='
94
+ - - ">="
124
95
  - !ruby/object:Gem::Version
125
96
  version: '0'
126
97
  description: Simple username/password authentication for Rails 3.
@@ -130,7 +101,7 @@ executables: []
130
101
  extensions: []
131
102
  extra_rdoc_files: []
132
103
  files:
133
- - .gitignore
104
+ - ".gitignore"
134
105
  - CHANGELOG.md
135
106
  - Gemfile
136
107
  - README.md
@@ -225,33 +196,26 @@ files:
225
196
  - test/unit/user_test.rb
226
197
  homepage: https://github.com/airblade/quo_vadis
227
198
  licenses: []
199
+ metadata: {}
228
200
  post_install_message:
229
201
  rdoc_options: []
230
202
  require_paths:
231
203
  - lib
232
204
  required_ruby_version: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
- - - ! '>='
206
+ - - ">="
236
207
  - !ruby/object:Gem::Version
237
208
  version: '0'
238
- segments:
239
- - 0
240
- hash: 4418019699885663804
241
209
  required_rubygems_version: !ruby/object:Gem::Requirement
242
- none: false
243
210
  requirements:
244
- - - ! '>='
211
+ - - ">="
245
212
  - !ruby/object:Gem::Version
246
213
  version: '0'
247
- segments:
248
- - 0
249
- hash: 4418019699885663804
250
214
  requirements: []
251
215
  rubyforge_project: quo_vadis
252
- rubygems_version: 1.8.23
216
+ rubygems_version: 2.2.2
253
217
  signing_key:
254
- specification_version: 3
218
+ specification_version: 4
255
219
  summary: Simple username/password authentication for Rails 3.
256
220
  test_files:
257
221
  - test/dummy/.gitignore