mirror of
https://github.com/samsonjs/simple_oauth.git
synced 2026-04-27 14:57:45 +00:00
Fix RuboCop offenses
This commit is contained in:
parent
07c7f80079
commit
987239fefe
3 changed files with 5 additions and 2 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Max: 16
|
||||||
|
|
||||||
Metrics/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
Max: 1
|
Max: 1
|
||||||
|
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -9,7 +9,7 @@ group :test do
|
||||||
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
|
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
|
||||||
gem 'rest-client', '~> 1.6.0', :platforms => [:jruby, :ruby_18]
|
gem 'rest-client', '~> 1.6.0', :platforms => [:jruby, :ruby_18]
|
||||||
gem 'rspec', '>= 2.14'
|
gem 'rspec', '>= 2.14'
|
||||||
gem 'rubocop', '>= 0.25', :platforms => [:ruby_19, :ruby_20, :ruby_21]
|
gem 'rubocop', '>= 0.28', :platforms => [:ruby_19, :ruby_20, :ruby_21]
|
||||||
gem 'simplecov', '>= 0.9'
|
gem 'simplecov', '>= 0.9'
|
||||||
gem 'yardstick'
|
gem 'yardstick'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ module SimpleOAuth
|
||||||
matching_keys, extra_keys = options.keys.partition { |key| ATTRIBUTE_KEYS.include?(key) }
|
matching_keys, extra_keys = options.keys.partition { |key| ATTRIBUTE_KEYS.include?(key) }
|
||||||
extra_keys -= IGNORED_KEYS
|
extra_keys -= IGNORED_KEYS
|
||||||
if options[:ignore_extra_keys] || extra_keys.empty?
|
if options[:ignore_extra_keys] || extra_keys.empty?
|
||||||
Hash[options.select { |key, _value| matching_keys.include?(key) }.collect { |key, value| [:"oauth_#{key}", value] }]
|
Hash[options.select { |key, _| matching_keys.include?(key) }.collect { |key, value| [:"oauth_#{key}", value] }]
|
||||||
else
|
else
|
||||||
fail "SimpleOAuth: Found extra option keys not matching ATTRIBUTE_KEYS:\n [#{extra_keys.collect(&:inspect).join(', ')}]"
|
fail "SimpleOAuth: Found extra option keys not matching ATTRIBUTE_KEYS:\n [#{extra_keys.collect(&:inspect).join(', ')}]"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue