authlogic 4.4.0 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aff376d83dfc9c82fc0da8cf663c0da3a57d3773
4
- data.tar.gz: c010cbc52a5c7311e82a24f5c8200be9e13ddc7e
3
+ metadata.gz: f061d5824d3ae9539ebd01c0086805f45f7f7bf2
4
+ data.tar.gz: 34898459a083fe21e33f015d2828503d814596d6
5
5
  SHA512:
6
- metadata.gz: e4c98cc836da6a832ae6511026123eb5d6704176da7eaecaa8edb5dd04665c45ac2e671bbda68c7be7978f1dada2b97a95c74ffd7a1759bbe234a69533c210d8
7
- data.tar.gz: efd33a8b26b53d23f9709e5b00d89faec6d7003b5cd65a21162622282b98b2c8cfd632e5ab4172a11e1bebcd3643f5d1ad3584bf3fb9c112c6023784d327d01c
6
+ metadata.gz: 18e5204b2c793b3dbe55302237451eb3a9dd5ac4746e133c99aba03884e7560333a8cd06f2d3ae2906a7eb4aff6569535db6353bee207191469889b4668757ce
7
+ data.tar.gz: 0b622c6a789977e062c7fd862f35d2762d46c536261766c1706572c952bd751bc10eb7d24de8d2ab881e153982d4518a75f59ccbf52715c220a49602c9b0bd68
@@ -16,6 +16,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
16
16
  * Fixed
17
17
  * None
18
18
 
19
+ ## 4.4.1 (2018-09-21)
20
+
21
+ * Breaking Changes
22
+ * None
23
+ * Added
24
+ * None
25
+ * Fixed
26
+ * The methods for disabling Authlogic's "special" validations,
27
+ eg. `validate_email_field = false` are actually deprecated, but should
28
+ not produce a deprecation warning.
29
+ * Only produce deprecation warning when configuring a validation, not when
30
+ performing actual validation.
31
+
19
32
  ## 4.4.0 (2018-09-21)
20
33
 
21
34
  * Breaking Changes
data/README.md CHANGED
@@ -15,7 +15,7 @@ A clean, simple, and unobtrusive ruby authentication solution.
15
15
  | Version | Documentation |
16
16
  | ----------- | ------------- |
17
17
  | Unreleased | https://github.com/binarylogic/authlogic/blob/master/README.md |
18
- | 4.4.0 | https://github.com/binarylogic/authlogic/blob/v4.4.0/README.md |
18
+ | 4.4.1 | https://github.com/binarylogic/authlogic/blob/v4.4.1/README.md |
19
19
  | 3.7.0 | https://github.com/binarylogic/authlogic/blob/v3.7.0/README.md |
20
20
  | 2.1.11 | https://github.com/binarylogic/authlogic/blob/v2.1.11/README.rdoc |
21
21
  | 1.4.3 | https://github.com/binarylogic/authlogic/blob/v1.4.3/README.rdoc |
@@ -28,8 +28,9 @@ module Authlogic
28
28
  #
29
29
  # * <tt>Default:</tt> true
30
30
  # * <tt>Accepts:</tt> Boolean
31
+ #
32
+ # @deprecated
31
33
  def validate_email_field(value = nil)
32
- deprecate_authlogic_config("validate_email_field")
33
34
  rw_config(:validate_email_field, value, true)
34
35
  end
35
36
  alias_method :validate_email_field=, :validate_email_field
@@ -44,8 +45,10 @@ module Authlogic
44
45
  #
45
46
  # * <tt>Default:</tt> {:maximum => 100}
46
47
  # * <tt>Accepts:</tt> Hash of options accepted by validates_length_of
48
+ #
49
+ # @deprecated
47
50
  def validates_length_of_email_field_options(value = nil)
48
- deprecate_authlogic_config("validates_length_of_email_field_options")
51
+ deprecate_authlogic_config("validates_length_of_email_field_options") if value
49
52
  rw_config(:validates_length_of_email_field_options, value, maximum: 100)
50
53
  end
51
54
  alias_method(
@@ -62,6 +65,8 @@ module Authlogic
62
65
  # You can do this:
63
66
  #
64
67
  # merge_validates_length_of_email_field_options :my_option => my_value
68
+ #
69
+ # @deprecated
65
70
  def merge_validates_length_of_email_field_options(options = {})
66
71
  deprecate_authlogic_config("merge_validates_length_of_email_field_options")
67
72
  self.validates_length_of_email_field_options =
@@ -98,8 +103,10 @@ module Authlogic
98
103
  # }
99
104
  #
100
105
  # * <tt>Accepts:</tt> Hash of options accepted by validates_format_of
106
+ #
107
+ # @deprecated
101
108
  def validates_format_of_email_field_options(value = nil)
102
- deprecate_authlogic_config("validates_format_of_email_field_options")
109
+ deprecate_authlogic_config("validates_format_of_email_field_options") if value
103
110
  rw_config(
104
111
  :validates_format_of_email_field_options,
105
112
  value,
@@ -119,6 +126,8 @@ module Authlogic
119
126
 
120
127
  # See merge_validates_length_of_email_field_options. The same thing
121
128
  # except for validates_format_of_email_field_options.
129
+ #
130
+ # @deprecated
122
131
  def merge_validates_format_of_email_field_options(options = {})
123
132
  deprecate_authlogic_config("merge_validates_format_of_email_field_options")
124
133
  self.validates_format_of_email_field_options =
@@ -143,8 +152,10 @@ module Authlogic
143
152
  # }
144
153
  #
145
154
  # * <tt>Accepts:</tt> Hash of options accepted by validates_uniqueness_of
155
+ #
156
+ # @deprecated
146
157
  def validates_uniqueness_of_email_field_options(value = nil)
147
- deprecate_authlogic_config("validates_uniqueness_of_email_field_options")
158
+ deprecate_authlogic_config("validates_uniqueness_of_email_field_options") if value
148
159
  rw_config(
149
160
  :validates_uniqueness_of_email_field_options,
150
161
  value,
@@ -160,6 +171,8 @@ module Authlogic
160
171
 
161
172
  # See merge_validates_length_of_email_field_options. The same thing
162
173
  # except for validates_uniqueness_of_email_field_options.
174
+ #
175
+ # @deprecated
163
176
  def merge_validates_uniqueness_of_email_field_options(options = {})
164
177
  deprecate_authlogic_config("merge_validates_uniqueness_of_email_field_options")
165
178
  self.validates_uniqueness_of_email_field_options =
@@ -26,8 +26,9 @@ module Authlogic
26
26
  #
27
27
  # * <tt>Default:</tt> true
28
28
  # * <tt>Accepts:</tt> Boolean
29
+ #
30
+ # @deprecated
29
31
  def validate_login_field(value = nil)
30
- deprecate_authlogic_config("validate_login_field")
31
32
  rw_config(:validate_login_field, value, true)
32
33
  end
33
34
  alias_method :validate_login_field=, :validate_login_field
@@ -42,8 +43,10 @@ module Authlogic
42
43
  #
43
44
  # * <tt>Default:</tt> {:within => 3..100}
44
45
  # * <tt>Accepts:</tt> Hash of options accepted by validates_length_of
46
+ #
47
+ # @deprecated
45
48
  def validates_length_of_login_field_options(value = nil)
46
- deprecate_authlogic_config("validates_length_of_login_field_options")
49
+ deprecate_authlogic_config("validates_length_of_login_field_options") if value
47
50
  rw_config(:validates_length_of_login_field_options, value, within: 3..100)
48
51
  end
49
52
  alias_method(
@@ -60,6 +63,8 @@ module Authlogic
60
63
  # You can do this:
61
64
  #
62
65
  # merge_validates_length_of_login_field_options :my_option => my_value
66
+ #
67
+ # @deprecated
63
68
  def merge_validates_length_of_login_field_options(options = {})
64
69
  deprecate_authlogic_config("merge_validates_length_of_login_field_options")
65
70
  self.validates_length_of_login_field_options =
@@ -87,8 +92,10 @@ module Authlogic
87
92
  # }
88
93
  #
89
94
  # * <tt>Accepts:</tt> Hash of options accepted by validates_format_of
95
+ #
96
+ # @deprecated
90
97
  def validates_format_of_login_field_options(value = nil)
91
- deprecate_authlogic_config("validates_format_of_login_field_options")
98
+ deprecate_authlogic_config("validates_format_of_login_field_options") if value
92
99
  rw_config(
93
100
  :validates_format_of_login_field_options,
94
101
  value,
@@ -108,6 +115,8 @@ module Authlogic
108
115
 
109
116
  # See merge_validates_length_of_login_field_options. The same thing,
110
117
  # except for validates_format_of_login_field_options
118
+ #
119
+ # @deprecated
111
120
  def merge_validates_format_of_login_field_options(options = {})
112
121
  deprecate_authlogic_config("merge_validates_format_of_login_field_options")
113
122
  self.validates_format_of_login_field_options =
@@ -131,8 +140,10 @@ module Authlogic
131
140
  # }
132
141
  #
133
142
  # * <tt>Accepts:</tt> Hash of options accepted by validates_uniqueness_of
143
+ #
144
+ # @deprecated
134
145
  def validates_uniqueness_of_login_field_options(value = nil)
135
- deprecate_authlogic_config("validates_uniqueness_of_login_field_options")
146
+ deprecate_authlogic_config("validates_uniqueness_of_login_field_options") if value
136
147
  rw_config(
137
148
  :validates_uniqueness_of_login_field_options,
138
149
  value,
@@ -148,6 +159,8 @@ module Authlogic
148
159
 
149
160
  # See merge_validates_length_of_login_field_options. The same thing,
150
161
  # except for validates_uniqueness_of_login_field_options
162
+ #
163
+ # @deprecated
151
164
  def merge_validates_uniqueness_of_login_field_options(options = {})
152
165
  deprecate_authlogic_config("merge_validates_uniqueness_of_login_field_options")
153
166
  self.validates_uniqueness_of_login_field_options =
@@ -97,8 +97,9 @@ module Authlogic
97
97
  #
98
98
  # * <tt>Default:</tt> true
99
99
  # * <tt>Accepts:</tt> Boolean
100
+ #
101
+ # @deprecated
100
102
  def validate_password_field(value = nil)
101
- deprecate_authlogic_config("validate_password_field")
102
103
  rw_config(:validate_password_field, value, true)
103
104
  end
104
105
  alias_method :validate_password_field=, :validate_password_field
@@ -113,8 +114,10 @@ module Authlogic
113
114
  #
114
115
  # * <tt>Default:</tt> {:minimum => 8, :if => :require_password?}
115
116
  # * <tt>Accepts:</tt> Hash of options accepted by validates_length_of
117
+ #
118
+ # @deprecated
116
119
  def validates_length_of_password_field_options(value = nil)
117
- deprecate_authlogic_config("validates_length_of_password_field_options")
120
+ deprecate_authlogic_config("validates_length_of_password_field_options") if value
118
121
  rw_config(
119
122
  :validates_length_of_password_field_options,
120
123
  value,
@@ -136,6 +139,8 @@ module Authlogic
136
139
  # You can do this:
137
140
  #
138
141
  # merge_validates_length_of_password_field_options :my_option => my_value
142
+ #
143
+ # @deprecated
139
144
  def merge_validates_length_of_password_field_options(options = {})
140
145
  deprecate_authlogic_config(
141
146
  "merge_validates_length_of_password_field_options"
@@ -154,10 +159,14 @@ module Authlogic
154
159
  #
155
160
  # * <tt>Default:</tt> {:if => :require_password?}
156
161
  # * <tt>Accepts:</tt> Hash of options accepted by validates_confirmation_of
162
+ #
163
+ # @deprecated
157
164
  def validates_confirmation_of_password_field_options(value = nil)
158
- deprecate_authlogic_config(
159
- "validates_confirmation_of_password_field_options"
160
- )
165
+ if value
166
+ deprecate_authlogic_config(
167
+ "validates_confirmation_of_password_field_options"
168
+ )
169
+ end
161
170
  rw_config(
162
171
  :validates_confirmation_of_password_field_options,
163
172
  value,
@@ -169,6 +178,8 @@ module Authlogic
169
178
 
170
179
  # See merge_validates_length_of_password_field_options. The same thing, except for
171
180
  # validates_confirmation_of_password_field_options
181
+ #
182
+ # @deprecated
172
183
  def merge_validates_confirmation_of_password_field_options(options = {})
173
184
  deprecate_authlogic_config(
174
185
  "merge_validates_confirmation_of_password_field_options"
@@ -187,10 +198,14 @@ module Authlogic
187
198
  #
188
199
  # * <tt>Default:</tt> validates_length_of_password_field_options
189
200
  # * <tt>Accepts:</tt> Hash of options accepted by validates_length_of
201
+ #
202
+ # @deprecated
190
203
  def validates_length_of_password_confirmation_field_options(value = nil)
191
- deprecate_authlogic_config(
192
- "validates_length_of_password_confirmation_field_options"
193
- )
204
+ if value
205
+ deprecate_authlogic_config(
206
+ "validates_length_of_password_confirmation_field_options"
207
+ )
208
+ end
194
209
  rw_config(
195
210
  :validates_length_of_password_confirmation_field_options,
196
211
  value,
@@ -204,6 +219,8 @@ module Authlogic
204
219
 
205
220
  # See merge_validates_length_of_password_field_options. The same thing, except for
206
221
  # validates_length_of_password_confirmation_field_options
222
+ #
223
+ # @deprecated
207
224
  def merge_validates_length_of_password_confirmation_field_options(options = {})
208
225
  deprecate_authlogic_config(
209
226
  "merge_validates_length_of_password_confirmation_field_options"
@@ -22,8 +22,10 @@ module Authlogic
22
22
  #
23
23
  # * <tt>Default:</tt> nil
24
24
  # * <tt>Accepts:</tt> Symbol or Array of symbols
25
+ #
26
+ # @deprecated
25
27
  def validations_scope(value = nil)
26
- deprecate_authlogic_config("validations_scope")
28
+ deprecate_authlogic_config("validations_scope") if value
27
29
  rw_config(:validations_scope, value)
28
30
  end
29
31
  alias_method :validations_scope=, :validations_scope
@@ -16,6 +16,6 @@ module Authlogic
16
16
  #
17
17
  # @api public
18
18
  def self.gem_version
19
- ::Gem::Version.new("4.4.0")
19
+ ::Gem::Version.new("4.4.1")
20
20
  end
21
21
  end
@@ -113,6 +113,12 @@ require "English"
113
113
  $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
114
114
  require "authlogic"
115
115
  require "authlogic/test_case"
116
+
117
+ # Configure SCrypt to be as fast as possible. This is desirable for a test
118
+ # suite, and would be the opposite of desirable for production.
119
+ Authlogic::CryptoProviders::SCrypt.max_time = 0.001 # 1ms
120
+ Authlogic::CryptoProviders::SCrypt.max_mem = 1024 * 1024 # 1MB, the minimum SCrypt allows
121
+
116
122
  require "libs/project"
117
123
  require "libs/affiliate"
118
124
  require "libs/employee"
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: 4.4.0
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson