Skip to content

Commit

Permalink
Switch to Ruby 3.0+ Compatible Bitbucket Omniauth Provider
Browse files Browse the repository at this point in the history
* switch to ruby 3-compatible omniauth provider

* vuln bump for commonmarker

* remove latest brakeman check until ruby 3.0 installed

* fix comment's indentation
  • Loading branch information
zendesk-mattlefevre authored Jun 5, 2023
1 parent 6d405b2 commit 107efb4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem 'omniauth-github', git: "https://github.com/omniauth/omniauth-github.git" #
gem 'omniauth-google-oauth2'
gem 'omniauth-ldap'
gem 'omniauth-gitlab'
gem 'omniauth-bitbucket'
gem 'omniauth-atlassian-bitbucket'
gem 'omniauth-rails_csrf_protection' # remove once https://github.com/omniauth/omniauth/pull/809 is resolved
gem 'octokit'
gem 'faraday', '~> 2.7'
Expand Down
14 changes: 4 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ GEM
chef-utils (18.1.29)
concurrent-ruby
coderay (1.1.1)
commonmarker (0.23.8)
commonmarker (0.23.9)
concurrent-ruby (1.2.2)
connection_pool (2.2.1)
crack (0.4.3)
Expand Down Expand Up @@ -455,7 +455,6 @@ GEM
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
oauth (0.5.6)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
Expand All @@ -468,10 +467,8 @@ GEM
omniauth (1.9.2)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
omniauth-bitbucket (0.0.2)
multi_json (~> 1.7)
omniauth (~> 1.1)
omniauth-oauth (~> 1.0)
omniauth-atlassian-bitbucket (0.1.0)
omniauth-oauth2
omniauth-gitlab (1.0.2)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.0)
Expand All @@ -485,9 +482,6 @@ GEM
omniauth (~> 1.0)
pyu-ruby-sasl (~> 0.0.3.2)
rubyntlm (~> 0.3.4)
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.7.3)
oauth2 (>= 1.4, < 3)
omniauth (>= 1.9, < 3)
Expand Down Expand Up @@ -709,7 +703,7 @@ DEPENDENCIES
net-http-persistent
octokit
omniauth
omniauth-bitbucket
omniauth-atlassian-bitbucket
omniauth-github!
omniauth-gitlab
omniauth-google-oauth2
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ end

desc "'Run brakeman, use `bundle exec brakeman --add-engine-path 'plugins/*' -I` to add or remove obsolete ignores"
task :brakeman do
system("brakeman --no-pager --add-engine-path 'plugins/*' --ensure-latest") ||
system("brakeman --no-pager --add-engine-path 'plugins/*'") ||
# TODO: Need to readd --ensure-latest once upgraded to ruby 3.0
# system("brakeman --no-pager --add-engine-path 'plugins/*' --ensure-latest") ||
abort("Fix the found issues, or add new ignored with:\nbundle exec brakeman --add-engine-path 'plugins/*' -I")
end

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
end

if Rails.application.config.samson.auth.bitbucket
require 'omniauth-bitbucket'
require 'omniauth-atlassian-bitbucket'
provider(
:bitbucket,
ENV.fetch('BITBUCKET_KEY'),
Expand Down

0 comments on commit 107efb4

Please sign in to comment.