omniauth-jwt2 0.1.0 → 1.0.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +81 -0
- data/CITATION.cff +20 -0
- data/CODE_OF_CONDUCT.md +134 -0
- data/CONTRIBUTING.md +272 -0
- data/FUNDING.md +74 -0
- data/LICENSE.md +16 -0
- data/README.md +499 -58
- data/RUBOCOP.md +71 -0
- data/SECURITY.md +21 -0
- data/certs/pboling.pem +27 -0
- data/lib/omniauth/jwt/version.rb +6 -3
- data/lib/omniauth/jwt.rb +2 -1
- data/lib/omniauth/jwt2/version.rb +10 -0
- data/lib/omniauth/jwt2.rb +10 -0
- data/lib/omniauth/strategies/jwt.rb +31 -9
- data/lib/omniauth-jwt2.rb +3 -0
- data/sig/omniauth/jwt/version.rbs +8 -0
- data/sig/omniauth/jwt2/version.rbs +8 -0
- data.tar.gz.sig +1 -0
- metadata +269 -61
- metadata.gz.sig +0 -0
- data/.github/FUNDING.yml +0 -11
- data/.github/dependabot.yml +0 -2
- data/.github/workflows/ancient.yml +0 -53
- data/.github/workflows/ci.yml +0 -59
- data/.github/workflows/coverage.yml +0 -91
- data/.github/workflows/legacy.yml +0 -54
- data/.github/workflows/style.yml +0 -43
- data/.gitignore +0 -18
- data/.rspec +0 -2
- data/.rubocop.yml +0 -2
- data/.rubocop_gradual.lock +0 -39
- data/.simplecov +0 -2
- data/.tool-versions +0 -1
- data/Gemfile +0 -17
- data/Guardfile +0 -8
- data/LICENSE.txt +0 -23
- data/Rakefile +0 -23
- data/gemfiles/ancient.gemfile +0 -20
- data/gemfiles/contexts/coverage.gemfile +0 -2
- data/gemfiles/contexts/debug.gemfile +0 -6
- data/gemfiles/contexts/style.gemfile +0 -5
- data/gemfiles/contexts/testing.gemfile +0 -8
- data/gemfiles/coverage.gemfile +0 -20
- data/gemfiles/legacy.gemfile +0 -26
- data/gemfiles/style.gemfile +0 -20
- data/gemfiles/vanilla.gemfile +0 -20
- data/omniauth-jwt2.gemspec +0 -41
- data/spec/lib/omniauth/strategies/jwt_spec.rb +0 -213
- data/spec/spec_helper.rb +0 -64
- data/spec/support/hash.rb +0 -9
- data/spec/support/next_instance_of.rb +0 -43
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# From: https://github.com/gitlabhq/gitlabhq/blob/master/gems/gitlab-rspec/lib/gitlab/rspec/next_instance_of.rb#L4
|
|
2
|
-
module NextInstanceOf
|
|
3
|
-
def expect_next_instance_of(klass, *new_args, &blk)
|
|
4
|
-
stub_new(expect(klass), nil, false, *new_args, &blk)
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
def expect_next_instances_of(klass, number, ordered = false, *new_args, &blk)
|
|
8
|
-
stub_new(expect(klass), number, ordered, *new_args, &blk)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def allow_next_instance_of(klass, *new_args, &blk)
|
|
12
|
-
stub_new(allow(klass), nil, false, *new_args, &blk)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def allow_next_instances_of(klass, number, ordered = false, *new_args, &blk)
|
|
16
|
-
stub_new(allow(klass), number, ordered, *new_args, &blk)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
private
|
|
20
|
-
|
|
21
|
-
def stub_new(target, number, ordered = false, *new_args, &blk)
|
|
22
|
-
receive_new = receive(:new)
|
|
23
|
-
receive_new.ordered if ordered
|
|
24
|
-
receive_new.with(*new_args) if !(new_args.empty? || new_args.blank?)
|
|
25
|
-
|
|
26
|
-
if number.is_a?(Range)
|
|
27
|
-
receive_new.at_least(number.begin).times if number.begin
|
|
28
|
-
receive_new.at_most(number.end).times if number.end
|
|
29
|
-
elsif number
|
|
30
|
-
receive_new.exactly(number).times
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
target.to receive_new.and_wrap_original do |*original_args, **original_kwargs|
|
|
34
|
-
method, *original_args = original_args
|
|
35
|
-
begin
|
|
36
|
-
method.call(*original_args, **original_kwargs).tap(&blk)
|
|
37
|
-
rescue ArgumentError
|
|
38
|
-
# Kludge for old ruby < 2.7
|
|
39
|
-
method.call(*original_args).tap(&blk)
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|