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.6.9.travis.479.6 spec/support/fake_github.rb
travis-1.6.9.travis.463.6 spec/support/fake_github.rb
travis-1.6.9.travis.462.6 spec/support/fake_github.rb
travis-1.6.9.travis.461.6 spec/support/fake_github.rb
travis-1.6.9.travis.458.6 spec/support/fake_github.rb
travis-1.6.8 spec/support/fake_github.rb
travis-1.6.8.travis.457.6 spec/support/fake_github.rb
travis-1.6.8.travis.456.6 spec/support/fake_github.rb
travis-1.6.8.travis.455.6 spec/support/fake_github.rb
travis-1.6.8.travis.454.6 spec/support/fake_github.rb
travis-1.6.8.travis.453.6 spec/support/fake_github.rb
travis-1.6.8.travis.452.6 spec/support/fake_github.rb
travis-1.6.8.travis.451.6 spec/support/fake_github.rb
travis-1.6.8.travis.450.6 spec/support/fake_github.rb
travis-1.6.8.travis.449.6 spec/support/fake_github.rb
travis-1.6.8.travis.447.6 spec/support/fake_github.rb
travis-1.6.7.travis.446.6 spec/support/fake_github.rb
travis-1.6.7 spec/support/fake_github.rb
travis-1.6.7.travis.445.6 spec/support/fake_github.rb
travis-1.6.7.travis.443.6 spec/support/fake_github.rb