sorcery 0.16.4 → 0.16.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
- data/.devcontainer/Dockerfile +10 -0
- data/.devcontainer/devcontainer.json +29 -0
- data/.devcontainer/postcreate.sh +4 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -0
- data/lib/sorcery/model/submodules/reset_password.rb +2 -0
- data/lib/sorcery/protocols/oauth2.rb +1 -0
- data/lib/sorcery/version.rb +1 -1
- data/sorcery.gemspec +1 -1
- data/spec/shared_examples/user_reset_password_shared_examples.rb +12 -0
- metadata +8 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e28e735926cc783f48b5f8708fcdba63b66d20c54acb46197a633c3a2c27ed9f
|
4
|
+
data.tar.gz: c48a71718894e02b6d556143d7019b64698d938faf3d82cc97362314e5d821eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94876b13d7838ab273e7cf01489914dfce2cdf9f27259f2f3dcb98d62dfe126b65daf3dde018c6423e4a6fbe9b526339c85dfa978dcdf61698ce77b42f722a4d
|
7
|
+
data.tar.gz: 4defd2381f95ab3b89c859430a68fe9c0bb5068d09276100c80996b196448c1289057b3f8059c2d1188199bd0ae3852c6bd5c33a0701c61cd27c1acd7b692ac1
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Which Ruby version to use. You may need to use a more restrictive version,
|
2
|
+
# e.g. `3.0`
|
3
|
+
ARG VARIANT=3.0
|
4
|
+
|
5
|
+
# Pull Microsoft's ruby devcontainer base image
|
6
|
+
FROM mcr.microsoft.com/devcontainers/ruby:${VARIANT}
|
7
|
+
|
8
|
+
# Ensure we're running the latest bundler, as what ships with the Ruby image may
|
9
|
+
# not be current, and bundler will auto-downgrade to match the Gemfile.lock
|
10
|
+
RUN gem install bundler
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"name": "Ruby",
|
3
|
+
"build": {
|
4
|
+
"dockerfile": "Dockerfile"
|
5
|
+
},
|
6
|
+
|
7
|
+
// Configure tool-specific properties.
|
8
|
+
"customizations": {
|
9
|
+
// Configure properties specific to VS Code.
|
10
|
+
"vscode": {
|
11
|
+
// Add the IDs of extensions you want installed when the container is created.
|
12
|
+
"extensions": [
|
13
|
+
"rebornix.Ruby"
|
14
|
+
]
|
15
|
+
}
|
16
|
+
},
|
17
|
+
|
18
|
+
// Set the environment variables
|
19
|
+
// "runArgs": ["--env-file",".env"],
|
20
|
+
|
21
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
22
|
+
// "forwardPorts": [],
|
23
|
+
|
24
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
25
|
+
"postCreateCommand": "bash .devcontainer/postcreate.sh",
|
26
|
+
|
27
|
+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
28
|
+
"remoteUser": "vscode"
|
29
|
+
}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
## HEAD
|
3
3
|
|
4
|
+
## 0.16.5
|
5
|
+
|
6
|
+
* Raise ArgumentError when calling change_password! with blank password [#333](https://github.com/Sorcery/sorcery/pull/333)
|
7
|
+
* Update auth_scheme to oauth2 v1 defaults per v2 breaking changes [#341](https://github.com/Sorcery/sorcery/pull/341)
|
8
|
+
|
4
9
|
## 0.16.4
|
5
10
|
|
6
11
|
* Adapt to open request protection strategy of rails 7.0 [#318](https://github.com/Sorcery/sorcery/pull/318)
|
data/lib/sorcery/version.rb
CHANGED
data/sorcery.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.required_ruby_version = '>= 2.4.9'
|
35
35
|
|
36
36
|
s.add_dependency 'bcrypt', '~> 3.1'
|
37
|
-
s.add_dependency 'oauth', '
|
37
|
+
s.add_dependency 'oauth', '>= 0.6'
|
38
38
|
s.add_dependency 'oauth2', '~> 2.0'
|
39
39
|
|
40
40
|
s.add_development_dependency 'byebug', '~> 10.0.0'
|
@@ -328,6 +328,18 @@ shared_examples_for 'rails_3_reset_password_model' do
|
|
328
328
|
expect(user.reset_password_token).to be_nil
|
329
329
|
end
|
330
330
|
|
331
|
+
it 'when change_password! is called with empty argument, raise an exception' do
|
332
|
+
expect {
|
333
|
+
user.change_password!('')
|
334
|
+
}.to raise_error(ArgumentError, 'Blank password passed to change_password!')
|
335
|
+
end
|
336
|
+
|
337
|
+
it 'when change_password! is called with nil argument, raise an exception' do
|
338
|
+
expect {
|
339
|
+
user.change_password!(nil)
|
340
|
+
}.to raise_error(ArgumentError, 'Blank password passed to change_password!')
|
341
|
+
end
|
342
|
+
|
331
343
|
it 'when change_password is called, deletes reset_password_token and calls #save' do
|
332
344
|
new_password = 'blabulsdf'
|
333
345
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorcery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noam Ben Ari
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bcrypt
|
@@ -32,22 +32,16 @@ dependencies:
|
|
32
32
|
name: oauth
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- - "~>"
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0.5'
|
38
35
|
- - ">="
|
39
36
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
37
|
+
version: '0.6'
|
41
38
|
type: :runtime
|
42
39
|
prerelease: false
|
43
40
|
version_requirements: !ruby/object:Gem::Requirement
|
44
41
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.5'
|
48
42
|
- - ">="
|
49
43
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
44
|
+
version: '0.6'
|
51
45
|
- !ruby/object:Gem::Dependency
|
52
46
|
name: oauth2
|
53
47
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,6 +182,9 @@ executables: []
|
|
188
182
|
extensions: []
|
189
183
|
extra_rdoc_files: []
|
190
184
|
files:
|
185
|
+
- ".devcontainer/Dockerfile"
|
186
|
+
- ".devcontainer/devcontainer.json"
|
187
|
+
- ".devcontainer/postcreate.sh"
|
191
188
|
- ".document"
|
192
189
|
- ".github/FUNDING.yml"
|
193
190
|
- ".github/ISSUE_TEMPLATE.md"
|
@@ -385,7 +382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
385
382
|
- !ruby/object:Gem::Version
|
386
383
|
version: '0'
|
387
384
|
requirements: []
|
388
|
-
rubygems_version: 3.
|
385
|
+
rubygems_version: 3.2.33
|
389
386
|
signing_key:
|
390
387
|
specification_version: 4
|
391
388
|
summary: Magical authentication for Rails applications
|