Permalink
Browse files

workaround for ssl cert discovery for oauth2 client

  • Loading branch information...
1 parent 6c694d2 commit 076424b8ee372133f5f3d5813d6f6dcd2188078e @atmos atmos committed May 17, 2011
Showing with 13 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +10 −0 lib/warden-github/proxy.rb
  3. +1 −1 lib/warden-github/version.rb
  4. +1 −1 warden-github.gemspec
View
@@ -2,3 +2,4 @@ coverage
.bundle
pkg
.DS_Store
+Gemfile.lock
View
@@ -7,8 +7,18 @@ def initialize(client_id, secret, scopes, callback_url)
@client_id, @secret, @scopes, @callback_url = client_id, secret, scopes, callback_url
end
+ def ssl_options
+ ca_file = "/usr/lib/ssl/certs/ca-certificates.crt"
+ if File.exists?(ca_file)
+ { :ca_file => ca_file }
+ else
+ { :ca_file => ''}
+ end
+ end
+
def client
@client ||= OAuth2::Client.new(@client_id, @secret,
+ :ssl => ssl_options,
:site => 'https://github.com',
:authorize_path => '/login/oauth/authorize',
:access_token_path => '/login/oauth/access_token')
@@ -1,5 +1,5 @@
module Warden
module Github
- VERSION = "0.0.8"
+ VERSION = "0.0.9"
end
end
View
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
Gem::Specification.new do |s|
s.name = "warden-github"
- s.version = "0.0.8"
+ s.version = "0.0.9"
s.platform = Gem::Platform::RUBY
s.authors = ["Corey Donohoe"]
s.email = ["atmos@atmos.org"]

0 comments on commit 076424b

Please sign in to comment.