Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omniauth upgrade #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source "https://rubygems.org"
gem "rails", "~>4.2.2"
gem "resque"
gem "resque-lock-timeout"
gem "octokit"
gem "octokit", "~>4.18.0"
gem "unicorn"
gem "yajl-ruby"
gem "posix-spawn"
Expand Down
24 changes: 15 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.6)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
arel (6.0.0)
ast (2.0.0)
astrolabe (1.3.0)
Expand Down Expand Up @@ -69,7 +70,7 @@ GEM
dotenv (0.9.0)
dpl (1.5.7)
erubis (2.7.0)
faraday (0.9.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.9.1)
faraday (>= 0.7.4, < 0.10)
Expand Down Expand Up @@ -105,7 +106,7 @@ GEM
mono_logger (1.1.0)
multi_json (1.11.0)
multi_xml (0.5.5)
multipart-post (2.0.0)
multipart-post (2.1.1)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
Expand All @@ -115,8 +116,9 @@ GEM
net-ssh (>= 2.6.5)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
octokit (3.4.0)
sawyer (~> 0.5.3)
octokit (4.18.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
parser (2.2.2.5)
ast (>= 1.1, < 3.0)
pg (0.17.1)
Expand All @@ -126,6 +128,7 @@ GEM
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
public_suffix (3.1.1)
rack (1.6.2)
rack-contrib (1.1.0)
rack (>= 0.9.1)
Expand Down Expand Up @@ -196,9 +199,9 @@ GEM
ruby-progressbar (~> 1.4)
ruby-progressbar (1.5.1)
safe_yaml (1.0.4)
sawyer (0.5.5)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
Expand Down Expand Up @@ -256,7 +259,7 @@ DEPENDENCIES
foreman
hipchat
meta_request
octokit
octokit (~> 4.18.0)
pg
posix-spawn
pry
Expand All @@ -273,3 +276,6 @@ DEPENDENCIES
warden-github-rails
webmock
yajl-ruby

BUNDLED WITH
1.17.3
4 changes: 2 additions & 2 deletions spec/controllers/concerns/webhook_validations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def request

it "makes methods available" do
klass = WebhookValidationsTester.new("192.30.252.41")
expect(klass).to be_valid_incoming_webhook_address
expect(klass.valid_incoming_webhook_address?).to be_true
klass = WebhookValidationsTester.new("127.0.0.1")
expect(klass).to_not be_valid_incoming_webhook_address
expect(klass.valid_incoming_webhook_address?).to be_false
end
end
2 changes: 1 addition & 1 deletion spec/models/concerns/api_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ApiClientTester
ENV["GITHUB_CLIENT_ID"] = "id"
ENV["GITHUB_CLIENT_SECRET"] = "secret"

stub_request(:get, "https://api.github.com/meta?client_id=id&client_secret=secret")
stub_request(:get, "https://id:secret@api.github.com/meta")
.with(:headers => octokit_request_headers)
.to_return(:status => 200, :body => "ok")

Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'securerandom'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= "test"
ENV["RAILS_SECRET_KEY_BASE"] ||= SecureRandom.hex
Expand Down
3 changes: 2 additions & 1 deletion spec/support/helpers/meta_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ def stub_meta
}
}

get_url = "https://api.github.com/meta?client_id=%3Cunknown-client-id%3E&client_secret=%3Cunknown-client-secret%3E"
basic_auth = "#{ENV['GITHUB_CLIENT_ID']}:#{ENV['GITHUB_CLIENT_SECRET']}@"
get_url = "https://#{basic_auth}api.github.com/meta"

stub_request(:get, get_url).with(request_params)
.to_return(:status => 200, :body => double("hooks" => ["192.30.252.0/22"]))
Expand Down
Binary file removed vendor/cache/addressable-2.3.6.gem
Binary file not shown.
Binary file added vendor/cache/addressable-2.8.0.gem
Binary file not shown.
Binary file removed vendor/cache/faraday-0.9.0.gem
Binary file not shown.
Binary file added vendor/cache/faraday-0.9.2.gem
Binary file not shown.
Binary file removed vendor/cache/multipart-post-2.0.0.gem
Binary file not shown.
Binary file added vendor/cache/multipart-post-2.1.1.gem
Binary file not shown.
Binary file removed vendor/cache/octokit-3.4.0.gem
Binary file not shown.
Binary file added vendor/cache/octokit-4.18.0.gem
Binary file not shown.
Binary file added vendor/cache/public_suffix-3.1.1.gem
Binary file not shown.
Binary file removed vendor/cache/sawyer-0.5.5.gem
Binary file not shown.
Binary file added vendor/cache/sawyer-0.8.2.gem
Binary file not shown.