authlogic 5.0.4 → 6.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,16 @@ module Authlogic
9
9
  self.controller = controller
10
10
  end
11
11
 
12
+ def env
13
+ @env ||= {
14
+ ControllerAdapters::AbstractAdapter::ENV_SESSION_OPTIONS => {}
15
+ }
16
+ end
17
+
18
+ def format
19
+ controller.request_content_type if controller.respond_to? :request_content_type
20
+ end
21
+
12
22
  def ip
13
23
  controller&.respond_to?(:env) &&
14
24
  controller.env.is_a?(Hash) &&
@@ -12,7 +12,7 @@ module Authlogic
12
12
  def cookies
13
13
  new_cookies = MockCookieJar.new
14
14
  super.each do |key, value|
15
- new_cookies[key] = value[:value]
15
+ new_cookies[key] = cookie_value(value)
16
16
  end
17
17
  new_cookies
18
18
  end
@@ -28,6 +28,12 @@ module Authlogic
28
28
  def request_content_type
29
29
  request.format.to_s
30
30
  end
31
+
32
+ private
33
+
34
+ def cookie_value(value)
35
+ value.is_a?(Hash) ? value[:value] : value
36
+ end
31
37
  end
32
38
  end
33
39
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require File.dirname(__FILE__) + "/test_case/rails_request_adapter"
4
+ require File.dirname(__FILE__) + "/test_case/mock_api_controller"
4
5
  require File.dirname(__FILE__) + "/test_case/mock_cookie_jar"
5
6
  require File.dirname(__FILE__) + "/test_case/mock_controller"
6
7
  require File.dirname(__FILE__) + "/test_case/mock_logger"
@@ -17,6 +17,6 @@ module Authlogic
17
17
  #
18
18
  # @api public
19
19
  def self.gem_version
20
- ::Gem::Version.new("5.0.4")
20
+ ::Gem::Version.new("6.4.2")
21
21
  end
22
22
  end
data/lib/authlogic.rb CHANGED
@@ -13,6 +13,7 @@ require "active_record"
13
13
  path = File.dirname(__FILE__) + "/authlogic/"
14
14
 
15
15
  [
16
+ "errors",
16
17
  "i18n",
17
18
  "random",
18
19
  "config",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.4
4
+ version: 6.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-09-11 00:00:00.000000000 Z
13
+ date: 2021-12-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '5.2'
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '6.1'
24
+ version: '7.1'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: '5.2'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '6.1'
34
+ version: '7.1'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: activerecord
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -41,7 +41,7 @@ dependencies:
41
41
  version: '5.2'
42
42
  - - "<"
43
43
  - !ruby/object:Gem::Version
44
- version: '6.1'
44
+ version: '7.1'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: '5.2'
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: '6.1'
54
+ version: '7.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -61,7 +61,7 @@ dependencies:
61
61
  version: '5.2'
62
62
  - - "<"
63
63
  - !ruby/object:Gem::Version
64
- version: '6.1'
64
+ version: '7.1'
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,7 +71,7 @@ dependencies:
71
71
  version: '5.2'
72
72
  - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: '6.1'
74
+ version: '7.1'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: request_store
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -86,26 +86,6 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '1.0'
89
- - !ruby/object:Gem::Dependency
90
- name: scrypt
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: '1.2'
96
- - - "<"
97
- - !ruby/object:Gem::Version
98
- version: '4.0'
99
- type: :runtime
100
- prerelease: false
101
- version_requirements: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: '1.2'
106
- - - "<"
107
- - !ruby/object:Gem::Version
108
- version: '4.0'
109
89
  - !ruby/object:Gem::Dependency
110
90
  name: bcrypt
111
91
  requirement: !ruby/object:Gem::Requirement
@@ -190,20 +170,34 @@ dependencies:
190
170
  - - "~>"
191
171
  - !ruby/object:Gem::Version
192
172
  version: 1.1.4
173
+ - !ruby/object:Gem::Dependency
174
+ name: rake
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '13.0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: '13.0'
193
187
  - !ruby/object:Gem::Dependency
194
188
  name: rubocop
195
189
  requirement: !ruby/object:Gem::Requirement
196
190
  requirements:
197
191
  - - "~>"
198
192
  - !ruby/object:Gem::Version
199
- version: 0.67.2
193
+ version: 0.80.1
200
194
  type: :development
201
195
  prerelease: false
202
196
  version_requirements: !ruby/object:Gem::Requirement
203
197
  requirements:
204
198
  - - "~>"
205
199
  - !ruby/object:Gem::Version
206
- version: 0.67.2
200
+ version: 0.80.1
207
201
  - !ruby/object:Gem::Dependency
208
202
  name: rubocop-performance
209
203
  requirement: !ruby/object:Gem::Requirement
@@ -218,6 +212,26 @@ dependencies:
218
212
  - - "~>"
219
213
  - !ruby/object:Gem::Version
220
214
  version: '1.1'
215
+ - !ruby/object:Gem::Dependency
216
+ name: scrypt
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '1.2'
222
+ - - "<"
223
+ - !ruby/object:Gem::Version
224
+ version: '4.0'
225
+ type: :development
226
+ prerelease: false
227
+ version_requirements: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - ">="
230
+ - !ruby/object:Gem::Version
231
+ version: '1.2'
232
+ - - "<"
233
+ - !ruby/object:Gem::Version
234
+ version: '4.0'
221
235
  - !ruby/object:Gem::Dependency
222
236
  name: simplecov
223
237
  requirement: !ruby/object:Gem::Requirement
@@ -252,14 +266,14 @@ dependencies:
252
266
  requirements:
253
267
  - - "~>"
254
268
  - !ruby/object:Gem::Version
255
- version: 1.3.13
269
+ version: 1.4.0
256
270
  type: :development
257
271
  prerelease: false
258
272
  version_requirements: !ruby/object:Gem::Requirement
259
273
  requirements:
260
274
  - - "~>"
261
275
  - !ruby/object:Gem::Version
262
- version: 1.3.13
276
+ version: 1.4.0
263
277
  - !ruby/object:Gem::Dependency
264
278
  name: timecop
265
279
  requirement: !ruby/object:Gem::Requirement
@@ -305,23 +319,29 @@ files:
305
319
  - lib/authlogic/crypto_providers.rb
306
320
  - lib/authlogic/crypto_providers/bcrypt.rb
307
321
  - lib/authlogic/crypto_providers/md5.rb
322
+ - lib/authlogic/crypto_providers/md5/v2.rb
308
323
  - lib/authlogic/crypto_providers/scrypt.rb
309
324
  - lib/authlogic/crypto_providers/sha1.rb
325
+ - lib/authlogic/crypto_providers/sha1/v2.rb
310
326
  - lib/authlogic/crypto_providers/sha256.rb
327
+ - lib/authlogic/crypto_providers/sha256/v2.rb
311
328
  - lib/authlogic/crypto_providers/sha512.rb
329
+ - lib/authlogic/crypto_providers/sha512/v2.rb
330
+ - lib/authlogic/errors.rb
312
331
  - lib/authlogic/i18n.rb
313
332
  - lib/authlogic/i18n/translator.rb
314
333
  - lib/authlogic/random.rb
315
334
  - lib/authlogic/session/base.rb
316
335
  - lib/authlogic/session/magic_column/assigns_last_request_at.rb
317
336
  - lib/authlogic/test_case.rb
337
+ - lib/authlogic/test_case/mock_api_controller.rb
318
338
  - lib/authlogic/test_case/mock_controller.rb
319
339
  - lib/authlogic/test_case/mock_cookie_jar.rb
320
340
  - lib/authlogic/test_case/mock_logger.rb
321
341
  - lib/authlogic/test_case/mock_request.rb
322
342
  - lib/authlogic/test_case/rails_request_adapter.rb
323
343
  - lib/authlogic/version.rb
324
- homepage: http://github.com/binarylogic/authlogic
344
+ homepage: https://github.com/binarylogic/authlogic
325
345
  licenses:
326
346
  - MIT
327
347
  metadata: {}
@@ -333,7 +353,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
333
353
  requirements:
334
354
  - - ">="
335
355
  - !ruby/object:Gem::Version
336
- version: 2.3.0
356
+ version: 2.6.0
337
357
  required_rubygems_version: !ruby/object:Gem::Requirement
338
358
  requirements:
339
359
  - - ">="