From ae3ca18884ec5f517b6d329aa269bd301e8f46d1 Mon Sep 17 00:00:00 2001 From: Andy Brody Date: Tue, 19 Sep 2017 21:49:36 -0400 Subject: [PATCH] Fix rubocop failures introduced by rubocop 0.50. --- .rubocop-disables.yml | 6 ++++++ rest-client.gemspec | 2 +- spec/integration/httpbin_spec.rb | 2 +- spec/unit/request_spec.rb | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.rubocop-disables.yml b/.rubocop-disables.yml index 5c9bcb5..d43dea7 100644 --- a/.rubocop-disables.yml +++ b/.rubocop-disables.yml @@ -385,3 +385,9 @@ Style/WordArray: # Configuration parameters: EnforcedStyle, SupportedStyles. Style/BarePercentLiterals: Enabled: false + + +Lint/RescueWithoutErrorClass: + Exclude: + - 'bin/restclient' + - 'lib/restclient/windows/root_certs.rb' diff --git a/rest-client.gemspec b/rest-client.gemspec index a26dcf8..d3fa878 100644 --- a/rest-client.gemspec +++ b/rest-client.gemspec @@ -8,7 +8,7 @@ Gem::Specification.new do |s| s.authors = ['REST Client Team'] s.description = 'A simple HTTP and REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete.' s.license = 'MIT' - s.email = 'rest.client@librelist.com' + s.email = 'discuss@rest-client.groups.io' s.executables = ['restclient'] s.extra_rdoc_files = ['README.md', 'history.md'] s.files = `git ls-files -z`.split("\0") diff --git a/spec/integration/httpbin_spec.rb b/spec/integration/httpbin_spec.rb index 732eb5b..7689b9e 100644 --- a/spec/integration/httpbin_spec.rb +++ b/spec/integration/httpbin_spec.rb @@ -92,7 +92,7 @@ describe RestClient::Request do begin data = JSON.parse(raw) - rescue + rescue StandardError puts "Failed to parse: " + raw.inspect raise end diff --git a/spec/unit/request_spec.rb b/spec/unit/request_spec.rb index f69494d..54e635b 100644 --- a/spec/unit/request_spec.rb +++ b/spec/unit/request_spec.rb @@ -1221,10 +1221,10 @@ describe RestClient::Request, :include_helpers do expect(@request.process_url_params('https://example.com/', params: { foo: [1,2,3], null: nil, - false: false, + falsy: false, math: '2+2=4', nested: {'key + escaped' => 'value + escaped', other: [], arr: [1,2]}, - })).to eq 'https://example.com/?foo[]=1&foo[]=2&foo[]=3&null&false=false&math=2%2B2%3D4' \ + })).to eq 'https://example.com/?foo[]=1&foo[]=2&foo[]=3&null&falsy=false&math=2%2B2%3D4' \ '&nested[key+%2B+escaped]=value+%2B+escaped&nested[other]' \ '&nested[arr][]=1&nested[arr][]=2' end