Coder Social home page Coder Social logo

gemnasium-gitlab-service's People

Contributors

gonzoyumo avatar halfbyte avatar kp666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gemnasium-gitlab-service's Issues

support webmock version 3.0

$ bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.5.0
Using rugged 0.24.0
Using rspec-core 2.99.2
Using diff-lcs 1.3
Using rspec-mocks 2.99.4
Using public_suffix 2.0.5
Using safe_yaml 1.0.4
Using hashdiff 0.3.5
Using bundler 1.15.1
Using gemnasium-gitlab-service 0.2.6 from source at `.`
Using rspec-expectations 2.99.2
Using addressable 2.5.1
Using crack 0.4.3
Using rspec 2.99.0
Fetching webmock 3.0.1 (was 1.24.6)
Installing webmock 3.0.1 (was 1.24.6)
Bundle complete! 4 Gemfile dependencies, 15 gems now installed.
Bundled gems are installed into ./vendor/bundle.
The latest bundler is 1.15.2, but you are currently running 1.15.1.
To update, run `gem install bundler`
pravi@nishumbha:~/forge/debian/git/pkg-ruby-extras/ruby-gemnasium-gitlab-service$ bundle exec rake spec
/usr/bin/ruby2.3 -S rspec ./spec/gemnasium/gitlab_service/client_spec.rb ./spec/gemnasium/gitlab_service/connection_spec.rb ./spec/gemnasium/gitlab_service/pusher_spec.rb ./spec/gemnasium/gitlab_service_spec.rb
.F.FF...

Failures:

  1) Gemnasium::GitlabService::Client upload_files issues a POST request
     Failure/Error: client.upload_files(
     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST https://api.gemnasium.com/v1/projects/project_slug/dependency_files with body '[{"path":"Gemfile","sha":"sha of Gemfile","content":"Y29udGVudCBvZiBHZW1maWxl\n"},{"path":"Gemfile.lock","sha":"sha of Gemfile.lock","content":"Y29udGVudCBvZiBHZW1maWxlLmxvY2s=\n"}]' with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Basic WDpzZWNyZXRfYXBpX2tleQ==', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6', 'X-Gms-Branch'=>'branch_name', 'X-Gms-Revision'=>'commit_sha'}
       
       You can stub this request with the following snippet:
       
       stub_request(:post, "https://api.gemnasium.com/v1/projects/project_slug/dependency_files").
         with(body: "[{\"path\":\"Gemfile\",\"sha\":\"sha of Gemfile\",\"content\":\"Y29udGVudCBvZiBHZW1maWxl\\n\"},{\"path\":\"Gemfile.lock\",\"sha\":\"sha of Gemfile.lock\",\"content\":\"Y29udGVudCBvZiBHZW1maWxlLmxvY2s=\\n\"}]",
              headers: {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Basic WDpzZWNyZXRfYXBpX2tleQ==', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6', 'X-Gms-Branch'=>'branch_name', 'X-Gms-Revision'=>'commit_sha'}).
         to_return(status: 200, body: "", headers: {})
       
       registered request stubs:
       
       stub_request(:post, "https://X:[email protected]/v1/test_path").
         with(body: {"foo"=>"bar"},
              headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       
       Body diff:
        [["~",
         "",
         [{"path"=>"Gemfile",
           "sha"=>"sha of Gemfile",
           "content"=>"Y29udGVudCBvZiBHZW1maWxl\n"},
          {"path"=>"Gemfile.lock",
           "sha"=>"sha of Gemfile.lock",
           "content"=>"Y29udGVudCBvZiBHZW1maWxlLmxvY2s=\n"}],
         {"foo"=>"bar"}]]
       
       stub_request(:get, "https://X:[email protected]/v1/test_path").
         with(headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       stub_request(:post, "https://X:[email protected]/v1/projects/project_slug/dependency_files").
         with(headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       
       ============================================================
     # ./lib/gemnasium/gitlab_service/connection.rb:28:in `post'
     # ./lib/gemnasium/gitlab_service/client.rb:39:in `request'
     # ./lib/gemnasium/gitlab_service/client.rb:22:in `upload_files'
     # ./spec/gemnasium/gitlab_service/client_spec.rb:24:in `block (3 levels) in <top (required)>'

  2) Gemnasium::GitlabService::Connection get issues a GET request
     Failure/Error: before { connection.get('test_path') }
     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: GET https://api.gemnasium.com/v1/test_path with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Basic WDpzZWNyZXRfYXBpX2tleQ==', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'}
       
       You can stub this request with the following snippet:
       
       stub_request(:get, "https://api.gemnasium.com/v1/test_path").
         with(headers: {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Basic WDpzZWNyZXRfYXBpX2tleQ==', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'}).
         to_return(status: 200, body: "", headers: {})
       
       registered request stubs:
       
       stub_request(:post, "https://X:[email protected]/v1/test_path").
         with(body: {"foo"=>"bar"},
              headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       stub_request(:get, "https://X:[email protected]/v1/test_path").
         with(headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       stub_request(:post, "https://X:[email protected]/v1/projects/project_slug/dependency_files").
         with(headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       
       ============================================================
     # ./lib/gemnasium/gitlab_service/connection.rb:34:in `get'
     # ./spec/gemnasium/gitlab_service/connection_spec.rb:16:in `block (3 levels) in <top (required)>'

  3) Gemnasium::GitlabService::Connection post issues a POST request
     Failure/Error: before { connection.post('test_path', { foo: 'bar' }.to_json) }
     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST https://api.gemnasium.com/v1/test_path with body '{"foo":"bar"}' with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Basic WDpzZWNyZXRfYXBpX2tleQ==', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'}
       
       You can stub this request with the following snippet:
       
       stub_request(:post, "https://api.gemnasium.com/v1/test_path").
         with(body: "{\"foo\":\"bar\"}",
              headers: {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Basic WDpzZWNyZXRfYXBpX2tleQ==', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'}).
         to_return(status: 200, body: "", headers: {})
       
       registered request stubs:
       
       stub_request(:post, "https://X:[email protected]/v1/test_path").
         with(body: {"foo"=>"bar"},
              headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       stub_request(:get, "https://X:[email protected]/v1/test_path").
         with(headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       stub_request(:post, "https://X:[email protected]/v1/projects/project_slug/dependency_files").
         with(headers: {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'User-Agent'=>'Gemnasium Gitlab Service - v0.2.6'})
       
       ============================================================
     # ./lib/gemnasium/gitlab_service/connection.rb:28:in `post'
     # ./spec/gemnasium/gitlab_service/connection_spec.rb:25:in `block (3 levels) in <top (required)>'

Finished in 0.02203 seconds
8 examples, 3 failures

Failed examples:

rspec ./spec/gemnasium/gitlab_service/client_spec.rb:30 # Gemnasium::GitlabService::Client upload_files issues a POST request
rspec ./spec/gemnasium/gitlab_service/connection_spec.rb:18 # Gemnasium::GitlabService::Connection get issues a GET request
rspec ./spec/gemnasium/gitlab_service/connection_spec.rb:27 # Gemnasium::GitlabService::Connection post issues a POST request
/usr/bin/ruby2.3 -S rspec ./spec/gemnasium/gitlab_service/client_spec.rb ./spec/gemnasium/gitlab_service/connection_spec.rb ./spec/gemnasium/gitlab_service/pusher_spec.rb ./spec/gemnasium/gitlab_service_spec.rb failed

In debian, we already have webmock 3.0 and would like to run tests with it. Please update the tests to run with webmock 3.0.

0.2.5 doesn't work with Ruby 2.0

The Travis-CI build failed for the 2.0 build and tests.

Is 0.2.4 intended to be the last release supporting ruby 2.0 or was this an oversight?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.