Sha256: 69f642ff053f6ca51348aeb371e2e85c13be42b7be0aa734af2fa3fda2d0ae24
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
$:.unshift File.expand_path('..', __FILE__) $:.unshift File.expand_path('../../lib', __FILE__) require 'simplecov' SimpleCov.start require 'octokit' require 'rspec' require 'webmock/rspec' def a_delete(url) a_request(:delete, github_url(url)) end def a_get(url) a_request(:get, github_url(url)) end def a_patch(url) a_request(:patch, github_url(url)) end def a_post(url) a_request(:post, github_url(url)) end def a_put(url) a_request(:put, github_url(url)) end def stub_delete(url) stub_request(:delete, github_url(url)) end def stub_get(url) stub_request(:get, github_url(url)) end def stub_patch(url) stub_request(:patch, github_url(url)) end def stub_post(url) stub_request(:post, github_url(url)) end def stub_put(url) stub_request(:put, github_url(url)) end def fixture_path File.expand_path("../fixtures", __FILE__) end def fixture(file) File.new(fixture_path + '/' + file) end def github_url(url) if url =~ /^http/ url elsif @client && @client.authenticated? "https://pengwynn%2Ftoken:OU812@github.com#{url}" elsif @client && @client.oauthed? "https://github.com#{url}?access_token=#{@client.oauth_token}" else "https://github.com#{url}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octokit-0.6.4 | spec/helper.rb |