diff options
author | Stan Hu <stanhu@gmail.com> | 2016-11-11 16:48:04 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-11-21 16:47:28 -0800 |
commit | 489d241c8d68ed527fccb73a1f7e46e9a567c971 (patch) | |
tree | e395ac55ad530eabac3873e789b1ddf681ad5a06 | |
parent | 82d7a3a3dd61c70c87a8a4a116b2ce6c0612de59 (diff) | |
download | gitlab-ce-489d241c8d68ed527fccb73a1f7e46e9a567c971.tar.gz |
Incorporate review comments
-rw-r--r-- | lib/bitbucket/page.rb | 3 | ||||
-rw-r--r-- | lib/omniauth/strategies/bitbucket.rb | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/bitbucket/page.rb b/lib/bitbucket/page.rb index ad9a2baba36..0e8ce11aa1d 100644 --- a/lib/bitbucket/page.rb +++ b/lib/bitbucket/page.rb @@ -29,8 +29,7 @@ module Bitbucket end def representation_class(type) - class_name = "Bitbucket::Representation::#{type.to_s.camelize}" - class_name.constantize + class_name = Bitbucket::Representation.const_get(type.to_s.camelize) end end end diff --git a/lib/omniauth/strategies/bitbucket.rb b/lib/omniauth/strategies/bitbucket.rb index 2006e7582ce..c5484c59c47 100644 --- a/lib/omniauth/strategies/bitbucket.rb +++ b/lib/omniauth/strategies/bitbucket.rb @@ -32,7 +32,7 @@ module OmniAuth end def primary_email - primary = emails.find{ |i| i['is_primary'] && i['is_confirmed'] } + primary = emails.find { |i| i['is_primary'] && i['is_confirmed'] } primary && primary['email'] || nil end |