Permalink
Browse files

Look for endpoints in ENV

  • Loading branch information...
1 parent c0c40c3 commit a946aeb971c300eef2ba010628da987b40caa42c @pengwynn pengwynn committed Dec 22, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −2 lib/octokit/configuration.rb
  2. +1 −0 spec/octokit/client_spec.rb
@@ -23,8 +23,8 @@ module Configuration
DEFAULT_ADAPTER = Faraday.default_adapter
DEFAULT_API_VERSION = 3
- DEFAULT_API_ENDPOINT = 'https://api.github.com/'
- DEFAULT_WEB_ENDPOINT = 'https://github.com/'
+ DEFAULT_API_ENDPOINT = ENV['OCTOKIT_API_ENDPOINT'] || 'https://api.github.com/'
+ DEFAULT_WEB_ENDPOINT = ENV['OCTOKIT_WEB_ENDPOINT'] || 'https://github.com/'
DEFAULT_USER_AGENT = "Octokit Ruby Gem #{Octokit::VERSION}".freeze
DEFAULT_AUTO_TRAVERSAL = false
@@ -176,6 +176,7 @@
client = Octokit::Client.new
expect(client.api_endpoint).to eq('http://foo.dev/')
end
+
end
describe "request_host" do

0 comments on commit a946aeb

Please sign in to comment.