Skip to content

Commit

Permalink
Merge 24c9792 into 5121fde
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilewski committed Dec 25, 2014
2 parents 5121fde + 24c9792 commit 6199b6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Expand Up @@ -16,6 +16,9 @@ Metrics/ParameterLists:
Max: 4
CountKeywordArgs: true

Metrics/AbcSize:
Enabled: false

Style/AccessModifierIndentation:
EnforcedStyle: outdent

Expand Down
8 changes: 4 additions & 4 deletions lib/omniauth/strategy.rb
Expand Up @@ -492,10 +492,10 @@ def merge_stack(stack)

def ssl?
request.env['HTTPS'] == 'on' ||
request.env['HTTP_X_FORWARDED_SSL'] == 'on' ||
request.env['HTTP_X_FORWARDED_SCHEME'] == 'https' ||
(request.env['HTTP_X_FORWARDED_PROTO'] && request.env['HTTP_X_FORWARDED_PROTO'].split(',')[0] == 'https') ||
request.env['rack.url_scheme'] == 'https'
request.env['HTTP_X_FORWARDED_SSL'] == 'on' ||
request.env['HTTP_X_FORWARDED_SCHEME'] == 'https' ||
(request.env['HTTP_X_FORWARDED_PROTO'] && request.env['HTTP_X_FORWARDED_PROTO'].split(',')[0] == 'https') ||
request.env['rack.url_scheme'] == 'https'
end
end
end
1 change: 0 additions & 1 deletion spec/omniauth/strategy_spec.rb
Expand Up @@ -337,7 +337,6 @@ def make_env(path = '/auth/test', props = {})
expect { strategy.call(make_env('/auth/test/callback', env)) }.to raise_error('Callback Phase')
expect(strategy.last_env['omniauth.origin']).to eq('http://example.com/sub_uri/origin')
end

end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/omniauth_spec.rb
Expand Up @@ -122,7 +122,7 @@ class ExampleStrategy
describe '::Utils' do
describe '.deep_merge' do
it 'combines hashes' do
expect(OmniAuth::Utils.deep_merge({'abc' => {'def' => 123}}, {'abc' => {'foo' => 'bar'}})).to eq('abc' => {'def' => 123, 'foo' => 'bar'})
expect(OmniAuth::Utils.deep_merge({'abc' => {'def' => 123}}, 'abc' => {'foo' => 'bar'})).to eq('abc' => {'def' => 123, 'foo' => 'bar'})
end
end

Expand Down

0 comments on commit 6199b6a

Please sign in to comment.