doorkeeper-jwt 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32f8802b270dd6aff8c6ded3545b79fc84be4fa2dc856401e39f60a2818ef986
4
- data.tar.gz: adfeb942ae99d8631d44cdeb722c6e40967b2319cc1398191bcb22ca50f2e047
3
+ metadata.gz: e221c6342513368dcb299a24749a66fe45936fd1eef1ab3e93d1b34b7d0a89ca
4
+ data.tar.gz: 976256cc0a811b02e0ae9738842f99a8ccc57a054f8adea6fce9072db40cc390
5
5
  SHA512:
6
- metadata.gz: 4a24d1a2a83d19d1bbe96b57da628bd3cd42842e1dd92a782b3bbe16b98cd6fa0594a79f83d61d6b22db6f46716c986b3e3a7eb3b948bce29fd093234baad84b
7
- data.tar.gz: 55d64e0e301287f05b07548b7110c04c83fbef478bb43d09b4ce03a72d235a45bfaa44349ab77f58922cdb7fe4bfa8918adc25fa818c203c5ec778cf3ac1c846
6
+ metadata.gz: ca803cc8cff761b4c2e7eddeeb2bf673ff3c4b32bdad377149904504c4d4dcc411dbe7bdfac7ac87f7deebe6e61a309ca983eb42c348e904265b3086311eccb3
7
+ data.tar.gz: e4c2690b4ddc8d0ace06d44659a7a91480f452394e8a6f7781c4dc4cd057101d38968559751ee15abcacf1ccdb49da05ad80a4ff0efd4c4c90527b013c35bffd
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: >-
8
+ Ruby ${{ matrix.ruby }}
9
+ env:
10
+ CI: true
11
+ runs-on: ${{ matrix.os }}
12
+ continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}
13
+ if: |
14
+ !( contains(github.event.pull_request.title, '[ci skip]')
15
+ || contains(github.event.pull_request.title, '[skip ci]'))
16
+ strategy:
17
+ fail-fast: true
18
+ matrix:
19
+ experimental: [false]
20
+ os: [ ubuntu-latest ]
21
+ ruby:
22
+ - 2.6
23
+ - 2.7
24
+ - '3.0'
25
+ - '3.1'
26
+ steps:
27
+ - name: Repo checkout
28
+ uses: actions/checkout@v2
29
+
30
+ - name: Setup Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: ${{ matrix.ruby }}
34
+ bundler-cache: true
35
+
36
+ - name: Run tests
37
+ timeout-minutes: 10
38
+ run: bundle exec rake test
data/.hound.yml CHANGED
@@ -1,2 +1,3 @@
1
1
  rubocop:
2
2
  config_file: .rubocop.yml
3
+ version: 0.72.0
data/.rubocop.yml CHANGED
@@ -8,12 +8,48 @@ AllCops:
8
8
  ExtraDetails: true
9
9
  TargetRubyVersion: 2.5
10
10
 
11
+ Metrics/LineLength:
12
+ Exclude:
13
+ - spec/**/*
14
+ Max: 100
15
+
11
16
  Metrics/BlockLength:
12
- Enabled: false
17
+ Exclude:
18
+ - spec/**/*
19
+ - doorkeeper-jwt.gemspec
20
+
21
+ Style/StringLiterals:
22
+ EnforcedStyle: double_quotes
23
+ Style/StringLiteralsInInterpolation:
24
+ EnforcedStyle: double_quotes
13
25
 
14
- Metrics/MethodLength:
26
+ Style/FrozenStringLiteralComment:
27
+ Enabled: true
28
+
29
+ Style/TrailingCommaInHashLiteral:
30
+ EnforcedStyleForMultiline: consistent_comma
31
+ Style/TrailingCommaInArrayLiteral:
32
+ EnforcedStyleForMultiline: consistent_comma
33
+
34
+ Style/SymbolArray:
35
+ MinSize: 3
36
+ Style/WordArray:
37
+ MinSize: 3
38
+
39
+ Style/ClassAndModuleChildren:
40
+ Exclude:
41
+ - spec/**/*
42
+ Style/NumericPredicate:
43
+ Enabled: false
44
+ Style/DoubleNegation:
15
45
  Enabled: false
16
46
 
47
+ Layout/MultilineMethodCallIndentation:
48
+ EnforcedStyle: indented
49
+ Layout/TrailingBlankLines:
50
+ Enabled: true
51
+ Layout/DotPosition:
52
+ EnforcedStyle: leading
17
53
 
18
54
  Naming/FileName:
19
55
  Exclude:
data/CHANGELOG.md CHANGED
@@ -8,7 +8,13 @@ project adheres to [Semantic Versioning](http://semver.org/).
8
8
 
9
9
  ### Changed
10
10
 
11
- ## [0.4.0] - 2019-06-11
11
+ ## [0.4.1] - 2022-02-23
12
+
13
+ - JWT gem requirement relaxed to use any version >= 2.1
14
+
15
+ ### Changed
16
+
17
+ ## [0.4.0] - 2019-10-02
12
18
 
13
19
  - Restructured library files to follow naming conventions. (https://guides.rubygems.org/name-your-gem/).
14
20
  - Add support of new doorkeeper with encryption [#30](https://github.com/doorkeeper-gem/doorkeeper-jwt/pull/30)
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in doorkeeper-jwt.gemspec
6
6
  gemspec
7
7
 
8
- gem 'coveralls', require: false
9
- gem 'rubocop', '~> 0.59.2', require: false
10
- gem 'rubocop-rspec', '~> 1.30', require: false
8
+ gem "coveralls", require: false
9
+ gem "rubocop", "~> 1.8", require: false
10
+ gem "rubocop-rspec", "~> 2.1", require: false
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
5
 
6
6
  RSpec::Core::RakeTask.new
7
7
 
data/bin/console CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'bundler/setup'
5
- require 'doorkeeper-jwt'
4
+ require "bundler/setup"
5
+ require "doorkeeper-jwt"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -12,6 +12,6 @@ require 'doorkeeper-jwt'
12
12
  #
13
13
  # Pry.start
14
14
 
15
- require 'irb'
15
+ require "irb"
16
16
 
17
17
  IRB.start
@@ -1,31 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
- require 'doorkeeper/jwt/version'
6
+ require "doorkeeper/jwt/version"
7
7
 
8
8
  Gem::Specification.new do |spec|
9
- spec.name = 'doorkeeper-jwt'
9
+ spec.name = "doorkeeper-jwt"
10
10
  spec.version = Doorkeeper::JWT.gem_version
11
- spec.authors = ['Chris Warren']
12
- spec.email = ['chris@expectless.com']
11
+ spec.authors = ["Chris Warren", "Nikita Bulai"]
12
+ spec.email = ["chris@expectless.com"]
13
13
 
14
- spec.summary = 'JWT token generator for Doorkeeper'
15
- spec.description = 'JWT token generator extension for Doorkeeper'
16
- spec.homepage = 'https://github.com/chriswarren/doorkeeper-jwt'
17
- spec.license = 'MIT'
14
+ spec.summary = "JWT token generator for Doorkeeper"
15
+ spec.description = "JWT token generator extension for Doorkeeper"
16
+ spec.homepage = "https://github.com/chriswarren/doorkeeper-jwt"
17
+ spec.license = "MIT"
18
18
 
19
- spec.bindir = 'exe'
20
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
- spec.require_paths = ['lib']
19
+ spec.bindir = "exe"
20
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
+ spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency 'jwt', '~> 2.1'
25
+ spec.add_dependency "jwt", ">= 2.1"
26
26
 
27
- spec.add_development_dependency 'bundler', '>= 1.16', '< 3'
28
- spec.add_development_dependency 'pry', '~> 0'
29
- spec.add_development_dependency 'rake', '~> 12.3'
30
- spec.add_development_dependency 'rspec', '~> 3.8'
27
+ spec.add_development_dependency "bundler", ">= 1.16", "< 3"
28
+ spec.add_development_dependency "pry", "~> 0"
29
+ spec.add_development_dependency "rake", "~> 13.0"
30
+ spec.add_development_dependency "rspec", "~> 3.8"
31
31
  end
@@ -4,7 +4,7 @@ module Doorkeeper
4
4
  module JWT
5
5
  class MissingConfiguration < StandardError
6
6
  def initialize
7
- super('Configuration for doorkeeper-jwt missing.')
7
+ super("Configuration for doorkeeper-jwt missing.")
8
8
  end
9
9
  end
10
10
 
@@ -28,19 +28,19 @@ module Doorkeeper
28
28
  end
29
29
 
30
30
  def use_application_secret(value)
31
- @config.instance_variable_set('@use_application_secret', value)
31
+ @config.instance_variable_set("@use_application_secret", value)
32
32
  end
33
33
 
34
34
  def secret_key(value)
35
- @config.instance_variable_set('@secret_key', value)
35
+ @config.instance_variable_set("@secret_key", value)
36
36
  end
37
37
 
38
38
  def secret_key_path(value)
39
- @config.instance_variable_set('@secret_key_path', value)
39
+ @config.instance_variable_set("@secret_key_path", value)
40
40
  end
41
41
 
42
42
  def encryption_method(value)
43
- @config.instance_variable_set('@encryption_method', value)
43
+ @config.instance_variable_set("@encryption_method", value)
44
44
  end
45
45
  end
46
46
 
@@ -10,11 +10,11 @@ module Doorkeeper
10
10
  # Semantic versioning
11
11
  MAJOR = 0
12
12
  MINOR = 4
13
- TINY = 0
13
+ TINY = 1
14
14
  PRE = nil
15
15
 
16
16
  # Full version number
17
- STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
17
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
18
  end
19
19
  end
20
20
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'doorkeeper/jwt/version'
4
- require 'doorkeeper/jwt/config'
5
- require 'jwt'
3
+ require "doorkeeper/jwt/version"
4
+ require "doorkeeper/jwt/config"
5
+ require "jwt"
6
6
 
7
7
  module Doorkeeper
8
8
  module JWT
@@ -44,7 +44,7 @@ module Doorkeeper
44
44
  end
45
45
 
46
46
  def encryption_method
47
- return 'none' unless Doorkeeper::JWT.configuration.encryption_method
47
+ return "none" unless Doorkeeper::JWT.configuration.encryption_method
48
48
 
49
49
  Doorkeeper::JWT.configuration.encryption_method.to_s.upcase
50
50
  end
@@ -56,8 +56,8 @@ module Doorkeeper
56
56
  def application_secret(opts)
57
57
  if opts[:application].nil?
58
58
  raise(
59
- 'JWT `use_application_secret` is enabled, but application is nil.' \
60
- ' This can happen if `client_id` was absent in the request params.'
59
+ "JWT `use_application_secret` is enabled, but application is nil." \
60
+ " This can happen if `client_id` was absent in the request params."
61
61
  )
62
62
  end
63
63
 
@@ -75,8 +75,8 @@ module Doorkeeper
75
75
 
76
76
  if secret.nil?
77
77
  raise(
78
- 'JWT `use_application_secret` is enabled, but the application' \
79
- ' secret is nil.'
78
+ "JWT `use_application_secret` is enabled, but the application" \
79
+ " secret is nil."
80
80
  )
81
81
  end
82
82
 
metadata CHANGED
@@ -1,27 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Warren
8
+ - Nikita Bulai
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2019-10-02 00:00:00.000000000 Z
12
+ date: 2022-02-23 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: jwt
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
20
  version: '2.1'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
27
  version: '2.1'
27
28
  - !ruby/object:Gem::Dependency
@@ -64,14 +65,14 @@ dependencies:
64
65
  requirements:
65
66
  - - "~>"
66
67
  - !ruby/object:Gem::Version
67
- version: '12.3'
68
+ version: '13.0'
68
69
  type: :development
69
70
  prerelease: false
70
71
  version_requirements: !ruby/object:Gem::Requirement
71
72
  requirements:
72
73
  - - "~>"
73
74
  - !ruby/object:Gem::Version
74
- version: '12.3'
75
+ version: '13.0'
75
76
  - !ruby/object:Gem::Dependency
76
77
  name: rspec
77
78
  requirement: !ruby/object:Gem::Requirement
@@ -93,11 +94,12 @@ executables: []
93
94
  extensions: []
94
95
  extra_rdoc_files: []
95
96
  files:
97
+ - ".github/dependabot.yml"
98
+ - ".github/workflows/ci.yml"
96
99
  - ".gitignore"
97
100
  - ".hound.yml"
98
101
  - ".rspec"
99
102
  - ".rubocop.yml"
100
- - ".travis.yml"
101
103
  - CHANGELOG.md
102
104
  - Gemfile
103
105
  - LICENSE.txt
@@ -128,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
130
  - !ruby/object:Gem::Version
129
131
  version: '0'
130
132
  requirements: []
131
- rubygems_version: 3.0.2
133
+ rubygems_version: 3.0.8
132
134
  signing_key:
133
135
  specification_version: 4
134
136
  summary: JWT token generator for Doorkeeper
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2
4
- - 2.3
5
- - 2.4
6
- - 2.5