omniauth-identity 3.0.9 → 3.1.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 +4 -4
- checksums.yaml.gz.sig +2 -0
- data/CHANGELOG.md +122 -53
- data/CONTRIBUTING.md +164 -0
- data/{LICENSE → LICENSE.txt} +5 -3
- data/README.md +239 -88
- data/SECURITY.md +23 -0
- data/lib/omniauth/identity/model.rb +19 -17
- data/lib/omniauth/identity/models/active_record.rb +4 -3
- data/lib/omniauth/identity/models/couch_potato.rb +6 -5
- data/lib/omniauth/identity/models/mongoid.rb +5 -4
- data/lib/omniauth/identity/models/nobrainer.rb +5 -4
- data/lib/omniauth/identity/models/sequel.rb +28 -15
- data/lib/omniauth/identity/secure_password.rb +51 -24
- data/lib/{omniauth-identity → omniauth/identity}/version.rb +3 -1
- data/lib/omniauth/identity.rb +25 -9
- data/lib/omniauth/strategies/identity.rb +25 -28
- data/lib/omniauth-identity.rb +13 -2
- data.tar.gz.sig +2 -0
- metadata +134 -40
- metadata.gz.sig +0 -0
- data/spec/omniauth/identity/model_spec.rb +0 -44
- data/spec/omniauth/identity/models/active_record_spec.rb +0 -40
- data/spec/omniauth/identity/models/sequel_spec.rb +0 -39
- data/spec/omniauth/identity/secure_password_spec.rb +0 -27
- data/spec/omniauth/strategies/identity_spec.rb +0 -373
- data/spec/spec_helper.rb +0 -40
- data/spec/support/shared_contexts/instance_with_instance_methods.rb +0 -89
- data/spec/support/shared_contexts/model_with_class_methods.rb +0 -29
- data/spec/support/shared_contexts/persistable_model.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a7eb266545d5ae300646af12c8557a414f49872f05850793ebd1c7b2cc17ca
|
4
|
+
data.tar.gz: 44b4dabec7425f586b1e9b731ea5a14b08902f7c782a360a3bb3ff9c829fa041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba1eafc9b744438b11dc71db4c8b8e8ec731568413f8dc461fa08df0956903015976669e66ce0402b064259a675db06f325548a54c86a3197f77bee4d1b4d438
|
7
|
+
data.tar.gz: 73e8367e8cb0fe207214cc8fbca53bbe800a76d4770ac0ef4f6b650eab2c2534ea28eb7371efa7537160c89a21d3812c37e6c4c39d4dce91caa826a87cb4518f
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
Z������P�d��C�pc��߅\>�=4�w�{�p0|g5aYTN�4P
|
2
|
+
��U�TZ�)�q�m��B�b�� ����$JI��v� ����_�tt�͙5����=�&T7wQ&�7k�÷S*�7��FO���C��:D5x�JY��7,5RaT^�5��H?���{EUsȮ�s,.EĠ�.(������f�����[.��`�5�Pa��� �����4-����&ί����{7�IEٽ�ʯ)�YN��s�%5滟�1�*�_�`҂��y���i���J�G`}���<V_n��xrY�{^���ў�0)i2^�� �ʪ�ʦ�.N�*%��W�67�Q7d9����g����tZG�i@�͐�L+����7�
|
data/CHANGELOG.md
CHANGED
@@ -1,35 +1,68 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
3
|
+
All notable changes to this project since v2.0 will be documented in this file.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
5
|
+
The format is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html).
|
8
7
|
|
9
8
|
## [Unreleased]
|
9
|
+
### Added
|
10
|
+
### Changed
|
11
|
+
### Fixed
|
12
|
+
### Removed
|
13
|
+
|
14
|
+
## [3.1.1] - 2024-11-18 ([tag][3.1.1t])
|
15
|
+
- COVERAGE: 92.00% -- 345/375 lines in 15 files
|
16
|
+
- BRANCH COVERAGE: 80.26% -- 61/76 branches in 15 files
|
17
|
+
- 44.44% documented
|
18
|
+
### Added
|
19
|
+
- [PR 130][130] Add SECURITY.md policy by @pboling
|
20
|
+
- [PR 130][130] Add Maintainer contact email by @pboling
|
21
|
+
### Changed
|
22
|
+
- [PR 130][130] Require MFA to publish to RubyGems.org by @pboling
|
10
23
|
|
11
|
-
|
24
|
+
[130]: https://github.com/omniauth/omniauth-identity/pull/130
|
12
25
|
|
26
|
+
## [3.1.0] - 2024-11-18 ([tag][3.1.0t])
|
27
|
+
- COVERAGE: 91.98% -- 344/374 lines in 15 files
|
28
|
+
- BRANCH COVERAGE: 80.26% -- 61/76 branches in 15 files
|
29
|
+
- 44.44% documented
|
30
|
+
### Added
|
31
|
+
- [PR #123][123] Improve readability in #identity method of OmniAuth::Strategies::Identity by @Xeragus
|
32
|
+
- [PR #124][124] Modernized gem structure, and updated dependencies for development by @pboling
|
33
|
+
- Gem releases are now cryptographically signed
|
34
|
+
- All ORM adapters (except NoBrainer) are tested in CI
|
35
|
+
- [PR #127][127] Improved documentation by @pboling
|
36
|
+
- [PR #128][128] Instructions for contributing by @pboling
|
37
|
+
### Changed
|
38
|
+
- Deprecate `require 'omniauth/identity'` by @pboling
|
39
|
+
- in favor of `require 'omniauth-identity'` (matching the gem name)
|
40
|
+
### Fixed
|
41
|
+
- [PR #120][120] Fix: handling of SCRIPT_NAME for registration_path by @btalbot
|
42
|
+
- [PR #122][122] Compatibility with rack v3.1+: use `req.params[]` instead of `req[]` by @emon
|
43
|
+
- See: https://github.com/rack/rack/pull/2183
|
44
|
+
|
45
|
+
[128]: https://github.com/omniauth/omniauth-identity/pull/128
|
46
|
+
[127]: https://github.com/omniauth/omniauth-identity/pull/127
|
47
|
+
[124]: https://github.com/omniauth/omniauth-identity/pull/124
|
48
|
+
[123]: https://github.com/omniauth/omniauth-identity/pull/123
|
49
|
+
[122]: https://github.com/omniauth/omniauth-identity/pull/122
|
50
|
+
[120]: https://github.com/omniauth/omniauth-identity/pull/120
|
51
|
+
|
52
|
+
## [3.0.9] - 2021-06-16 ([tag][3.0.9t])
|
13
53
|
### Fixed
|
14
|
-
|
15
54
|
- \[Sequel\] Fixes loading the Sequel adapter, issue reported as [#112](https://github.com/omniauth/omniauth-identity/issues/112)
|
16
|
-
|
17
55
|
### Added
|
18
|
-
|
19
56
|
- 📝 Document the Database adapters and drivers the gem currently works with
|
20
57
|
|
21
|
-
## [3.0.8] - 2021-03-24
|
22
|
-
|
58
|
+
## [3.0.8] - 2021-03-24 ([tag][3.0.8t])
|
23
59
|
### Fixed
|
24
|
-
|
25
60
|
- \[Model\] Fixes 2 issues raised in a comment on PR [#108](https://github.com/omniauth/omniauth-identity/pull/108#issuecomment-804456604)
|
26
61
|
- When `options[:on_validation]` is set `new`/`save`/`persisted?` logic is used.
|
27
62
|
- When `options[:on_validation]` is not set `create`/`persisted?` logic is used.
|
28
63
|
|
29
|
-
## [3.0.7] - 2021-03-23
|
30
|
-
|
64
|
+
## [3.0.7] - 2021-03-23 ([tag][3.0.7t])
|
31
65
|
### Fixed
|
32
|
-
|
33
66
|
- \[ActiveRecord\] Fixed [#110](https://github.com/omniauth/omniauth-identity/issues/110) which prevented `OmniAuth::Identity::Models::ActiveRecord`-based records from saving.
|
34
67
|
- \[CouchPotato\] Fixed `OmniAuth::Identity::Models::CouchPotato`'s `#save`.
|
35
68
|
- \[Sequel\] Fixed `OmniAuth::Identity::Models::Sequel`'s `#save`.
|
@@ -37,15 +70,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
37
70
|
- \[Model\] Restore original `info` functionality which set `name` based on `first_name`, `last_name`, or `nickname`
|
38
71
|
|
39
72
|
### Changed
|
40
|
-
|
41
73
|
- 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)
|
42
74
|
- Aeons ago the original was ripped from Rails 3.1, and frozen in time.
|
43
75
|
While writing specs, it was discovered to be incompatible with this gem's Sequel adapter.
|
44
76
|
- Specs validate that the new version does work.
|
45
77
|
In any case, the ripped version is only used when the `has_secure_password` macro is not yet defined in the class.
|
46
|
-
|
47
78
|
### Added
|
48
|
-
|
49
79
|
- New specs to cover real use cases and implementations of each ORM model adapter that ships with the gem:
|
50
80
|
- ActiveRecord (Polyglot - Many Relational Databases)
|
51
81
|
- Sequel (Polyglot - Many Relational Databases)
|
@@ -53,14 +83,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
53
83
|
- Mongoid (MongoDB)
|
54
84
|
- NoBrainer (RethinkDB)
|
55
85
|
|
56
|
-
## [3.0.6] - 2021-03-20
|
57
|
-
|
86
|
+
## [3.0.6] - 2021-03-20 ([tag][3.0.6t])
|
58
87
|
### Fixed
|
59
|
-
|
60
88
|
- Fix breaking changes introduced by [#108](https://github.com/omniauth/omniauth-identity/pull/108) which prevented `:on_validation` from firing
|
61
|
-
|
62
89
|
### Added
|
63
|
-
|
64
90
|
- New (or finally documented) options:
|
65
91
|
- `:create_identity_link_text` defaults to `'Create an Identity'`
|
66
92
|
- `:registration_failure_message` defaults to `'One or more fields were invalid'`
|
@@ -68,58 +94,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
68
94
|
- `:title` defaults to `'Identity Verification'`
|
69
95
|
- `:registration_form_title` defaults to `'Register Identity'`
|
70
96
|
|
71
|
-
## [3.0.5] - 2021-03-19
|
72
|
-
|
97
|
+
## [3.0.5] - 2021-03-19 ([tag][3.0.5t])
|
73
98
|
### Fixed
|
74
|
-
|
75
99
|
- Fix breaking changes introduced by [#86's](https://github.com/omniauth/omniauth-identity/pull/86) introduction of `:on_validation`
|
76
|
-
|
77
100
|
### Added
|
78
|
-
|
79
101
|
- Define `#save`, `#persisted?` and `::create` on `Omniauth::Identity::Model`
|
80
102
|
- Add `@since` YARD tags to interface methods
|
81
103
|
- Refactor `Omniauth::Strategies::Identity.registration_phase` to support `Omniauth::Identity::Model`-inheriting classes that do not define `#save`.
|
82
104
|
- This support will be dropped in v4.0.
|
83
105
|
|
84
|
-
## [3.0.4] - 2021-02-14
|
85
|
-
|
106
|
+
## [3.0.4] - 2021-02-14 ([tag][3.0.4t])
|
86
107
|
### Added
|
87
|
-
|
88
108
|
- Add support for [sequel ORM](http://sequel.jeremyevans.net/)
|
89
109
|
|
90
|
-
## [3.0.3] - 2021-02-14
|
91
|
-
|
110
|
+
## [3.0.3] - 2021-02-14 ([tag][3.0.3t])
|
92
111
|
### Added
|
93
|
-
|
94
112
|
- Add option `:on_validation`, which can be used to add a Captcha
|
95
113
|
- See [example here](https://github.com/omniauth/omniauth-identity/pull/86#issue-63225122)
|
96
114
|
- Add support for nobrainer, an ORM for RethinkDB
|
97
115
|
- Validation error message on invalid registration form submission
|
98
|
-
|
99
116
|
### Removed
|
100
|
-
|
101
117
|
- ruby-head build... simply too slow
|
102
118
|
|
103
|
-
## [3.0.2] - 2021-02-14
|
104
|
-
|
119
|
+
## [3.0.2] - 2021-02-14 ([tag][3.0.2t])
|
105
120
|
### Fixed
|
106
|
-
|
107
121
|
- Github Actions CI Build for Ruby 2.4, 3.0 and ruby-head
|
108
122
|
- Updated copyright
|
109
123
|
- Code style cleanup
|
110
124
|
- Added Code Climate "Quality"
|
111
125
|
- Updated Readme
|
112
126
|
|
113
|
-
## [3.0.1] - 2021-02-14
|
114
|
-
|
127
|
+
## [3.0.1] - 2021-02-14 ([tag][3.0.1t])
|
115
128
|
### Fixed
|
116
|
-
|
117
129
|
- Github Actions CI Build for various Rubies
|
118
130
|
|
119
|
-
## [3.0] - 2021-02-13
|
120
|
-
|
131
|
+
## [3.0.0] - 2021-02-13 ([tag][3.0.0t])
|
121
132
|
### Added
|
122
|
-
|
123
133
|
- Compatibility with Ruby 3
|
124
134
|
- Add option `:enable_login` to bypass OmniAuth disabling of GET method (default `true`)
|
125
135
|
- NOTE: This restores compatibility between this gem and the current, core, omniauth gem!
|
@@ -130,22 +140,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
130
140
|
- Minimum Ruby version = 2.4
|
131
141
|
- Automatically adds "provider" => "identity" when "provider" column is detected
|
132
142
|
- Documentation in README.md
|
133
|
-
|
134
143
|
### Removed
|
135
|
-
|
136
144
|
- Support for Rubies < 2.4
|
137
145
|
- Support for DataMapper, which died long ago.
|
138
146
|
- Unwanted git artifacts
|
139
147
|
|
140
|
-
## [2.0] - 2020-09-01
|
141
|
-
|
148
|
+
## [2.0.0] - 2020-09-01 ([tag][2.0.0t])
|
142
149
|
### Added
|
143
|
-
|
144
150
|
- CHANGELOG to maintain a history of changes.
|
145
151
|
- Include mongoid-rspec gem.
|
146
|
-
|
147
152
|
### Changed
|
148
|
-
|
149
153
|
- Fix failing Specs
|
150
154
|
- Update Spec syntax to RSpec 3
|
151
155
|
- Fix deprecation Warnings
|
@@ -154,7 +158,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
154
158
|
- 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+)
|
155
159
|
- Updated copyright information.
|
156
160
|
- Updated MongoMapper section of README to reflect its discontinued support.
|
157
|
-
|
158
161
|
### Removed
|
159
162
|
- Gemfile.lock file
|
160
|
-
- MongoMapper support; unable to satisfy dependencies of both MongoMapper and
|
163
|
+
- MongoMapper support; unable to satisfy dependencies of both MongoMapper and Mongoid now that MongoMapper is no longer actively maintained.
|
164
|
+
|
165
|
+
[Unreleased]: https://github.com/omniauth/omniauth-identity/compare/v3.1.1...HEAD
|
166
|
+
[3.1.1]: https://github.com/omniauth/omniauth-identity/compare/v3.1.0...v3.1.1
|
167
|
+
[3.1.1t]: https://github.com/omniauth/omniauth-identity/tags/v3.1.1
|
168
|
+
[3.1.0]: https://github.com/omniauth/omniauth-identity/compare/v3.0.9...v3.1.0
|
169
|
+
[3.1.0t]: https://github.com/omniauth/omniauth-identity/tags/v3.1.0
|
170
|
+
[3.0.9]: https://github.com/omniauth/omniauth-identity/compare/v3.0.8...v3.0.9
|
171
|
+
[3.0.9t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.9
|
172
|
+
[3.0.8]: https://github.com/omniauth/omniauth-identity/compare/v3.0.7...v3.0.8
|
173
|
+
[3.0.8t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.8
|
174
|
+
[3.0.7]: https://github.com/omniauth/omniauth-identity/compare/v3.0.6...v3.0.7
|
175
|
+
[3.0.7t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.7
|
176
|
+
[3.0.6]: https://github.com/omniauth/omniauth-identity/compare/v3.0.5...v3.0.6
|
177
|
+
[3.0.6t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.6
|
178
|
+
[3.0.5]: https://github.com/omniauth/omniauth-identity/compare/v3.0.4...v3.0.5
|
179
|
+
[3.0.5t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.5
|
180
|
+
[3.0.4]: https://github.com/omniauth/omniauth-identity/compare/v3.0.3...v3.0.4
|
181
|
+
[3.0.4t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.4
|
182
|
+
[3.0.3]: https://github.com/omniauth/omniauth-identity/compare/v3.0.2...v3.0.3
|
183
|
+
[3.0.3t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.3
|
184
|
+
[3.0.2]: https://github.com/omniauth/omniauth-identity/compare/v3.0.1...v3.0.2
|
185
|
+
[3.0.2t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.2
|
186
|
+
[3.0.1]: https://github.com/omniauth/omniauth-identity/compare/v3.0.0...v3.0.1
|
187
|
+
[3.0.1t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.1
|
188
|
+
[3.0.0]: https://github.com/omniauth/omniauth-identity/compare/v2.0.0...v3.0.0
|
189
|
+
[3.0.0t]: https://github.com/omniauth/omniauth-identity/tags/v3.0.0
|
190
|
+
[2.0.0]: https://github.com/omniauth/omniauth-identity/compare/v1.1.1...v2.0.0
|
191
|
+
[2.0.0t]: https://github.com/omniauth/omniauth-identity/tags/v2.0.0
|
192
|
+
[1.1.1]: https://github.com/omniauth/omniauth-identity/compare/v1.1.0...v1.1.1
|
193
|
+
[1.1.1t]: https://github.com/omniauth/omniauth-identity/tags/v1.1.1
|
194
|
+
[1.1.0]: https://github.com/omniauth/omniauth-identity/compare/v1.0.0...v1.1.0
|
195
|
+
[1.1.0t]: https://github.com/omniauth/omniauth-identity/tags/v1.0.0
|
196
|
+
[1.0.0]: https://github.com/omniauth/omniauth-identity/compare/v0.3.0...v1.0.0
|
197
|
+
[1.0.0t]: https://github.com/omniauth/omniauth-identity/tags/v1.0.0
|
198
|
+
[0.3.0]: https://github.com/omniauth/omniauth-identity/compare/v0.2.6...v0.3.0
|
199
|
+
[0.3.0t]: https://github.com/omniauth/omniauth-identity/tags/v0.3.0
|
200
|
+
[0.2.6]: https://github.com/omniauth/omniauth-identity/compare/v0.2.5...v0.2.6
|
201
|
+
[0.2.6t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.6
|
202
|
+
[0.2.5]: https://github.com/omniauth/omniauth-identity/compare/v0.2.4...v0.2.5
|
203
|
+
[0.2.5t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.5
|
204
|
+
[0.2.4]: https://github.com/omniauth/omniauth-identity/compare/v0.2.3...v0.2.4
|
205
|
+
[0.2.4t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.5
|
206
|
+
[0.2.3]: https://github.com/omniauth/omniauth-identity/compare/v0.2.2...v0.2.3
|
207
|
+
[0.2.3t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.3
|
208
|
+
[0.2.2]: https://github.com/omniauth/omniauth-identity/compare/v0.2.1...v0.2.2
|
209
|
+
[0.2.2t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.2
|
210
|
+
[0.2.1]: https://github.com/omniauth/omniauth-identity/compare/v0.2.0...v0.2.1
|
211
|
+
[0.2.1t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.1
|
212
|
+
[0.2.0]: https://github.com/omniauth/omniauth-identity/compare/v0.1.6...v0.2.0
|
213
|
+
[0.2.0t]: https://github.com/omniauth/omniauth-identity/tags/v0.2.0
|
214
|
+
[0.1.6]: https://github.com/omniauth/omniauth-identity/compare/v0.1.5...v0.1.6
|
215
|
+
[0.1.6t]: https://github.com/omniauth/omniauth-identity/tags/v0.1.6
|
216
|
+
[0.1.5]: https://github.com/omniauth/omniauth-identity/compare/v0.1.4...v0.1.5
|
217
|
+
[0.1.5t]: https://github.com/omniauth/omniauth-identity/tags/v0.1.5
|
218
|
+
[0.1.4]: https://github.com/omniauth/omniauth-identity/compare/v0.1.3...v0.1.4
|
219
|
+
[0.1.4t]: https://github.com/omniauth/omniauth-identity/tags/v0.1.4
|
220
|
+
[0.1.3]: https://github.com/omniauth/omniauth-identity/compare/v0.1.1...v0.1.3
|
221
|
+
[0.1.3t]: https://github.com/omniauth/omniauth-identity/tags/v0.1.3
|
222
|
+
[0.1.1]: https://github.com/omniauth/omniauth-identity/compare/v0.0.4...v0.1.1
|
223
|
+
[0.1.1t]: https://github.com/omniauth/omniauth-identity/tags/v0.1.1
|
224
|
+
[0.0.4]: https://github.com/omniauth/omniauth-identity/compare/v0.0.3...v0.0.4
|
225
|
+
[0.0.4t]: https://github.com/omniauth/omniauth-identity/tags/v0.0.4
|
226
|
+
[0.0.3]: https://github.com/omniauth/omniauth-identity/compare/v0.0.1...v0.0.3
|
227
|
+
[0.0.3t]: https://github.com/omniauth/omniauth-identity/tags/v0.0.3
|
228
|
+
[0.0.1]: https://github.com/omniauth/omniauth-identity/compare/be7b50aafea590caae6dc9dce550a96b997773cd...v0.0.1
|
229
|
+
[0.0.1t]: https://github.com/omniauth/omniauth-identity/tags/v0.0.1
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/omniauth/omniauth-identity][🚎src-main]
|
4
|
+
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
+
the [code of conduct][🤝conduct].
|
6
|
+
|
7
|
+
To submit a patch, please fork the project and create a patch with tests.
|
8
|
+
Once you're happy with it send a pull request.
|
9
|
+
|
10
|
+
## You can help!
|
11
|
+
|
12
|
+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
13
|
+
|
14
|
+
Simply follow these instructions:
|
15
|
+
|
16
|
+
1. Fork the repository
|
17
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
18
|
+
3. Make some fixes.
|
19
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
20
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
21
|
+
6. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
22
|
+
7. Create new Pull Request.
|
23
|
+
|
24
|
+
## Contributors
|
25
|
+
|
26
|
+
Your picture could be here!
|
27
|
+
|
28
|
+
[![Contributors][🖐contributors-img]][🖐contributors]
|
29
|
+
|
30
|
+
Made with [contributors-img][🖐contrib-rocks].
|
31
|
+
|
32
|
+
## The Reek List
|
33
|
+
|
34
|
+
To refresh the `reek` list:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
bundle exec reek > REEK
|
38
|
+
```
|
39
|
+
|
40
|
+
## Appraisal & Combustion
|
41
|
+
|
42
|
+
### Generate a new set of Appraisal gemfiles:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
BUNDLE_GEMFILE=Appraisal.root.gemfile appraisal update
|
46
|
+
```
|
47
|
+
|
48
|
+
## Run Tests
|
49
|
+
|
50
|
+
NOTE: In order to run *all* the tests you will need to have the following databases installed, configured, and running.
|
51
|
+
|
52
|
+
1. [RethinkDB](https://rethinkdb.com), an open source, real-time, web database, [installed](https://rethinkdb.com/docs/install/) and [running](https://rethinkdb.com/docs/start-a-server/), e.g.
|
53
|
+
```bash
|
54
|
+
brew install rethinkdb
|
55
|
+
rethinkdb
|
56
|
+
```
|
57
|
+
2. [MongoDB](https://docs.mongodb.com/manual/administration/install-community/)
|
58
|
+
```bash
|
59
|
+
brew tap mongodb/brew
|
60
|
+
brew install mongodb-community@4.4
|
61
|
+
mongod --config /usr/local/etc/mongod.conf
|
62
|
+
```
|
63
|
+
3. [CouchDB](https://couchdb.apache.org) - download the .app, or:
|
64
|
+
```bash
|
65
|
+
brew install couchdb
|
66
|
+
```
|
67
|
+
CouchDB 3.x requires a set admin password set before startup.
|
68
|
+
Add one to your `$HOMEBREW_PREFIX/etc/local.ini` before starting CouchDB e.g.:
|
69
|
+
```ini
|
70
|
+
[admins]
|
71
|
+
admin = yourabsolutesecret
|
72
|
+
```
|
73
|
+
Also add whatever password you set to your `.env.local`:
|
74
|
+
```dotenv
|
75
|
+
export COUCHDB_PASSWORD=yourabsolutesecret
|
76
|
+
```
|
77
|
+
Then start the CouchDB service
|
78
|
+
```bash
|
79
|
+
brew services start couchdb
|
80
|
+
```
|
81
|
+
|
82
|
+
Now you can run any of the tests!
|
83
|
+
|
84
|
+
To run all tests on all databases (except RethinkDB):
|
85
|
+
```bash
|
86
|
+
bundle exec rake spec:orm:all
|
87
|
+
```
|
88
|
+
|
89
|
+
To run all tests that do not require any additional services, like MongoDB, CouchDB, or RethinkDB:
|
90
|
+
```bash
|
91
|
+
bundle exec rake test
|
92
|
+
```
|
93
|
+
|
94
|
+
To run a specific DB:
|
95
|
+
```bash
|
96
|
+
# CouchDB / CouchPotato
|
97
|
+
bundle exec rspec spec spec_orms --tag 'couchdb'
|
98
|
+
|
99
|
+
# ActiveRecord and Sequel, as they both use the in-memory SQLite driver.
|
100
|
+
bundle exec rspec spec spec_orms --tag 'sqlite3'
|
101
|
+
|
102
|
+
# NOTE - mongoid and nobrainer specs can't be isolated with "tag" because it still loads everything,
|
103
|
+
# and the two libraries are fundamentally incompatible.
|
104
|
+
|
105
|
+
# MongoDB / Mongoid
|
106
|
+
bundle exec rspec spec_orms/mongoid_spec.rb
|
107
|
+
|
108
|
+
# RethinkDB / NoBrainer (Ignored by CI! see spec file for reasons)
|
109
|
+
bundle exec rspec spec_ignored/nobrainer_spec.rb
|
110
|
+
```
|
111
|
+
|
112
|
+
## Lint It
|
113
|
+
|
114
|
+
Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
|
115
|
+
|
116
|
+
```bash
|
117
|
+
bundle exec rake
|
118
|
+
```
|
119
|
+
|
120
|
+
Or just run the linter.
|
121
|
+
```bash
|
122
|
+
bundle exec rubocop_gradual:autocorrect
|
123
|
+
```
|
124
|
+
|
125
|
+
## Release
|
126
|
+
|
127
|
+
### One-time, Per-maintainer, Setup
|
128
|
+
|
129
|
+
**IMPORTANT**: Your public key for signing gems will need to be picked up by the line in the
|
130
|
+
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there),
|
131
|
+
in order to sign the new release.
|
132
|
+
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
|
133
|
+
|
134
|
+
### To release a new version:
|
135
|
+
|
136
|
+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
|
137
|
+
2. Update the version number in `version.rb`
|
138
|
+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
139
|
+
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
|
140
|
+
5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
|
141
|
+
- NOTE: Remember to [check the build][🧪build]!
|
142
|
+
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
|
143
|
+
7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
|
144
|
+
8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure you will release the latest trunk code
|
145
|
+
9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
|
146
|
+
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
|
147
|
+
- If the echo above has no output, then it didn't work.
|
148
|
+
- Note that you'll need the `zsh/datetime` module, if running `zsh`.
|
149
|
+
- In `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
|
150
|
+
10. Run `bundle exec rake build`
|
151
|
+
11. Run `bin/checksums` (more [context][🔒️rubygems-checksums-pr]) to create SHA-256 and SHA-512 checksums
|
152
|
+
- Checksums will be committed automatically by the script, but not pushed
|
153
|
+
12. Run `bundle exec rake release` which will create a git tag for the version,
|
154
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
|
155
|
+
|
156
|
+
[🧪build]: https://github.com/omniauth/omniauth-identity/actions
|
157
|
+
[🤝conduct]: https://github.com/omniauth/omniauth-identity/blob/main/CODE_OF_CONDUCT.md
|
158
|
+
[🖐contrib-rocks]: https://contrib.rocks
|
159
|
+
[🖐contributors]: https://github.com/omniauth/omniauth-identity/graphs/contributors
|
160
|
+
[🖐contributors-img]: https://contrib.rocks/image?repo=omniauth/omniauth-identity
|
161
|
+
[💎rubygems]: https://rubygems.org
|
162
|
+
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
163
|
+
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/guides/pull/325
|
164
|
+
[🚎src-main]: https://github.com/omniauth/omniauth-identity
|
data/{LICENSE → LICENSE.txt}
RENAMED
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Copyright (c)
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021, 2024 Peter H. Boling, and OmniAuth-Identity Maintainers
|
4
|
+
Copyright (c) 2020 Peter H. Boling, Andrew Roberts, and Jellybooks Ltd.
|
5
|
+
Copyright (c) 2010-2015 Michael Bleigh, and Intridea, Inc.
|
4
6
|
|
5
7
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
8
|
a copy of this software and associated documentation files (the
|