Avoid comma after the last item of a hash
This commit is contained in:
parent
32c4165919
commit
8d4ec79835
|
@ -55,6 +55,3 @@ Style/RaiseArgs:
|
||||||
|
|
||||||
Style/SpaceInsideHashLiteralBraces:
|
Style/SpaceInsideHashLiteralBraces:
|
||||||
EnforcedStyle: no_space
|
EnforcedStyle: no_space
|
||||||
|
|
||||||
Style/TrailingComma:
|
|
||||||
EnforcedStyleForMultiline: 'comma'
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ module OmniAuth
|
||||||
:test_mode => false,
|
:test_mode => false,
|
||||||
:logger => default_logger,
|
:logger => default_logger,
|
||||||
:allowed_request_methods => [:get, :post],
|
:allowed_request_methods => [:get, :post],
|
||||||
:mock_auth => {:default => AuthHash.new('provider' => 'default', 'uid' => '1234', 'info' => {'name' => 'Example User'})},
|
:mock_auth => {:default => AuthHash.new('provider' => 'default', 'uid' => '1234', 'info' => {'name' => 'Example User'})}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ describe OmniAuth::AuthHash do
|
||||||
:first_name => 'Phillip',
|
:first_name => 'Phillip',
|
||||||
:last_name => 'Fry',
|
:last_name => 'Fry',
|
||||||
:nickname => 'meatbag',
|
:nickname => 'meatbag',
|
||||||
:email => 'fry@planetexpress.com',
|
:email => 'fry@planetexpress.com'
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ def make_env(path = '/auth/test', props = {})
|
||||||
'REQUEST_METHOD' => 'GET',
|
'REQUEST_METHOD' => 'GET',
|
||||||
'PATH_INFO' => path,
|
'PATH_INFO' => path,
|
||||||
'rack.session' => {},
|
'rack.session' => {},
|
||||||
'rack.input' => StringIO.new('test=true'),
|
'rack.input' => StringIO.new('test=true')
|
||||||
}.merge(props)
|
}.merge(props)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ describe OmniAuth::Strategy do
|
||||||
it 'is turned into an env variable on the callback phase, containing full path' do
|
it 'is turned into an env variable on the callback phase, containing full path' do
|
||||||
env = {
|
env = {
|
||||||
'rack.session' => {'omniauth.origin' => 'http://example.com/sub_uri/origin'},
|
'rack.session' => {'omniauth.origin' => 'http://example.com/sub_uri/origin'},
|
||||||
'SCRIPT_NAME' => '/sub_uri',
|
'SCRIPT_NAME' => '/sub_uri'
|
||||||
}
|
}
|
||||||
|
|
||||||
expect { strategy.call(make_env('/auth/test/callback', env)) }.to raise_error('Callback Phase')
|
expect { strategy.call(make_env('/auth/test/callback', env)) }.to raise_error('Callback Phase')
|
||||||
|
|
|
@ -140,7 +140,7 @@ describe OmniAuth do
|
||||||
'some_word' => 'SomeWord',
|
'some_word' => 'SomeWord',
|
||||||
'AnotherWord' => 'AnotherWord',
|
'AnotherWord' => 'AnotherWord',
|
||||||
'one' => 'One',
|
'one' => 'One',
|
||||||
'three_words_now' => 'ThreeWordsNow',
|
'three_words_now' => 'ThreeWordsNow'
|
||||||
}.each_pair { |k, v| expect(OmniAuth::Utils.camelize(k)).to eq(v) }
|
}.each_pair { |k, v| expect(OmniAuth::Utils.camelize(k)).to eq(v) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue