Sha256: e545a13829afbc32d6b6d0b27e7a5328abdfbab1c728d1358f6c7c2cf252714a

Contents?: true

Size: 459 Bytes

Versions: 84

Compression:

Stored size: 459 Bytes

Contents

require 'gh'

module GH
  class FakeRemote < Remote
    def setup(host, options)
      @authenticated = options[:password] == 'password'
      super
    end

    def post(key, body)
      raise GH::Error unless @authenticated and key == '/authorizations'
      frontend.load("url" => "https://api.github.com/authorizations/1", "token" => "github_token")
    end

    def head(*) end
    def delete(*) end
  end

  DefaultStack.replace(Remote, FakeRemote)
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
travis-1.5.7.travis.341.4 spec/support/fake_github.rb
travis-1.5.7.travis.338.4 spec/support/fake_github.rb
travis-1.5.6 spec/support/fake_github.rb
travis-1.5.6.travis.337.4 spec/support/fake_github.rb
travis-1.5.6.travis.336.4 spec/support/fake_github.rb
travis-1.5.6.travis.333.4 spec/support/fake_github.rb
travis-1.5.6.travis.332.4 spec/support/fake_github.rb
travis-1.5.6.travis.330.4 spec/support/fake_github.rb
travis-1.5.6.travis.329.4 spec/support/fake_github.rb
travis-1.5.6.travis.326.4 spec/support/fake_github.rb
travis-1.5.6.travis.324.4 spec/support/fake_github.rb
travis-1.5.6.travis.323.4 spec/support/fake_github.rb
travis-1.5.6.travis.320.4 spec/support/fake_github.rb
travis-1.5.6.travis.319.4 spec/support/fake_github.rb
travis-1.5.6.travis.317.4 spec/support/fake_github.rb
travis-1.5.6.travis.315.4 spec/support/fake_github.rb
travis-1.5.6.travis.314.4 spec/support/fake_github.rb
travis-1.5.6.travis.312.4 spec/support/fake_github.rb
travis-1.5.6.travis.307.4 spec/support/fake_github.rb
travis-1.5.6.travis.306.4 spec/support/fake_github.rb