Sha256: 260004e2ae48b15d5d15aa3dd0972a2bc33283dbfb7c7cbc4fb7fe932ed690bb

Contents?: true

Size: 516 Bytes

Versions: 317

Compression:

Stored size: 516 Bytes

Contents

require 'gh'

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

    def http(*)
      raise NotImplementedError
    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

317 entries across 317 versions & 3 rubygems

Version Path
travis-1.7.2.travis.634.5 spec/support/fake_github.rb
travis-1.7.2.travis.633.5 spec/support/fake_github.rb
travis-1.7.2.travis.632.5 spec/support/fake_github.rb
travis-1.7.2.travis.630.5 spec/support/fake_github.rb
travis-1.7.2.travis.627.5 spec/support/fake_github.rb
travis-1.7.2.travis.626.5 spec/support/fake_github.rb
travis-1.7.2.travis.625.5 spec/support/fake_github.rb
travis-1.7.2.travis.623.5 spec/support/fake_github.rb
travis-1.7.2.travis.621.5 spec/support/fake_github.rb
travis-1.7.1 spec/support/fake_github.rb
travis-1.7.1.travis.613.5 spec/support/fake_github.rb
travis-1.7.0 spec/support/fake_github.rb
travis-1.6.18.travis.612.5 spec/support/fake_github.rb
travis-1.6.18.travis.611.5 spec/support/fake_github.rb
travis-1.6.18.travis.610.5 spec/support/fake_github.rb
travis-1.6.18.travis.609.5 spec/support/fake_github.rb
travis-1.6.18.travis.608.5 spec/support/fake_github.rb
travis-1.6.18.travis.607.5 spec/support/fake_github.rb
travis-1.6.18.travis.606.5 spec/support/fake_github.rb
travis-1.6.18.travis.605.5 spec/support/fake_github.rb