omniauth-identity 3.1.4 → 3.1.5
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +116 -4
- data/CITATION.cff +20 -0
- data/CODE_OF_CONDUCT.md +3 -4
- data/CONTRIBUTING.md +117 -43
- data/FUNDING.md +66 -0
- data/README.md +285 -122
- data/REEK +0 -0
- data/RUBOCOP.md +71 -0
- data/SECURITY.md +6 -18
- data/lib/omniauth/identity/model.rb +29 -7
- data/lib/omniauth/identity/models/active_record.rb +46 -2
- data/lib/omniauth/identity/models/couch_potato.rb +56 -4
- data/lib/omniauth/identity/models/mongoid.rb +47 -2
- data/lib/omniauth/identity/models/nobrainer.rb +47 -3
- data/lib/omniauth/identity/models/rom.rb +151 -0
- data/lib/omniauth/identity/models/sequel.rb +71 -9
- data/lib/omniauth/identity/secure_password.rb +33 -0
- data/lib/omniauth/identity/version.rb +5 -1
- data/lib/omniauth/identity.rb +30 -0
- data/lib/omniauth/strategies/identity.rb +127 -6
- data.tar.gz.sig +0 -0
- metadata +150 -33
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eab43fa354af27c298ecb9afdd400e13eecd36e2d456489ea4dce6ffc33ed7b6
|
4
|
+
data.tar.gz: 2ea1d0249b3f4d154411698273969794b45afe734a91d3a24c8fa5ed819d4003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b9b26f6fcbbdeec62c3d63d298e9b7491e6e2333d23cea7d275f8fdccc6f11d8a69fcd157bba7af57910d6bedb4201c96d064f600b800a05a99c5b180ed4840
|
7
|
+
data.tar.gz: 886538d3ede5ce008c3fe5014fbb407516fe0097e6a69b5453971ce955a5dfd79ac97226780ec8f366e7be0c6b11ae6d7ed4d701585d2fec08f58c3055c20c00
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,56 +1,101 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
3
|
+
[![SemVer 2.0.0][📌semver-img]][📌semver] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog]
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
All notable changes to this project will be documented in this file.
|
6
|
+
|
7
|
+
The format is based on [Keep a Changelog][📗keep-changelog],
|
8
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
9
|
+
and [yes][📌major-versions-not-sacred], platform and engine support are part of the [public API][📌semver-breaking].
|
10
|
+
Please file a bug if you notice a violation of semantic versioning.
|
11
|
+
|
12
|
+
[📌semver]: https://semver.org/spec/v2.0.0.html
|
13
|
+
[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-FFDD67.svg?style=flat
|
14
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
15
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
16
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
17
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
|
7
18
|
|
8
19
|
## [Unreleased]
|
20
|
+
|
9
21
|
### Added
|
22
|
+
|
10
23
|
### Changed
|
24
|
+
|
11
25
|
### Deprecated
|
26
|
+
|
12
27
|
### Removed
|
28
|
+
|
13
29
|
### Fixed
|
30
|
+
|
14
31
|
### Security
|
15
32
|
|
33
|
+
## [3.1.5] - 2025-10-13
|
34
|
+
|
35
|
+
- TAG: [v3.1.5][3.1.5t]
|
36
|
+
- COVERAGE: 93.58% -- 437/467 lines in 14 files
|
37
|
+
- BRANCH COVERAGE: 81.00% -- 81/100 branches in 14 files
|
38
|
+
- 92.39% documented
|
39
|
+
|
40
|
+
### Added
|
41
|
+
|
42
|
+
- Adapter support for Hanami and ROM
|
43
|
+
- Complete YARD documentation
|
44
|
+
- kettle-dev for easier maintenance & dev tooling
|
45
|
+
|
16
46
|
## [3.1.4] - 2025-07-28
|
47
|
+
|
17
48
|
- TAG: [v3.1.4][3.1.4t]
|
18
49
|
- COVERAGE: 92.06% -- 348/378 lines in 15 files
|
19
50
|
- BRANCH COVERAGE: 79.49% -- 62/78 branches in 15 files
|
20
51
|
- 44.44% documented
|
52
|
+
|
21
53
|
# Added
|
54
|
+
|
22
55
|
- More documentation
|
23
56
|
- Tracking maintainability and coverage with QLTY.sh
|
24
57
|
- Documentation site
|
25
58
|
- https://omniauth-identity.galtzo.com
|
26
59
|
- Test against bson v5.1.1
|
27
60
|
- Test against locked and unlocked, runtime and development, dependencies
|
61
|
+
|
28
62
|
### Changed
|
63
|
+
|
29
64
|
- gemspec metadata
|
30
65
|
- Test against latest bundler
|
31
66
|
- Develop on ruby@3.4.5
|
32
67
|
- Switch to [Appraisal2](https://github.com/appraisal-rb/appraisal2)
|
33
68
|
|
34
69
|
## [3.1.3] - 2025-06-08
|
70
|
+
|
35
71
|
- TAG: [v3.1.3][3.1.3t]
|
36
72
|
- COVERAGE: 92.06% -- 348/378 lines in 15 files
|
37
73
|
- BRANCH COVERAGE: 79.49% -- 62/78 branches in 15 files
|
38
74
|
- 44.44% documented
|
75
|
+
|
39
76
|
### Added
|
77
|
+
|
40
78
|
- More documentation by @pboling
|
41
79
|
- Expanded test suite, covering many more points of the dependency matrix by @pboling
|
42
80
|
- Test workflows with latest dependencies and more platform and dep HEADs
|
81
|
+
|
43
82
|
### Changed
|
83
|
+
|
44
84
|
- Updated Code of Conduct to Contributor Covenant v2.1
|
85
|
+
|
45
86
|
### Fixed
|
87
|
+
|
46
88
|
- Set `SKIP_GEM_SIGNING` in env to allow `gem build` without cryptographic signing requirement by @pboling
|
47
89
|
- Useful for linux distros whose package managers sign packages independently
|
48
90
|
|
49
91
|
## [3.1.2] - 2025-05-07
|
92
|
+
|
50
93
|
- TAG: [v3.1.2][3.1.2t]
|
51
94
|
- COVERAGE: 92.02% -- 346/376 lines in 15 files
|
52
95
|
- BRANCH COVERAGE: 79.49% -- 62/78 branches in 15 files
|
96
|
+
|
53
97
|
### Added
|
98
|
+
|
54
99
|
- 20 year signing cert expires 2045-04-29 by @pboling
|
55
100
|
- Added CITATION.cff by @pboling
|
56
101
|
- devcontainer for easier maintenance by @pboling
|
@@ -58,38 +103,52 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
58
103
|
- Greatly improved spec suite and CI config by @pboling
|
59
104
|
- Testing against JRuby 9.2, 9.3, 9.4, 10.0, and head
|
60
105
|
- Testing against many more combinations of Databases, ORMs, Rails, and Ruby versions
|
106
|
+
|
61
107
|
### Changed
|
108
|
+
|
62
109
|
- Upgraded Code of Conduct based on Contributor Covenant v2.1 by @pboling
|
63
110
|
|
64
111
|
## [3.1.1] - 2024-11-18
|
112
|
+
|
65
113
|
- TAG: [v3.1.1][3.1.1t]
|
66
114
|
- COVERAGE: 92.00% -- 345/375 lines in 15 files
|
67
115
|
- BRANCH COVERAGE: 80.26% -- 61/76 branches in 15 files
|
68
116
|
- 44.44% documented
|
117
|
+
|
69
118
|
### Added
|
119
|
+
|
70
120
|
- [PR 130][130] Add SECURITY.md policy by @pboling
|
71
121
|
- [PR 130][130] Add Maintainer contact email by @pboling
|
122
|
+
|
72
123
|
### Changed
|
124
|
+
|
73
125
|
- [PR 130][130] Require MFA to publish to RubyGems.org by @pboling
|
74
126
|
|
75
127
|
[130]: https://github.com/omniauth/omniauth-identity/pull/130
|
76
128
|
|
77
129
|
## [3.1.0] - 2024-11-18
|
130
|
+
|
78
131
|
- TAG: [v3.1.0][3.1.0t]
|
79
132
|
- COVERAGE: 91.98% -- 344/374 lines in 15 files
|
80
133
|
- BRANCH COVERAGE: 80.26% -- 61/76 branches in 15 files
|
81
134
|
- 44.44% documented
|
135
|
+
|
82
136
|
### Added
|
137
|
+
|
83
138
|
- [PR #123][123] Improve readability in #identity method of OmniAuth::Strategies::Identity by @Xeragus
|
84
139
|
- [PR #124][124] Modernized gem structure, and updated dependencies for development by @pboling
|
85
140
|
- Gem releases are now cryptographically signed
|
86
141
|
- All ORM adapters (except NoBrainer) are tested in CI
|
87
142
|
- [PR #127][127] Improved documentation by @pboling
|
88
143
|
- [PR #128][128] Instructions for contributing by @pboling
|
144
|
+
|
89
145
|
### Changed
|
146
|
+
|
90
147
|
- Deprecate `require 'omniauth/identity'` by @pboling
|
91
148
|
- in favor of `require 'omniauth-identity'` (matching the gem name)
|
149
|
+
|
92
150
|
### Fixed
|
151
|
+
|
93
152
|
- [PR #120][120] Fix: handling of SCRIPT_NAME for registration_path by @btalbot
|
94
153
|
- [PR #122][122] Compatibility with rack v3.1+: use `req.params[]` instead of `req[]` by @emon
|
95
154
|
- See: https://github.com/rack/rack/pull/2183
|
@@ -102,34 +161,49 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
102
161
|
[120]: https://github.com/omniauth/omniauth-identity/pull/120
|
103
162
|
|
104
163
|
## [3.0.9] - 2021-06-16
|
164
|
+
|
105
165
|
- TAG: [v3.0.9][3.0.9t]
|
166
|
+
|
106
167
|
### Fixed
|
168
|
+
|
107
169
|
- \[Sequel\] Fixes loading the Sequel adapter, issue reported as [#112](https://github.com/omniauth/omniauth-identity/issues/112)
|
170
|
+
|
108
171
|
### Added
|
172
|
+
|
109
173
|
- 📝 Document the Database adapters and drivers the gem currently works with
|
110
174
|
|
111
175
|
## [3.0.8] - 2021-03-24
|
176
|
+
|
112
177
|
- TAG: [v3.0.8][3.0.8t]
|
178
|
+
|
113
179
|
### Fixed
|
180
|
+
|
114
181
|
- \[Model\] Fixes 2 issues raised in a comment on PR [#108](https://github.com/omniauth/omniauth-identity/pull/108#issuecomment-804456604)
|
115
182
|
- When `options[:on_validation]` is set `new`/`save`/`persisted?` logic is used.
|
116
183
|
- When `options[:on_validation]` is not set `create`/`persisted?` logic is used.
|
117
184
|
|
118
185
|
## [3.0.7] - 2021-03-23
|
186
|
+
|
119
187
|
- TAG: [v3.0.7][3.0.7t]
|
188
|
+
|
120
189
|
### Fixed
|
190
|
+
|
121
191
|
- \[ActiveRecord\] Fixed [#110](https://github.com/omniauth/omniauth-identity/issues/110) which prevented `OmniAuth::Identity::Models::ActiveRecord`-based records from saving.
|
122
192
|
- \[CouchPotato\] Fixed `OmniAuth::Identity::Models::CouchPotato`'s `#save`.
|
123
193
|
- \[Sequel\] Fixed `OmniAuth::Identity::Models::Sequel`'s `#save`.
|
124
194
|
- \[Model\] Only define `::create`, `#save`, and `#persisted?` when not already defined.
|
125
195
|
- \[Model\] Restore original `info` functionality which set `name` based on `first_name`, `last_name`, or `nickname`
|
196
|
+
|
126
197
|
### Changed
|
198
|
+
|
127
199
|
- Upgraded to a newer `OmniAuth::Identity::SecurePassword` ripped from [Rails 6-1-stable](https://github.com/rails/rails/blob/6-1-stable/activemodel/lib/active_model/secure_password.rb)
|
128
200
|
- Aeons ago the original was ripped from Rails 3.1, and frozen in time.
|
129
201
|
While writing specs, it was discovered to be incompatible with this gem's Sequel adapter.
|
130
202
|
- Specs validate that the new version does work.
|
131
203
|
In any case, the ripped version is only used when the `has_secure_password` macro is not yet defined in the class.
|
204
|
+
|
132
205
|
### Added
|
206
|
+
|
133
207
|
- New specs to cover real use cases and implementations of each ORM model adapter that ships with the gem:
|
134
208
|
- ActiveRecord (Polyglot - Many Relational Databases)
|
135
209
|
- Sequel (Polyglot - Many Relational Databases)
|
@@ -138,10 +212,15 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
138
212
|
- NoBrainer (RethinkDB)
|
139
213
|
|
140
214
|
## [3.0.6] - 2021-03-20
|
215
|
+
|
141
216
|
- TAG: [v3.0.6][3.0.6t]
|
217
|
+
|
142
218
|
### Fixed
|
219
|
+
|
143
220
|
- Fix breaking changes introduced by [#108](https://github.com/omniauth/omniauth-identity/pull/108) which prevented `:on_validation` from firing
|
221
|
+
|
144
222
|
### Added
|
223
|
+
|
145
224
|
- New (or finally documented) options:
|
146
225
|
- `:create_identity_link_text` defaults to `'Create an Identity'`
|
147
226
|
- `:registration_failure_message` defaults to `'One or more fields were invalid'`
|
@@ -150,33 +229,49 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
150
229
|
- `:registration_form_title` defaults to `'Register Identity'`
|
151
230
|
|
152
231
|
## [3.0.5] - 2021-03-19
|
232
|
+
|
153
233
|
- TAG: [v3.0.5][3.0.5t]
|
234
|
+
|
154
235
|
### Fixed
|
236
|
+
|
155
237
|
- Fix breaking changes introduced by [#86's](https://github.com/omniauth/omniauth-identity/pull/86) introduction of `:on_validation`
|
238
|
+
|
156
239
|
### Added
|
240
|
+
|
157
241
|
- Define `#save`, `#persisted?` and `::create` on `Omniauth::Identity::Model`
|
158
242
|
- Add `@since` YARD tags to interface methods
|
159
243
|
- Refactor `Omniauth::Strategies::Identity.registration_phase` to support `Omniauth::Identity::Model`-inheriting classes that do not define `#save`.
|
160
244
|
- This support will be dropped in v4.0.
|
161
245
|
|
162
246
|
## [3.0.4] - 2021-02-14
|
247
|
+
|
163
248
|
- TAG: [v3.0.4][3.0.4t]
|
249
|
+
|
164
250
|
### Added
|
251
|
+
|
165
252
|
- Add support for [sequel ORM](http://sequel.jeremyevans.net/)
|
166
253
|
|
167
254
|
## [3.0.3] - 2021-02-14
|
255
|
+
|
168
256
|
- TAG: [v3.0.3][3.0.3t]
|
257
|
+
|
169
258
|
### Added
|
259
|
+
|
170
260
|
- Add option `:on_validation`, which can be used to add a Captcha
|
171
261
|
- See [example here](https://github.com/omniauth/omniauth-identity/pull/86#issue-63225122)
|
172
262
|
- Add support for nobrainer, an ORM for RethinkDB
|
173
263
|
- Validation error message on invalid registration form submission
|
264
|
+
|
174
265
|
### Removed
|
266
|
+
|
175
267
|
- ruby-head build... simply too slow
|
176
268
|
|
177
269
|
## [3.0.2] - 2021-02-14
|
270
|
+
|
178
271
|
- TAG: [v3.0.2][3.0.2t]
|
272
|
+
|
179
273
|
### Fixed
|
274
|
+
|
180
275
|
- Github Actions CI Build for Ruby 2.4, 3.0 and ruby-head
|
181
276
|
- Updated copyright
|
182
277
|
- Code style cleanup
|
@@ -184,13 +279,19 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
184
279
|
- Updated Readme
|
185
280
|
|
186
281
|
## [3.0.1] - 2021-02-14
|
282
|
+
|
187
283
|
- TAG: [v3.0.1][3.0.1t]
|
284
|
+
|
188
285
|
### Fixed
|
286
|
+
|
189
287
|
- Github Actions CI Build for various Rubies
|
190
288
|
|
191
289
|
## [3.0.0] - 2021-02-13
|
290
|
+
|
192
291
|
- TAG: [v3.0.0][3.0.0t]
|
292
|
+
|
193
293
|
### Added
|
294
|
+
|
194
295
|
- Compatibility with Ruby 3
|
195
296
|
- Add option `:enable_login` to bypass OmniAuth disabling of GET method (default `true`)
|
196
297
|
- NOTE: This restores compatibility between this gem and the current, core, omniauth gem!
|
@@ -201,17 +302,24 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
201
302
|
- Minimum Ruby version = 2.4
|
202
303
|
- Automatically adds "provider" => "identity" when "provider" column is detected
|
203
304
|
- Documentation in README.md
|
305
|
+
|
204
306
|
### Removed
|
307
|
+
|
205
308
|
- Support for Rubies < 2.4
|
206
309
|
- Support for DataMapper, which died long ago.
|
207
310
|
- Unwanted git artifacts
|
208
311
|
|
209
312
|
## [2.0.0] - 2020-09-01
|
313
|
+
|
210
314
|
- TAG: [v2.0.0][2.0.0t]
|
315
|
+
|
211
316
|
### Added
|
317
|
+
|
212
318
|
- CHANGELOG to maintain a history of changes.
|
213
319
|
- Include mongoid-rspec gem.
|
320
|
+
|
214
321
|
### Changed
|
322
|
+
|
215
323
|
- Fix failing Specs
|
216
324
|
- Update Spec syntax to RSpec 3
|
217
325
|
- Fix deprecation Warnings
|
@@ -220,11 +328,15 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
220
328
|
- Dependency version limits so that the most up-to-date gem dependencies are used. (rspec 3+, mongo 2+, mongoid 7+, rake 13+, rack 2+, json 2+)
|
221
329
|
- Updated copyright information.
|
222
330
|
- Updated MongoMapper section of README to reflect its discontinued support.
|
331
|
+
|
223
332
|
### Removed
|
333
|
+
|
224
334
|
- Gemfile.lock file
|
225
335
|
- MongoMapper support; unable to satisfy dependencies of both MongoMapper and Mongoid now that MongoMapper is no longer actively maintained.
|
226
336
|
|
227
|
-
[Unreleased]: https://github.com/omniauth/omniauth-identity/compare/v3.1.
|
337
|
+
[Unreleased]: https://github.com/omniauth/omniauth-identity/compare/v3.1.5...HEAD
|
338
|
+
[3.1.5]: https://github.com/omniauth/omniauth-identity/compare/v3.1.4...v3.1.5
|
339
|
+
[3.1.5t]: https://github.com/omniauth/omniauth-identity/releases/tag/v3.1.5
|
228
340
|
[3.1.4]: https://github.com/omniauth/omniauth-identity/compare/v3.1.3...v3.1.4
|
229
341
|
[3.1.4t]: https://github.com/omniauth/omniauth-identity/tags/v3.1.4
|
230
342
|
[3.1.3]: https://github.com/omniauth/omniauth-identity/compare/v3.1.2...v3.1.3
|
data/CITATION.cff
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
cff-version: 1.2.0
|
2
|
+
title: omniauth-identity
|
3
|
+
message: >-
|
4
|
+
If you use this work and you want to cite it,
|
5
|
+
then you can use the metadata from this file.
|
6
|
+
type: software
|
7
|
+
authors:
|
8
|
+
- given-names: Peter Hurn
|
9
|
+
family-names: Boling
|
10
|
+
email: peter@railsbling.com
|
11
|
+
affiliation: railsbling.com
|
12
|
+
orcid: 'https://orcid.org/0009-0008-8519-441X'
|
13
|
+
identifiers:
|
14
|
+
- type: url
|
15
|
+
value: 'https://github.com/omniauth/omniauth-identity'
|
16
|
+
description: omniauth-identity
|
17
|
+
repository-code: 'https://github.com/omniauth/omniauth-identity'
|
18
|
+
abstract: >-
|
19
|
+
omniauth-identity
|
20
|
+
license: See license file
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
# Contributor Covenant Code of Conduct
|
3
2
|
|
4
3
|
## Our Pledge
|
@@ -61,7 +60,7 @@ representative at an online or offline event.
|
|
61
60
|
|
62
61
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
63
62
|
reported to the community leaders responsible for enforcement at
|
64
|
-
[![Contact
|
63
|
+
[![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact].
|
65
64
|
All complaints will be reviewed and investigated promptly and fairly.
|
66
65
|
|
67
66
|
All community leaders are obligated to respect the privacy and security of the
|
@@ -131,5 +130,5 @@ For answers to common questions about this code of conduct, see the FAQ at
|
|
131
130
|
[Mozilla CoC]: https://github.com/mozilla/diversity
|
132
131
|
[FAQ]: https://www.contributor-covenant.org/faq
|
133
132
|
[translations]: https://www.contributor-covenant.org/translations
|
134
|
-
[🚂
|
135
|
-
[🚂
|
133
|
+
[🚂maint-contact]: http://www.railsbling.com/contact
|
134
|
+
[🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
|
data/CONTRIBUTING.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
|
-
Bug reports and pull requests are welcome on
|
3
|
+
Bug reports and pull requests are welcome on [CodeBerg][📜src-cb], [GitLab][📜src-gl], or [GitHub][📜src-gh].
|
4
4
|
This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
|
5
5
|
the [code of conduct][🤝conduct].
|
6
6
|
|
7
7
|
To submit a patch, please fork the project, create a patch with tests, and send a pull request.
|
8
8
|
|
9
|
-
Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog].
|
9
|
+
Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
|
10
10
|
|
11
11
|
## Help out!
|
12
12
|
|
@@ -22,49 +22,82 @@ Follow these instructions:
|
|
22
22
|
6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
|
23
23
|
7. Create new Pull Request.
|
24
24
|
|
25
|
-
##
|
25
|
+
## Executables vs Rake tasks
|
26
26
|
|
27
|
-
|
27
|
+
Executables shipped by omniauth-identity can be used with or without generating the binstubs.
|
28
|
+
They will work when omniauth-identity is installed globally (i.e., `gem install omniauth-identity`) and do not require that omniauth-identity be in your bundle.
|
28
29
|
|
29
|
-
|
30
|
+
- kettle-changelog
|
31
|
+
- kettle-commit-msg
|
32
|
+
- omniauth-identity-setup
|
33
|
+
- kettle-dvcs
|
34
|
+
- kettle-pre-release
|
35
|
+
- kettle-readme-backers
|
36
|
+
- kettle-release
|
30
37
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
However, the rake tasks provided by omniauth-identity do require omniauth-identity to be added as a development dependency and loaded in your Rakefile.
|
39
|
+
See the full list of rake tasks in head of Rakefile
|
40
|
+
|
41
|
+
**Gemfile**
|
42
|
+
```ruby
|
43
|
+
group :development do
|
44
|
+
gem "omniauth-identity", require: false
|
45
|
+
end
|
35
46
|
```
|
36
47
|
|
37
|
-
|
48
|
+
**Rakefile**
|
49
|
+
```ruby
|
50
|
+
# Rakefile
|
51
|
+
require "omniauth/identity"
|
52
|
+
```
|
38
53
|
|
39
|
-
|
54
|
+
## Environment Variables for Local Development
|
40
55
|
|
41
|
-
|
56
|
+
Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
|
42
57
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
which **do not** have `gemfiles/*.gemfile.lock` committed.
|
58
|
+
General/runtime
|
59
|
+
- DEBUG: Enable extra internal logging for this library (default: false)
|
60
|
+
- REQUIRE_BENCH: Enable `require_bench` to profile requires (default: false)
|
61
|
+
- CI: When set to true, adjusts default rake tasks toward CI behavior
|
48
62
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
Coverage (kettle-soup-cover / SimpleCov)
|
64
|
+
- K_SOUP_COV_DO: Enable coverage collection (default: true in .envrc)
|
65
|
+
- K_SOUP_COV_FORMATTERS: Comma-separated list of formatters (html, xml, rcov, lcov, json, tty)
|
66
|
+
- K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
|
67
|
+
- K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
|
68
|
+
- K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
|
69
|
+
- K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
|
70
|
+
- K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
|
71
|
+
- MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
|
72
|
+
Tip: When running a single spec file locally, you may want `K_SOUP_COV_MIN_HARD=false` to avoid failing thresholds for a partial run.
|
73
|
+
|
74
|
+
GitHub API and CI helpers
|
75
|
+
- GITHUB_TOKEN or GH_TOKEN: Token used by `ci:act` and release workflow checks to query GitHub Actions status at higher rate limits
|
76
|
+
|
77
|
+
Releasing and signing
|
78
|
+
- SKIP_GEM_SIGNING: If set, skip gem signing during build/release
|
79
|
+
- GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
|
80
|
+
- SOURCE_DATE_EPOCH: Reproducible build timestamp. `kettle-release` will set this automatically for the session.
|
81
|
+
|
82
|
+
Git hooks and commit message helpers (exe/kettle-commit-msg)
|
83
|
+
- GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
|
84
|
+
- GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
|
85
|
+
- GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
|
86
|
+
- GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
|
87
|
+
|
88
|
+
For a quick starting point, this repository’s `.envrc` shows sane defaults, and `.env.local` can override them locally.
|
89
|
+
|
90
|
+
## Appraisals
|
91
|
+
|
92
|
+
From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
|
93
|
+
They are created and updated with the commands:
|
94
|
+
|
95
|
+
```console
|
96
|
+
bin/rake appraisal:update
|
66
97
|
```
|
67
98
|
|
99
|
+
When adding an appraisal to CI, check the [runner tool cache][🏃♂️runner-tool-cache] to see which runner to use.
|
100
|
+
|
68
101
|
## The Reek List
|
69
102
|
|
70
103
|
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
@@ -139,6 +172,13 @@ bundle exec rspec spec_orms/mongoid_spec.rb
|
|
139
172
|
bundle exec rspec spec_ignored/nobrainer_spec.rb
|
140
173
|
```
|
141
174
|
|
175
|
+
### Spec organization (required)
|
176
|
+
|
177
|
+
- One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/omniauth/identity/*.rb` -> `spec/omniauth/identity/*_spec.rb`.
|
178
|
+
- Never add a second spec file for the same class/module. Examples of disallowed names: `*_more_spec.rb`, `*_extra_spec.rb`, `*_status_spec.rb`, or any other suffix that still targets the same class. If you find yourself wanting a second file, merge those examples into the canonical spec file for that class/module.
|
179
|
+
- Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
|
180
|
+
- Migration note: If a duplicate spec file exists, move all examples into the canonical file and delete the duplicate. Do not leave stubs or empty files behind.
|
181
|
+
|
142
182
|
## Lint It
|
143
183
|
|
144
184
|
Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
|
@@ -153,12 +193,29 @@ Or just run the linter.
|
|
153
193
|
bundle exec rake rubocop_gradual:autocorrect
|
154
194
|
```
|
155
195
|
|
196
|
+
For more detailed information about using RuboCop in this project, please see the [RUBOCOP.md](RUBOCOP.md) guide. This project uses `rubocop_gradual` instead of vanilla RuboCop, which requires specific commands for checking violations.
|
197
|
+
|
198
|
+
### Important: Do not add inline RuboCop disables
|
199
|
+
|
200
|
+
Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead:
|
201
|
+
|
202
|
+
- Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
|
203
|
+
- When a violation is temporary and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
|
204
|
+
- `bundle exec rake rubocop_gradual:autocorrect` (preferred)
|
205
|
+
- `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
|
206
|
+
|
207
|
+
As a general rule, fix style issues rather than ignoring them. For example, our specs should follow RSpec conventions like using `described_class` for the class under test.
|
208
|
+
|
156
209
|
## Contributors
|
157
210
|
|
211
|
+
Your picture could be here!
|
212
|
+
|
158
213
|
[![Contributors][🖐contributors-img]][🖐contributors]
|
159
214
|
|
160
215
|
Made with [contributors-img][🖐contrib-rocks].
|
161
216
|
|
217
|
+
Also see GitLab Contributors: [https://gitlab.com/omniauth/omniauth-identity/-/graphs/main][🚎contributors-gl]
|
218
|
+
|
162
219
|
## For Maintainers
|
163
220
|
|
164
221
|
### One-time, Per-maintainer, Setup
|
@@ -166,13 +223,21 @@ Made with [contributors-img][🖐contrib-rocks].
|
|
166
223
|
**IMPORTANT**: To sign a build,
|
167
224
|
a public key for signing gems will need to be picked up by the line in the
|
168
225
|
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
|
169
|
-
All releases
|
226
|
+
All releases are signed releases.
|
170
227
|
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
|
171
228
|
|
172
229
|
NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
|
173
230
|
|
174
231
|
### To release a new version:
|
175
232
|
|
233
|
+
#### Automated process
|
234
|
+
|
235
|
+
1. Update version.rb to contain the correct version-to-be-released.
|
236
|
+
2. Run `bundle exec kettle-changelog`.
|
237
|
+
3. Run `bundle exec kettle-release`.
|
238
|
+
|
239
|
+
#### Manual process
|
240
|
+
|
176
241
|
1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
|
177
242
|
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
|
178
243
|
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
@@ -182,7 +247,8 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
182
247
|
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
|
183
248
|
7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
|
184
249
|
8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
|
185
|
-
9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp
|
250
|
+
9. Optional for older Bundler (< 2.7.0): Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use the same timestamp and generate the same checksums
|
251
|
+
- If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
|
186
252
|
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
|
187
253
|
- If the echo above has no output, then it didn't work.
|
188
254
|
- Note: `zsh/datetime` module is needed, if running `zsh`.
|
@@ -192,20 +258,28 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
192
258
|
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
|
193
259
|
[gem][💎stone_checksums].
|
194
260
|
- The script automatically commits but does not push the checksums
|
195
|
-
12.
|
196
|
-
|
197
|
-
|
198
|
-
|
261
|
+
12. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
|
262
|
+
- `sha256sum pkg/<gem name>-<version>.gem`
|
263
|
+
13. Run `bundle exec rake release` which will create a git tag for the version,
|
264
|
+
push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
|
265
|
+
|
266
|
+
[📜src-gl]: https://gitlab.com/omniauth/omniauth-identity/
|
267
|
+
[📜src-cb]: https://codeberg.org/omniauth/omniauth-identity
|
268
|
+
[📜src-gh]: https://github.com/omniauth/omniauth-identity
|
199
269
|
[🧪build]: https://github.com/omniauth/omniauth-identity/actions
|
200
|
-
[🤝conduct]: https://
|
270
|
+
[🤝conduct]: https://gitlab.com/omniauth/omniauth-identity/-/blob/main/CODE_OF_CONDUCT.md
|
201
271
|
[🖐contrib-rocks]: https://contrib.rocks
|
202
272
|
[🖐contributors]: https://github.com/omniauth/omniauth-identity/graphs/contributors
|
273
|
+
[🚎contributors-gl]: https://gitlab.com/omniauth/omniauth-identity/-/graphs/main
|
203
274
|
[🖐contributors-img]: https://contrib.rocks/image?repo=omniauth/omniauth-identity
|
204
|
-
[💎
|
275
|
+
[💎gem-coop]: https://gem.coop
|
205
276
|
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
206
277
|
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
|
207
278
|
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
|
208
|
-
[💎stone_checksums]: https://github.com/
|
279
|
+
[💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
|
209
280
|
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
210
281
|
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
|
282
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
283
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
284
|
+
[🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
|
211
285
|
[🏃♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
|