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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +81 -0
  4. data/CITATION.cff +20 -0
  5. data/CODE_OF_CONDUCT.md +134 -0
  6. data/CONTRIBUTING.md +272 -0
  7. data/FUNDING.md +74 -0
  8. data/LICENSE.md +16 -0
  9. data/README.md +499 -58
  10. data/RUBOCOP.md +71 -0
  11. data/SECURITY.md +21 -0
  12. data/certs/pboling.pem +27 -0
  13. data/lib/omniauth/jwt/version.rb +6 -3
  14. data/lib/omniauth/jwt.rb +2 -1
  15. data/lib/omniauth/jwt2/version.rb +10 -0
  16. data/lib/omniauth/jwt2.rb +10 -0
  17. data/lib/omniauth/strategies/jwt.rb +31 -9
  18. data/lib/omniauth-jwt2.rb +3 -0
  19. data/sig/omniauth/jwt/version.rbs +8 -0
  20. data/sig/omniauth/jwt2/version.rbs +8 -0
  21. data.tar.gz.sig +1 -0
  22. metadata +269 -61
  23. metadata.gz.sig +0 -0
  24. data/.github/FUNDING.yml +0 -11
  25. data/.github/dependabot.yml +0 -2
  26. data/.github/workflows/ancient.yml +0 -53
  27. data/.github/workflows/ci.yml +0 -59
  28. data/.github/workflows/coverage.yml +0 -91
  29. data/.github/workflows/legacy.yml +0 -54
  30. data/.github/workflows/style.yml +0 -43
  31. data/.gitignore +0 -18
  32. data/.rspec +0 -2
  33. data/.rubocop.yml +0 -2
  34. data/.rubocop_gradual.lock +0 -39
  35. data/.simplecov +0 -2
  36. data/.tool-versions +0 -1
  37. data/Gemfile +0 -17
  38. data/Guardfile +0 -8
  39. data/LICENSE.txt +0 -23
  40. data/Rakefile +0 -23
  41. data/gemfiles/ancient.gemfile +0 -20
  42. data/gemfiles/contexts/coverage.gemfile +0 -2
  43. data/gemfiles/contexts/debug.gemfile +0 -6
  44. data/gemfiles/contexts/style.gemfile +0 -5
  45. data/gemfiles/contexts/testing.gemfile +0 -8
  46. data/gemfiles/coverage.gemfile +0 -20
  47. data/gemfiles/legacy.gemfile +0 -26
  48. data/gemfiles/style.gemfile +0 -20
  49. data/gemfiles/vanilla.gemfile +0 -20
  50. data/omniauth-jwt2.gemspec +0 -41
  51. data/spec/lib/omniauth/strategies/jwt_spec.rb +0 -213
  52. data/spec/spec_helper.rb +0 -64
  53. data/spec/support/hash.rb +0 -9
  54. 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