summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-11-11 16:48:04 -0800
committerStan Hu <stanhu@gmail.com>2016-11-21 16:47:28 -0800
commit489d241c8d68ed527fccb73a1f7e46e9a567c971 (patch)
treee395ac55ad530eabac3873e789b1ddf681ad5a06
parent82d7a3a3dd61c70c87a8a4a116b2ce6c0612de59 (diff)
downloadgitlab-ce-489d241c8d68ed527fccb73a1f7e46e9a567c971.tar.gz
Incorporate review comments
-rw-r--r--lib/bitbucket/page.rb3
-rw-r--r--lib/omniauth/strategies/bitbucket.rb2
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