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.6.travis.304.4 spec/support/fake_github.rb
travis-1.5.6.travis.303.4 spec/support/fake_github.rb
travis-1.5.6.travis.301.4 spec/support/fake_github.rb
travis-1.5.6.travis.299.4 spec/support/fake_github.rb
travis-1.5.6.travis.297.4 spec/support/fake_github.rb
travis-1.5.6.travis.296.4 spec/support/fake_github.rb
travis-1.5.5 spec/support/fake_github.rb
travis-1.5.4 spec/support/fake_github.rb
travis-1.5.3 spec/support/fake_github.rb
travis-1.5.2 spec/support/fake_github.rb
travis-1.5.1 spec/support/fake_github.rb
travis-1.5.0 spec/support/fake_github.rb
travis-1.4.0 spec/support/fake_github.rb
travis-1.3.1 spec/support/fake_github.rb
travis-1.3.0 spec/support/fake_github.rb
travis-1.2.8 spec/support/fake_github.rb
travis-1.2.7 spec/support/fake_github.rb
travis-1.2.6 spec/support/fake_github.rb
travis-1.2.5 spec/support/fake_github.rb
travis-1.2.4 spec/support/fake_github.rb