Skip to content

Commit 258d81b

Browse files
committed
Drop pinning of rubocop
1 parent 495d350 commit 258d81b

File tree

7 files changed

+8
-20
lines changed

7 files changed

+8
-20
lines changed

.codeclimate.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.simplecov

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ require 'simplecov_json_formatter'
66
SimpleCov.start do
77
command_name "Job #{File.basename(ENV['BUNDLE_GEMFILE'])}" if ENV['BUNDLE_GEMFILE']
88
project_name 'Ruby JWT - Ruby JSON Web Token implementation'
9-
coverage_dir "coverage-#{OpenSSL::Digest::SHA256.hexdigest(ENV.fetch('GITHUB_STEP_SUMMARY', nil))}" if ENV['GITHUB_STEP_SUMMARY']
109
add_filter 'spec'
1110
end
1211

Gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33
source 'https://rubygems.org'
44

55
gemspec
6-
7-
gem 'rubocop', '~> 1.56.3' # Keep .codeclimate.yml channel in sync with this one

lib/jwt/decode.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
module JWT
77
# The Decode class is responsible for decoding and verifying JWT tokens.
88
class Decode
9+
# Order is very important - first check for string keys, next for symbols
10+
ALGORITHM_KEYS = ['algorithm',
11+
:algorithm,
12+
'algorithms',
13+
:algorithms].freeze
914
# Initializes a new Decode instance.
1015
#
1116
# @param jwt [String] the JWT to decode.
@@ -70,12 +75,6 @@ def allowed_and_valid_algorithms
7075
@allowed_and_valid_algorithms ||= allowed_algorithms.select { |alg| alg.valid_alg?(alg_in_header) }
7176
end
7277

73-
# Order is very important - first check for string keys, next for symbols
74-
ALGORITHM_KEYS = ['algorithm',
75-
:algorithm,
76-
'algorithms',
77-
:algorithms].freeze
78-
7978
def given_algorithms
8079
alg_key = ALGORITHM_KEYS.find { |key| @options[key] }
8180
Array(@options[alg_key])

lib/jwt/jwk/ec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def key_digest
6868
def []=(key, value)
6969
raise ArgumentError, 'cannot overwrite cryptographic key attributes' if EC_KEY_ELEMENTS.include?(key.to_sym)
7070

71-
super(key, value)
71+
super
7272
end
7373

7474
private

lib/jwt/jwk/hmac.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def key_digest
6464
def []=(key, value)
6565
raise ArgumentError, 'cannot overwrite cryptographic key attributes' if HMAC_KEY_ELEMENTS.include?(key.to_sym)
6666

67-
super(key, value)
67+
super
6868
end
6969

7070
private

lib/jwt/jwk/rsa.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def key_digest
6767
def []=(key, value)
6868
raise ArgumentError, 'cannot overwrite cryptographic key attributes' if RSA_KEY_ELEMENTS.include?(key.to_sym)
6969

70-
super(key, value)
70+
super
7171
end
7272

7373
private

0 commit comments

Comments
 (0)