authlogic 3.8.0 → 4.5.0
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 +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
- data/.github/ISSUE_TEMPLATE/feature_proposal.md +32 -0
- data/.github/triage.md +86 -0
- data/.gitignore +4 -3
- data/.rubocop.yml +109 -9
- data/.rubocop_todo.yml +38 -355
- data/.travis.yml +11 -35
- data/CHANGELOG.md +345 -2
- data/CONTRIBUTING.md +45 -14
- data/Gemfile +3 -2
- data/README.md +244 -90
- data/Rakefile +10 -10
- data/UPGRADING.md +22 -0
- data/authlogic.gemspec +34 -21
- data/doc/use_normal_rails_validation.md +82 -0
- data/gemfiles/Gemfile.rails-4.2.x +6 -0
- data/{test/gemfiles → gemfiles}/Gemfile.rails-5.1.x +2 -2
- data/{test/gemfiles → gemfiles}/Gemfile.rails-5.2.x +2 -2
- data/lib/authlogic/acts_as_authentic/base.rb +36 -24
- data/lib/authlogic/acts_as_authentic/email.rb +65 -31
- data/lib/authlogic/acts_as_authentic/logged_in_status.rb +14 -9
- data/lib/authlogic/acts_as_authentic/login.rb +61 -45
- data/lib/authlogic/acts_as_authentic/magic_columns.rb +6 -6
- data/lib/authlogic/acts_as_authentic/password.rb +267 -146
- data/lib/authlogic/acts_as_authentic/perishable_token.rb +24 -19
- data/lib/authlogic/acts_as_authentic/persistence_token.rb +10 -15
- data/lib/authlogic/acts_as_authentic/queries/find_with_case.rb +67 -0
- data/lib/authlogic/acts_as_authentic/restful_authentication.rb +50 -14
- data/lib/authlogic/acts_as_authentic/session_maintenance.rb +88 -60
- data/lib/authlogic/acts_as_authentic/single_access_token.rb +23 -11
- data/lib/authlogic/acts_as_authentic/validations_scope.rb +9 -6
- data/lib/authlogic/authenticates_many/association.rb +7 -7
- data/lib/authlogic/authenticates_many/base.rb +37 -21
- data/lib/authlogic/config.rb +21 -10
- data/lib/authlogic/controller_adapters/abstract_adapter.rb +38 -11
- data/lib/authlogic/controller_adapters/rack_adapter.rb +9 -5
- data/lib/authlogic/controller_adapters/rails_adapter.rb +12 -7
- data/lib/authlogic/controller_adapters/sinatra_adapter.rb +2 -2
- data/lib/authlogic/crypto_providers/aes256.rb +37 -32
- data/lib/authlogic/crypto_providers/bcrypt.rb +21 -15
- data/lib/authlogic/crypto_providers/md5.rb +4 -2
- data/lib/authlogic/crypto_providers/scrypt.rb +22 -17
- data/lib/authlogic/crypto_providers/sha1.rb +11 -5
- data/lib/authlogic/crypto_providers/sha256.rb +13 -9
- data/lib/authlogic/crypto_providers/sha512.rb +0 -21
- data/lib/authlogic/crypto_providers/wordpress.rb +32 -3
- data/lib/authlogic/crypto_providers.rb +91 -0
- data/lib/authlogic/i18n.rb +26 -19
- data/lib/authlogic/random.rb +10 -28
- data/lib/authlogic/regex.rb +59 -28
- data/lib/authlogic/session/activation.rb +10 -7
- data/lib/authlogic/session/active_record_trickery.rb +13 -9
- data/lib/authlogic/session/base.rb +15 -4
- data/lib/authlogic/session/brute_force_protection.rb +40 -33
- data/lib/authlogic/session/callbacks.rb +94 -46
- data/lib/authlogic/session/cookies.rb +130 -45
- data/lib/authlogic/session/existence.rb +21 -11
- data/lib/authlogic/session/foundation.rb +64 -14
- data/lib/authlogic/session/http_auth.rb +35 -28
- data/lib/authlogic/session/id.rb +9 -4
- data/lib/authlogic/session/klass.rb +15 -12
- data/lib/authlogic/session/magic_columns.rb +58 -55
- data/lib/authlogic/session/magic_states.rb +25 -19
- data/lib/authlogic/session/params.rb +42 -28
- data/lib/authlogic/session/password.rb +130 -120
- data/lib/authlogic/session/perishable_token.rb +5 -4
- data/lib/authlogic/session/persistence.rb +18 -12
- data/lib/authlogic/session/priority_record.rb +15 -12
- data/lib/authlogic/session/scopes.rb +51 -32
- data/lib/authlogic/session/session.rb +38 -28
- data/lib/authlogic/session/timeout.rb +13 -13
- data/lib/authlogic/session/unauthorized_record.rb +18 -13
- data/lib/authlogic/session/validation.rb +9 -9
- data/lib/authlogic/test_case/mock_controller.rb +5 -4
- data/lib/authlogic/test_case/mock_cookie_jar.rb +47 -3
- data/lib/authlogic/test_case/mock_request.rb +6 -3
- data/lib/authlogic/test_case/rails_request_adapter.rb +3 -2
- data/lib/authlogic/test_case.rb +70 -2
- data/lib/authlogic/version.rb +21 -0
- data/lib/authlogic.rb +51 -49
- data/test/acts_as_authentic_test/base_test.rb +3 -1
- data/test/acts_as_authentic_test/email_test.rb +43 -42
- data/test/acts_as_authentic_test/logged_in_status_test.rb +6 -4
- data/test/acts_as_authentic_test/login_test.rb +77 -80
- data/test/acts_as_authentic_test/magic_columns_test.rb +3 -1
- data/test/acts_as_authentic_test/password_test.rb +51 -37
- data/test/acts_as_authentic_test/perishable_token_test.rb +13 -5
- data/test/acts_as_authentic_test/persistence_token_test.rb +7 -1
- data/test/acts_as_authentic_test/restful_authentication_test.rb +14 -3
- data/test/acts_as_authentic_test/session_maintenance_test.rb +69 -15
- data/test/acts_as_authentic_test/single_access_test.rb +3 -1
- data/test/adapter_test.rb +23 -0
- data/test/authenticates_many_test.rb +3 -1
- data/test/config_test.rb +11 -9
- data/test/crypto_provider_test/aes256_test.rb +3 -1
- data/test/crypto_provider_test/bcrypt_test.rb +3 -1
- data/test/crypto_provider_test/scrypt_test.rb +3 -1
- data/test/crypto_provider_test/sha1_test.rb +3 -1
- data/test/crypto_provider_test/sha256_test.rb +3 -1
- data/test/crypto_provider_test/sha512_test.rb +3 -1
- data/test/crypto_provider_test/wordpress_test.rb +26 -0
- data/test/fixtures/companies.yml +2 -2
- data/test/fixtures/employees.yml +1 -1
- data/test/i18n_test.rb +6 -4
- data/test/libs/affiliate.rb +2 -0
- data/test/libs/company.rb +4 -2
- data/test/libs/employee.rb +2 -0
- data/test/libs/employee_session.rb +2 -0
- data/test/libs/ldaper.rb +2 -0
- data/test/libs/project.rb +2 -0
- data/test/libs/user.rb +2 -0
- data/test/libs/user_session.rb +4 -2
- data/test/random_test.rb +10 -38
- data/test/session_test/activation_test.rb +3 -1
- data/test/session_test/active_record_trickery_test.rb +7 -4
- data/test/session_test/brute_force_protection_test.rb +11 -9
- data/test/session_test/callbacks_test.rb +12 -4
- data/test/session_test/cookies_test.rb +48 -5
- data/test/session_test/existence_test.rb +18 -5
- data/test/session_test/foundation_test.rb +19 -1
- data/test/session_test/http_auth_test.rb +11 -7
- data/test/session_test/id_test.rb +3 -1
- data/test/session_test/klass_test.rb +3 -1
- data/test/session_test/magic_columns_test.rb +13 -13
- data/test/session_test/magic_states_test.rb +3 -1
- data/test/session_test/params_test.rb +13 -5
- data/test/session_test/password_test.rb +10 -8
- data/test/session_test/perishability_test.rb +3 -1
- data/test/session_test/persistence_test.rb +4 -1
- data/test/session_test/scopes_test.rb +16 -8
- data/test/session_test/session_test.rb +6 -4
- data/test/session_test/timeout_test.rb +4 -2
- data/test/session_test/unauthorized_record_test.rb +4 -2
- data/test/session_test/validation_test.rb +3 -1
- data/test/test_helper.rb +84 -45
- metadata +87 -73
- data/.github/ISSUE_TEMPLATE.md +0 -13
- data/test/gemfiles/Gemfile.rails-3.2.x +0 -7
- data/test/gemfiles/Gemfile.rails-4.0.x +0 -7
- data/test/gemfiles/Gemfile.rails-4.1.x +0 -7
- data/test/gemfiles/Gemfile.rails-4.2.x +0 -7
- data/test/gemfiles/Gemfile.rails-5.0.x +0 -6
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,348 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
6
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## 5.0.0
|
9
|
+
|
10
|
+
See https://github.com/binarylogic/authlogic/blob/5-0-stable/CHANGELOG.md
|
11
|
+
|
12
|
+
## Unreleased
|
13
|
+
|
14
|
+
* Breaking Changes
|
15
|
+
* None
|
16
|
+
* Added
|
17
|
+
* None
|
18
|
+
* Fixed
|
19
|
+
* None
|
20
|
+
|
21
|
+
## 4.5.0 (2020-03-23)
|
22
|
+
|
23
|
+
* Breaking Changes
|
24
|
+
* None
|
25
|
+
* Added
|
26
|
+
* [#701](https://github.com/binarylogic/authlogic/pull/701) - Ability to
|
27
|
+
specify None as a valid value to SameSite cookie attribute
|
28
|
+
* Fixed
|
29
|
+
* None
|
30
|
+
|
31
|
+
## 4.4.3 (2019-03-23)
|
32
|
+
|
33
|
+
* Breaking Changes
|
34
|
+
* None
|
35
|
+
* Added
|
36
|
+
* [#660](https://github.com/binarylogic/authlogic/pull/660) -
|
37
|
+
Authlogic::Session::Cookies.encrypt_cookie option
|
38
|
+
* Fixed
|
39
|
+
* Restrict sqlite3 version so tests can run normally
|
40
|
+
|
41
|
+
## 4.4.2 (2018-09-23)
|
42
|
+
|
43
|
+
* Breaking Changes
|
44
|
+
* None
|
45
|
+
* Added
|
46
|
+
* None
|
47
|
+
* Fixed
|
48
|
+
* Improved instructions in deprecation warning for validations
|
49
|
+
|
50
|
+
## 4.4.1 (2018-09-21)
|
51
|
+
|
52
|
+
* Breaking Changes
|
53
|
+
* None
|
54
|
+
* Added
|
55
|
+
* None
|
56
|
+
* Fixed
|
57
|
+
* The methods for disabling Authlogic's "special" validations,
|
58
|
+
eg. `validate_email_field = false` are actually deprecated, but should
|
59
|
+
not produce a deprecation warning.
|
60
|
+
* Only produce deprecation warning when configuring a validation, not when
|
61
|
+
performing actual validation.
|
62
|
+
|
63
|
+
## 4.4.0 (2018-09-21)
|
64
|
+
|
65
|
+
* Breaking Changes
|
66
|
+
* None
|
67
|
+
* Added
|
68
|
+
* None
|
69
|
+
* Fixed
|
70
|
+
* None
|
71
|
+
* Deprecation
|
72
|
+
* [#627](https://github.com/binarylogic/authlogic/pull/627) -
|
73
|
+
Deprecate `authenticates_many` without replacement
|
74
|
+
* [#623](https://github.com/binarylogic/authlogic/pull/623) -
|
75
|
+
Deprecate unnecessary validation features, use normal rails validation
|
76
|
+
instead
|
77
|
+
|
78
|
+
## 4.3.0 (2018-08-12)
|
79
|
+
|
80
|
+
* Breaking Changes
|
81
|
+
* None
|
82
|
+
* Added
|
83
|
+
* None
|
84
|
+
* Fixed
|
85
|
+
* None
|
86
|
+
* Dependencies
|
87
|
+
* Drop support for ruby 2.2, which reached EoL on 2018-06-20
|
88
|
+
|
89
|
+
## 4.2.0 (2018-07-18)
|
90
|
+
|
91
|
+
* Breaking Changes
|
92
|
+
* None
|
93
|
+
* Added
|
94
|
+
* [#611](https://github.com/binarylogic/authlogic/pull/611) - Deprecate
|
95
|
+
AES256, guide users to choose a better crypto provider
|
96
|
+
* Fixed
|
97
|
+
* None
|
98
|
+
|
99
|
+
## 4.1.1 (2018-05-23)
|
100
|
+
|
101
|
+
* Breaking Changes
|
102
|
+
* None
|
103
|
+
* Added
|
104
|
+
* None
|
105
|
+
* Fixed
|
106
|
+
* [#606](https://github.com/binarylogic/authlogic/pull/606) - Interpreter
|
107
|
+
warnings about undefined instance variables
|
108
|
+
|
109
|
+
## 4.1.0 (2018-04-24)
|
110
|
+
|
111
|
+
* Breaking Changes
|
112
|
+
* None
|
113
|
+
* Added
|
114
|
+
* None
|
115
|
+
* Fixed
|
116
|
+
* None
|
117
|
+
* Deprecated
|
118
|
+
* crypto_providers/wordpress.rb, without replacement
|
119
|
+
* restful_authentication, without replacement
|
120
|
+
|
121
|
+
## 4.0.1 (2018-03-20)
|
122
|
+
|
123
|
+
* Breaking Changes
|
124
|
+
* None
|
125
|
+
* Added
|
126
|
+
* None
|
127
|
+
* Fixed
|
128
|
+
* [#590](https://github.com/binarylogic/authlogic/pull/590) -
|
129
|
+
Fix "cannot modify frozen gem" re: ActiveRecord.gem_version
|
130
|
+
|
131
|
+
## 4.0.0 (2018-03-18)
|
132
|
+
|
133
|
+
* Breaking Changes, Major
|
134
|
+
* Drop support for ruby < 2.2
|
135
|
+
* Drop support for rails < 4.2
|
136
|
+
* HTTP Basic Auth is now disabled by default (use allow_http_basic_auth to enable)
|
137
|
+
* 'httponly' and 'secure' cookie options are enabled by default now
|
138
|
+
* maintain_sessions config has been removed. It has been split into 2 new options:
|
139
|
+
log_in_after_create & log_in_after_password_change (@lucasminissale)
|
140
|
+
* [#558](https://github.com/binarylogic/authlogic/pull/558) Passing an
|
141
|
+
ActionController::Parameters into authlogic will now raise an error
|
142
|
+
|
143
|
+
* Breaking Changes, Minor
|
144
|
+
* Methods in Authlogic::Random are now module methods, and are no longer
|
145
|
+
instance methods. Previously, there were both. Do not use Authlogic::Random
|
146
|
+
as a mixin.
|
147
|
+
* Our mutable constants (e.g. arrays, hashes) are now frozen.
|
148
|
+
|
149
|
+
* Added
|
150
|
+
* `Authlogic.gem_version`
|
151
|
+
* [#586](https://github.com/binarylogic/authlogic/pull/586) Support for SameSite cookies
|
152
|
+
* [#581](https://github.com/binarylogic/authlogic/pull/581) Support for rails 5.2
|
153
|
+
* Support for ruby 2.4, specifically openssl gem 2.0
|
154
|
+
* [#98](https://github.com/binarylogic/authlogic/issues/98)
|
155
|
+
I18n for invalid session error message. (@eugenebolshakov)
|
156
|
+
|
157
|
+
* Fixed
|
158
|
+
* Random.friendly_token (used for e.g. perishable token) now returns strings
|
159
|
+
of consistent length, and conforms better to RFC-4648
|
160
|
+
* ensure that login field validation uses correct locale (@sskirby)
|
161
|
+
* add a respond_to_missing? in AbstractAdapter that also checks controller respond_to?
|
162
|
+
* [#561](https://github.com/binarylogic/authlogic/issues/561) authenticates_many now works with scope_cookies:true
|
163
|
+
* Allow tld up to 24 characters per https://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
164
|
+
|
165
|
+
## 3.8.0 2018-02-07
|
166
|
+
|
167
|
+
* Breaking Changes
|
168
|
+
* None
|
169
|
+
|
170
|
+
* Added
|
171
|
+
* [#582](https://github.com/binarylogic/authlogic/pull/582) Support rails 5.2
|
172
|
+
* [#583](https://github.com/binarylogic/authlogic/pull/583) Support openssl gem 2.0
|
173
|
+
|
174
|
+
* Fixed
|
175
|
+
* None
|
176
|
+
|
177
|
+
## 3.7.0 2018-02-07
|
178
|
+
|
179
|
+
* Breaking Changes
|
180
|
+
* None
|
181
|
+
|
182
|
+
* Added
|
183
|
+
* [#580](https://github.com/binarylogic/authlogic/pull/580) Deprecated
|
184
|
+
`ActionController::Parameters`, will be removed in 4.0.0
|
185
|
+
|
186
|
+
* Fixed
|
187
|
+
* None
|
188
|
+
|
189
|
+
## 3.6.1 2017-09-30
|
190
|
+
|
191
|
+
* Breaking Changes
|
192
|
+
* None
|
193
|
+
|
194
|
+
* Added
|
195
|
+
* None
|
196
|
+
|
197
|
+
* Fixed
|
198
|
+
* Allow TLD up to 24 characters per
|
199
|
+
https://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
200
|
+
* [#561](https://github.com/binarylogic/authlogic/issues/561)
|
201
|
+
authenticates_many now works with scope_cookies:true
|
202
|
+
|
203
|
+
## 3.6.0 2017-04-28
|
204
|
+
|
205
|
+
* Breaking Changes
|
206
|
+
* None
|
207
|
+
|
208
|
+
* Added
|
209
|
+
* Support rails 5.1
|
210
|
+
|
211
|
+
* Fixed
|
212
|
+
* ensure that login field validation uses correct locale (@sskirby)
|
213
|
+
|
214
|
+
## 3.5.0 2016-08-29
|
215
|
+
|
216
|
+
* new
|
217
|
+
* Rails 5.0 support! Thanks to all reporters and contributors.
|
218
|
+
|
219
|
+
* changes
|
220
|
+
* increased default minimum password length to 8 (@iainbeeston)
|
221
|
+
* bind parameters in where statement for rails 5 support
|
222
|
+
* change callback for rails 5 support
|
223
|
+
* converts the ActionController::Parameters to a Hash for rails 5 support
|
224
|
+
* check last_request_at_threshold even if last_request_at_update_allowed returns true (@rofreg)
|
225
|
+
|
226
|
+
## 3.4.6 2015
|
227
|
+
|
228
|
+
* changes
|
229
|
+
* add Regex.email_nonascii for validation of emails w/unicode (@rchekaluk)
|
230
|
+
* allow scrypt 2.x (@jaredbeck)
|
231
|
+
|
232
|
+
## 3.4.5 2015-03-01
|
233
|
+
|
234
|
+
* changes
|
235
|
+
* security-hardening fix and cleanup in persistence_token lookup
|
236
|
+
* security-hardening fix in perishable_token lookup (thx @tomekr)
|
237
|
+
|
238
|
+
## 3.4.4 2014-12-23
|
239
|
+
|
240
|
+
* changes
|
241
|
+
* extract rw_config into an Authlogic::Config module
|
242
|
+
* improved the way config changes are made in tests
|
243
|
+
* fix for Rails 4.2 by extending ActiveModel
|
244
|
+
|
245
|
+
## 3.4.3 2014-10-08
|
246
|
+
|
247
|
+
* changes
|
248
|
+
* backfill CHANGELOG
|
249
|
+
* better compatibility with jruby (thx @petergoldstein)
|
250
|
+
* added scrypt as a dependency
|
251
|
+
* cleanup some code (thx @roryokane)
|
252
|
+
* reference 'bcrypt' gem instead of 'bcrypt-ruby' (thx @roryokane)
|
253
|
+
* fixed typo (thx @chamini2)
|
254
|
+
* fixed magic column validations for Rails 4.2 (thx @tom-kuca)
|
255
|
+
|
256
|
+
## 3.4.2 2014-04-28
|
257
|
+
|
258
|
+
* changes
|
259
|
+
* fixed the missing scrypt/bcrypt gem errors introduced in 3.4.1
|
260
|
+
* implemented autoloading for providers
|
261
|
+
* added longer subdomain support in email regex
|
262
|
+
|
263
|
+
## 3.4.1 2014-04-04
|
264
|
+
|
265
|
+
* changes
|
266
|
+
* undid an accidental revert of some code
|
267
|
+
|
268
|
+
## 3.4.0 2014-03-03
|
269
|
+
|
270
|
+
* Breaking Changes
|
271
|
+
* made scrypt the default crypto provider from SHA512
|
272
|
+
(https://github.com/binarylogic/authlogic#upgrading-to-authlogic-340)
|
273
|
+
See UPGRADING.md.
|
274
|
+
|
275
|
+
* Added
|
276
|
+
* officially support rails 4 (still supporting rails 3)
|
277
|
+
* added cookie signing
|
278
|
+
* added request store for better concurency for threaded environments
|
279
|
+
* added a rack adapter for Rack middleware support
|
280
|
+
|
281
|
+
* Fixed
|
282
|
+
* ditched appraisal
|
283
|
+
* improved find_with_case default performance
|
284
|
+
* added travis ci support
|
285
|
+
|
286
|
+
## 3.3.0 2014-04-04
|
287
|
+
|
288
|
+
* changes
|
289
|
+
* added safeguard against a sqli that was also fixed in rails 3.2.10/3.1.9/3.0.18
|
290
|
+
* imposed the bcrypt gem's mincost
|
291
|
+
* removed shoulda macros
|
292
|
+
|
293
|
+
## 3.2.0 2012-12-07
|
294
|
+
|
295
|
+
* new
|
296
|
+
* scrypt support
|
297
|
+
|
298
|
+
* changes
|
299
|
+
* moved back to LOWER for find_with_case ci lookups
|
300
|
+
|
301
|
+
## 3.1.3 2012-06-13
|
302
|
+
|
303
|
+
* changes
|
304
|
+
* removed jeweler
|
305
|
+
|
306
|
+
## 3.1.2 2012-06-01
|
307
|
+
|
308
|
+
* changes
|
309
|
+
* mostly test fixes
|
310
|
+
|
311
|
+
## 3.1.1 2012-06-01
|
312
|
+
|
313
|
+
* changes
|
314
|
+
* mostly doc fixes
|
315
|
+
|
316
|
+
## 3.1.0 2011-10-19
|
317
|
+
|
318
|
+
* changes
|
319
|
+
* mostly small bug fixes
|
320
|
+
|
321
|
+
## 3.0.3 2011-05-17
|
322
|
+
|
323
|
+
* changes
|
324
|
+
* rails 3.1 support
|
325
|
+
|
326
|
+
* new
|
327
|
+
* http auth support
|
328
|
+
|
329
|
+
## 3.0.2 2011-04-30
|
330
|
+
|
331
|
+
* changes
|
332
|
+
* doc fixes
|
333
|
+
|
334
|
+
## 3.0.1 2011-04-30
|
335
|
+
|
336
|
+
* changes
|
337
|
+
* switch from LOWER to LIKE for find_with_case ci lookups
|
338
|
+
|
339
|
+
## 3.0.0 2011-04-30
|
340
|
+
|
341
|
+
* new
|
342
|
+
* ssl cookie support
|
343
|
+
* httponly cookie support
|
344
|
+
* added a session generator
|
345
|
+
|
346
|
+
* changes
|
347
|
+
* rails 3 support
|
348
|
+
* ruby 1.9.2 support
|
data/CONTRIBUTING.md
CHANGED
@@ -16,7 +16,7 @@ We will review security issues promptly.
|
|
16
16
|
|
17
17
|
### Non-Security Issues
|
18
18
|
|
19
|
-
Please use github issues only for bug reports and feature
|
19
|
+
Please use github issues only for bug reports and feature suggestions.
|
20
20
|
|
21
21
|
### Usage Questions
|
22
22
|
|
@@ -25,13 +25,30 @@ Please ask usage questions on
|
|
25
25
|
|
26
26
|
## Development
|
27
27
|
|
28
|
+
Most local development should be done using the oldest supported version of
|
29
|
+
ruby. See `required_ruby_version` in the gemspec.
|
30
|
+
|
28
31
|
### Testing
|
29
32
|
|
30
|
-
Tests can be
|
33
|
+
Tests can be run against different versions of Rails like so:
|
34
|
+
|
35
|
+
```
|
36
|
+
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle install
|
37
|
+
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rake
|
38
|
+
```
|
39
|
+
|
40
|
+
To run a single test:
|
31
41
|
|
32
42
|
```
|
33
|
-
BUNDLE_GEMFILE=
|
34
|
-
|
43
|
+
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x \
|
44
|
+
bundle exec ruby -I test path/to/test.rb
|
45
|
+
```
|
46
|
+
|
47
|
+
Bundler can be omitted, and the latest installed version of a gem dependency
|
48
|
+
will be used. This is only suitable for certain unit tests.
|
49
|
+
|
50
|
+
```
|
51
|
+
ruby –I test path/to/test.rb
|
35
52
|
```
|
36
53
|
|
37
54
|
### Linting
|
@@ -40,21 +57,35 @@ Running `rake` also runs a linter, rubocop. Contributions must pass both
|
|
40
57
|
the linter and the tests. The linter can be run on its own.
|
41
58
|
|
42
59
|
```
|
43
|
-
BUNDLE_GEMFILE=
|
60
|
+
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rubocop
|
44
61
|
```
|
45
62
|
|
46
63
|
To run the tests without linting, use `rake test`.
|
47
64
|
|
48
65
|
```
|
49
|
-
BUNDLE_GEMFILE=
|
66
|
+
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rake test
|
50
67
|
```
|
51
68
|
|
52
|
-
###
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
69
|
+
### Version Control Branches
|
70
|
+
|
71
|
+
We've been trying to follow the rails way, stable branches, but have been
|
72
|
+
inconsistent. We should have one branche for each minor version, named like
|
73
|
+
`4-3-stable`. Releases should be done on those branches, not in master. So,
|
74
|
+
the "stable" branches should be the only branches with release tags.
|
75
|
+
|
76
|
+
### A normal release (no backport)
|
77
|
+
|
78
|
+
1. git checkout 4-3-stable # the latest "stable" branch (see above)
|
79
|
+
1. Update version number in lib/authlogic/version.rb
|
80
|
+
1. In the changelog,
|
81
|
+
- Add release date to entry
|
82
|
+
- Add a new "Unreleased" section at top
|
83
|
+
1. In the readme,
|
84
|
+
- Update version number in the docs table at the top
|
85
|
+
- For non-patch versions, update the compatibility table
|
86
|
+
1. Commit with message like "Release 4.3.0"
|
87
|
+
1. git tag -a -m "v4.3.0" "v4.3.0"
|
88
|
+
1. git push --tags origin 4-3-stable # or whatever branch (see above)
|
89
|
+
1. CI should pass
|
59
90
|
1. gem build authlogic.gemspec
|
60
|
-
1. gem push authlogic-3.
|
91
|
+
1. gem push authlogic-4.3.0
|