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.8.14.travis.1178.9 spec/support/fake_github.rb
travis-1.8.14.travis.1175.9 spec/support/fake_github.rb
travis-1.8.14.travis.1172.9 spec/support/fake_github.rb
travis-1.8.14.travis.1164.9 spec/support/fake_github.rb
travis-1.8.14.travis.1163.9 spec/support/fake_github.rb
travis-1.8.14.travis.1162.9 spec/support/fake_github.rb
travis-1.8.14.travis.1160.9 spec/support/fake_github.rb
travis-1.8.13 spec/support/fake_github.rb
travis-1.8.14.travis.1156.9 spec/support/fake_github.rb
travis-1.8.14.travis.1155.9 spec/support/fake_github.rb
travis-1.8.13.travis.1152.9 spec/support/fake_github.rb
travis-1.8.13.travis.1148.9 spec/support/fake_github.rb
travis-1.8.12 spec/support/fake_github.rb
travis-1.8.13.travis.1141.9 spec/support/fake_github.rb
travis-1.8.12.travis.1136.9 spec/support/fake_github.rb
travis-1.8.12.travis.1135.9 spec/support/fake_github.rb
travis-1.8.12.travis.1125.9 spec/support/fake_github.rb
travis-1.8.12.pre.rc1 spec/support/fake_github.rb
travis-1.8.12.travis.1116.9 spec/support/fake_github.rb
travis-1.8.12.travis.1111.9 spec/support/fake_github.rb