codeclimate-api-ruby-client 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +15 -0
  5. data/.travis.yml +5 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +25 -0
  8. data/Guardfile +49 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +49 -0
  11. data/Rakefile +6 -0
  12. data/TODO.md +22 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/codeclimate-api-ruby-client.gemspec +28 -0
  16. data/fixtures/vcr_cassettes/code_climate/builds/list.yml +60 -0
  17. data/fixtures/vcr_cassettes/code_climate/metrics/gpa.yml +60 -0
  18. data/fixtures/vcr_cassettes/code_climate/orgs/list.yml +60 -0
  19. data/fixtures/vcr_cassettes/code_climate/ref_points/list.yml +60 -0
  20. data/fixtures/vcr_cassettes/code_climate/repos/get.yml +60 -0
  21. data/fixtures/vcr_cassettes/code_climate/services/list.yml +61 -0
  22. data/fixtures/vcr_cassettes/code_climate/snapshots/show.yml +60 -0
  23. data/fixtures/vcr_cassettes/code_climate/test_reports/list.yml +63 -0
  24. data/fixtures/vcr_cassettes/code_climate/user.yml +61 -0
  25. data/lib/code_climate.rb +1 -0
  26. data/lib/code_climate/client.rb +83 -0
  27. data/lib/code_climate/middleware.rb +16 -0
  28. data/lib/code_climate/resources/base.rb +9 -0
  29. data/lib/code_climate/resources/build.rb +8 -0
  30. data/lib/code_climate/resources/metric.rb +8 -0
  31. data/lib/code_climate/resources/org.rb +9 -0
  32. data/lib/code_climate/resources/ref_point.rb +8 -0
  33. data/lib/code_climate/resources/repo.rb +37 -0
  34. data/lib/code_climate/resources/service.rb +8 -0
  35. data/lib/code_climate/resources/snapshot.rb +8 -0
  36. data/lib/code_climate/resources/test_report.rb +8 -0
  37. data/lib/code_climate/resources/user.rb +10 -0
  38. data/lib/code_climate/version.rb +3 -0
  39. metadata +123 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 57cd3d27ca964cd7bdf500edb33cf469c8b8ab3f
4
+ data.tar.gz: 62d9a00a5e7f49c490cfbf1a497414ef8cb25dfc
5
+ SHA512:
6
+ metadata.gz: 87a6ea3d95fd9afd2faddfc27cf03333e1bc805d79374ba0246f887586f12966903c8ff073f20ae59249b1dbebff808ff21b15c2e24dde15b11a24fb3919f92c
7
+ data.tar.gz: 604e140dd3455871e76554363c3e9d71cad1843a7869107d5ba90aa0dcfb68240481c8eeb5eaa0169b0069a9da835fc15f70e15bf0f5495a31199760cb5f7230
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
13
+ .byebug_history
14
+ .env
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --format documentation
3
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,15 @@
1
+ Style/Documentation:
2
+ Exclude:
3
+ - 'spec/**/*'
4
+
5
+ Style/FrozenStringLiteralComment:
6
+ Enabled: false
7
+
8
+ Metrics/LineLength:
9
+ Enabled: false
10
+
11
+ Style/BlockDelimiters:
12
+ Enabled: false
13
+
14
+ Metrics/BlockLength:
15
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.0
5
+ before_install: gem install bundler -v 1.14.6
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at dofreewill22@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,25 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in codeclimate-api-ruby-client.gemspec
4
+ gemspec
5
+
6
+ group :development, :test do
7
+ gem 'byebug'
8
+ gem 'dotenv'
9
+ gem 'guard-rspec', require: false
10
+ gem 'guard-rubocop', require: false
11
+ gem 'rubocop'
12
+ end
13
+
14
+ group :test do
15
+ gem 'simplecov', require: false
16
+ gem 'smart_rspec'
17
+ gem 'vcr'
18
+ gem 'webmock'
19
+ end
20
+
21
+ gem 'activesupport', require: false
22
+ gem 'awesome_print'
23
+ gem 'faraday'
24
+ gem 'json'
25
+ gem 'json_api_client'
data/Guardfile ADDED
@@ -0,0 +1,49 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning('Directory #{d} does not exist')}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch 'config/Guardfile' instead of 'Guardfile'
17
+
18
+ # Note: The cmd option is now required due to the increasing number of ways
19
+ # rspec may be run, below are examples of the most common uses.
20
+ # * bundler: 'bundle exec rspec'
21
+ # * bundler binstubs: 'bin/rspec'
22
+ # * spring: 'bin/rspec' (This will use spring if running and you have
23
+ # installed the spring binstubs per the docs)
24
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
25
+ # * 'just' rspec: 'rspec'
26
+
27
+ group :test, halt_on_fail: false do
28
+ guard :rubocop, cmd: 'bundle exec rubocop', all_on_start: true do
29
+ watch(/.+\.rb$/)
30
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
31
+ end
32
+
33
+ guard :rspec, cmd: 'bundle exec rspec', all_on_start: true do
34
+ require 'guard/rspec/dsl'
35
+ dsl = Guard::RSpec::Dsl.new(self)
36
+
37
+ # Feel free to open issues for suggestions and improvements
38
+
39
+ # RSpec files
40
+ rspec = dsl.rspec
41
+ watch(rspec.spec_helper) { rspec.spec_dir }
42
+ watch(rspec.spec_support) { rspec.spec_dir }
43
+ watch(rspec.spec_files)
44
+
45
+ # Ruby files
46
+ ruby = dsl.ruby
47
+ dsl.watch_spec_files_for(ruby.lib_files)
48
+ end
49
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Wilfrido Nuqui
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # CodeClimate::Client - Code Climate API Ruby Client
2
+
3
+ Interface with Code Climate API via Ruby using this gem.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'codeclimate-api-ruby-client'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install codeclimate-api-ruby-client
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ require 'code_climate'
25
+
26
+ client = CodeClimate::Client.configure do |client|
27
+ client.base_uri = 'https://api.codeclimate.com/v1/'
28
+ client.api_token = 'abc40a334236eb8461afe1c041bed13097fab628'
29
+ end
30
+
31
+ client.repos.at('2e12027592e3170b11000199')
32
+ ```
33
+
34
+ ## Development
35
+
36
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
37
+
38
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
39
+
40
+ Do not forget to add local `.env` and put your `API_TOKEN=token` in it.
41
+
42
+ ## Contributing
43
+
44
+ Bug reports and pull requests are welcome on GitHub at https://github.com/wnuqui/codeclimate-api-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
45
+
46
+
47
+ ## License
48
+
49
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/TODO.md ADDED
@@ -0,0 +1,22 @@
1
+ These are the Code Climate API TODOS as per [here](https://docs.codeclimate.com/docs/api).
2
+
3
+ - [x] **`GET /user`**
4
+ - [ ] **`GET /orgs`**
5
+ - [ ] **`POST /orgs`**
6
+ - [ ] **`POST /orgs/:org_id/repos`**
7
+ - [ ] **`GET /repos?github_slug=`**
8
+ - [x] **`GET /repos/:repo_id`**
9
+ - [x] **`GET /repos/:repo_id/metrics/:name`**
10
+ - [x] **`GET /repos/:repo_id/ref_points`**
11
+ - [x] **`GET /repos/:repo_id/builds`**
12
+ - [ ] **`GET /repos/:repo_id/builds/:number`**
13
+ - [x] **`GET /repos/:repo_id/snapshots/:snapshot_id`**
14
+ - [ ] **`GET /repos/:repo_id/snapshots/:snapshot_id/files`**
15
+ - [ ] **`GET /repos/:repo_id/snapshots/:snapshot_id/issues`**
16
+ - [x] **`GET /repos/:repo_id/test_reports`**
17
+ - [ ] **`GET /repos/:repo_id/test_reports/:test_report_id/test_file_reports`**
18
+ - [x] **`GET /repos/:repo_id/services`**
19
+ - [ ] **`POST /repos/:repo_id/services/:service_id/events`**
20
+ - [ ] **`GET /repos/:repo_id/pulls/:number/files`**
21
+ - [ ] **`POST /test_reports`**
22
+ - [ ] **`POST repos/:repo_id/test_reports/:id/test_file_reports/batch`**
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'code_climate'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require 'pry'
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'code_climate/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'codeclimate-api-ruby-client'
9
+ spec.version = CodeClimate::VERSION
10
+ spec.authors = ['Wilfrido Nuqui']
11
+ spec.email = ['dofreewill22@gmail.com']
12
+
13
+ spec.summary = 'CodeClimate API client.'
14
+ spec.description = 'CodeClimate API client.'
15
+ spec.homepage = 'https://github.com/wnuqui/codeclimate-api-ruby-client'
16
+ spec.license = 'MIT'
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
+ f.match(%r{^(test|spec|features)/})
20
+ end
21
+ spec.bindir = 'bin'
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ['lib']
24
+
25
+ spec.add_development_dependency 'bundler', '~> 1.14'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rspec', '~> 3.0'
28
+ end
@@ -0,0 +1,60 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.codeclimate.com/v1/repos/592e3170b12e120271000199/builds
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.12.2
12
+ Content-Type:
13
+ - application/vnd.api+json
14
+ Accept:
15
+ - application/vnd.api+json
16
+ Authorization:
17
+ - Token token=TOKEN
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Sat, 19 Aug 2017 13:26:23 GMT
27
+ Content-Type:
28
+ - application/vnd.api+json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ Etag:
38
+ - W/"722864b17df6820529f18442d42fb225"
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Runtime:
46
+ - '0.127246'
47
+ X-Request-Id:
48
+ - 6d8759bf-476a-47ac-9b1f-7f2c54bae543
49
+ X-Powered-By:
50
+ - Phusion Passenger 5.1.1
51
+ Server:
52
+ - nginx + Phusion Passenger 5.1.1
53
+ Strict-Transport-Security:
54
+ - max-age=31536000;
55
+ body:
56
+ encoding: UTF-8
57
+ string: '{"data":[{"id":"599555991d132f0001014dd6","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-08-17T08:36:52.485Z","local_ref":"refs/heads/master","number":25,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"599555991d132f0001014dd5","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/25"}},{"id":"598e648351cdf1000100273a","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-08-12T02:14:39.077Z","local_ref":"refs/heads/master","number":24,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"598e648351cdf10001002739","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/24"}},{"id":"598af5bde550d1000101480e","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-08-09T11:45:11.861Z","local_ref":"refs/heads/master","number":23,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"598af5bde550d1000101480d","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/23"}},{"id":"5983ee82388c8e00010043be","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-08-04T03:48:32.905Z","local_ref":"refs/heads/master","number":22,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"5983ee82388c8e00010043bd","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/22"}},{"id":"5979d3cae2f88a0001005c2a","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-27T11:51:48.916Z","local_ref":"refs/heads/master","number":21,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"5979d3cae2f88a0001005c29","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/21"}},{"id":"5976875ea05a4400010030b2","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-24T23:48:53.485Z","local_ref":"refs/heads/master","number":20,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"5976875ea05a4400010030b1","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/20"}},{"id":"597317b854c2ba0001001e80","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-22T09:15:42.391Z","local_ref":"refs/heads/master","number":19,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"597317b854c2ba0001001e7f","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/19"}},{"id":"597257e2c7a29600010285d6","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-21T19:37:16.253Z","local_ref":"refs/heads/master","number":18,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"597257e2c7a29600010285d5","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/18"}},{"id":"596f0ed70f953800010020c4","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-19T07:48:49.436Z","local_ref":"refs/heads/master","number":17,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"596f0ed70f953800010020c3","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/17"}},{"id":"596baf2acd7cd60001006ce0","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-16T18:23:59.344Z","local_ref":"refs/heads/master","number":16,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"596baf2acd7cd60001006cdf","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/16"}},{"id":"596527d4fa2231000100acb2","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-11T19:32:47.741Z","local_ref":"refs/heads/master","number":15,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"596527d4fa2231000100acb1","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/15"}},{"id":"5961d3c8e5ebde0001000cb0","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-09T06:57:27.959Z","local_ref":"refs/heads/master","number":14,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"5961d3c8e5ebde0001000caf","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/14"}},{"id":"595e969fef205e00010049a6","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-06T19:59:33.805Z","local_ref":"refs/heads/master","number":13,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"595e969fef205e00010049a5","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/13"}},{"id":"595815abfe593a0001007f8e","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-07-01T21:35:49.586Z","local_ref":"refs/heads/master","number":12,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"595815abfe593a0001007f8d","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/12"}},{"id":"5951c6a8d5d32d0001011e4e","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-27T02:45:08.940Z","local_ref":"refs/heads/master","number":11,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"5951c6a8d5d32d0001011e4d","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/11"}},{"id":"594e800e840bb300010147f4","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-24T15:07:04.130Z","local_ref":"refs/heads/master","number":10,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"594e800e840bb300010147f3","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/10"}},{"id":"594b61f6ea9e70000100d75a","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-22T06:21:52.715Z","local_ref":"refs/heads/master","number":9,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"594b61f6ea9e70000100d759","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/9"}},{"id":"594848c782dbd700010187bc","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-19T21:57:35.230Z","local_ref":"refs/heads/master","number":8,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"594848c782dbd700010187bb","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/8"}},{"id":"59450940b8eb0f000100191c","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-17T10:49:46.782Z","local_ref":"refs/heads/master","number":7,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"59450940b8eb0f000100191b","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/7"}},{"id":"593b93e620cca60001012396","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-10T06:38:44.872Z","local_ref":"refs/heads/master","number":6,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"593b93e620cca60001012395","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/6"}},{"id":"59387b8d61c6dc0001008384","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-07T22:18:00.233Z","local_ref":"refs/heads/master","number":5,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"59387b8d61c6dc0001008383","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/5"}},{"id":"59323d7d0db5360001006966","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-06-03T04:39:43.912Z","local_ref":"refs/heads/master","number":4,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"59323d7d0db5360001006965","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/4"}},{"id":"592e361e44016b00010120fa","type":"builds","attributes":{"commit_sha":"bf8c7b6a430e8a27eb4a4f3c65d02bcbb9c1fe2e","error_code":null,"finished_at":"2017-05-31T03:19:10.097Z","local_ref":"refs/heads/master","number":3,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"592e361e44016b00010120f9","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/3"}},{"id":"592e353244016b0001011fa4","type":"builds","attributes":{"commit_sha":"7e1ed81c1d81dcd21da5ed5aeb4478ca906998ed","error_code":null,"finished_at":"2017-05-31T03:15:08.300Z","local_ref":"refs/pull/8/head","number":2,"state":"complete"},"relationships":{"pull_request":{"data":{"id":"592e3531595a51000100043e","type":"pull_requests"}},"snapshot":{"data":{"id":"592e353244016b0001011fa3","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/2"}},{"id":"592e317144016b0001011d74","type":"builds","attributes":{"commit_sha":"aa025d1c7af2099642ce7dae7ae4d9f8d9875cc6","error_code":null,"finished_at":"2017-05-31T02:59:04.983Z","local_ref":"refs/heads/master","number":1,"state":"complete"},"relationships":{"pull_request":{"data":null},"snapshot":{"data":{"id":"592e317144016b0001011d73","type":"snapshots"}}},"links":{"self":"https://codeclimate.com/repos/592e3170b12e120271000199/builds/1"}}],"links":{}}'
58
+ http_version:
59
+ recorded_at: Sat, 19 Aug 2017 13:20:17 GMT
60
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,60 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.codeclimate.com/v1/repos/592e3170b12e120271000199/metrics/gpa?filter%5Bfrom%5D=2017-05-01&filter%5Bto%5D=2017-08-01
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.12.2
12
+ Content-Type:
13
+ - application/vnd.api+json
14
+ Accept:
15
+ - application/vnd.api+json
16
+ Authorization:
17
+ - Token token=TOKEN
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Sat, 19 Aug 2017 13:26:25 GMT
27
+ Content-Type:
28
+ - application/vnd.api+json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ Etag:
38
+ - W/"41d0ae6be89c4c78e84c6f1ca8d6bd8b"
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Runtime:
46
+ - '0.014674'
47
+ X-Request-Id:
48
+ - 5e5d0db2-268d-41dd-8398-07849f9c438b
49
+ X-Powered-By:
50
+ - Phusion Passenger 5.1.1
51
+ Server:
52
+ - nginx + Phusion Passenger 5.1.1
53
+ Strict-Transport-Security:
54
+ - max-age=31536000;
55
+ body:
56
+ encoding: UTF-8
57
+ string: '{"data":{"id":"592e31798683380001000017","type":"metrics","attributes":{"name":"gpa","points":[{"timestamp":1493596800,"value":null},{"timestamp":1494201600,"value":null},{"timestamp":1494806400,"value":null},{"timestamp":1495411200,"value":null},{"timestamp":1496016000,"value":4.0},{"timestamp":1496620800,"value":4.0},{"timestamp":1497225600,"value":4.0},{"timestamp":1497830400,"value":4.0},{"timestamp":1498435200,"value":4.0},{"timestamp":1499040000,"value":4.0},{"timestamp":1499644800,"value":4.0},{"timestamp":1500249600,"value":4.0},{"timestamp":1500854400,"value":4.0},{"timestamp":1501459200,"value":4.0}]}}}'
58
+ http_version:
59
+ recorded_at: Sat, 19 Aug 2017 13:20:19 GMT
60
+ recorded_with: VCR 3.0.3