Skip to content

Commit dd43f5d

Browse files
authored
Merge pull request #322 from lautis/rubocop-fix
Lock Rubocop to 0.50
2 parents 452a085 + 5811cf3 commit dd43f5d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ group :test do
1515
gem 'coveralls'
1616
gem 'rack', '~> 1.2', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19, :ruby_20, :ruby_21]
1717
gem 'rspec', '>= 3'
18-
gem 'rubocop', '>= 0.37', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24]
18+
gem 'rubocop', '~> 0.50.0', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24] if RUBY_VERSION >= '2.0'
1919
gem 'simplecov', '>= 0.9'
2020

2121
platforms :jruby_18, :ruby_18 do

lib/oauth2/response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class Response
1111
# Procs that, when called, will parse a response body according
1212
# to the specified format.
1313
@@parsers = {
14+
# rubocop:disable Lint/RescueWithoutErrorClass
1415
:json => lambda { |body| MultiJson.load(body) rescue body }, # rubocop:disable RescueModifier
1516
:query => lambda { |body| Rack::Utils.parse_query(body) },
1617
:text => lambda { |body| body },

spec/oauth2/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
it 're-encodes response body in the error message' do
226226
begin
227227
subject.request(:get, '/ascii_8bit_encoding')
228-
rescue => ex
228+
rescue OAuth2::Error => ex
229229
expect(ex.message.encoding.name).to eq('UTF-8')
230230
expect(ex.message).to eq("invalid_request: é\n{\"error\":\"invalid_request\",\"error_description\":\"��\"}")
231231
end

0 commit comments

Comments
 (0)