codeclimate-services 1.10.1 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 28a587b7b4dfdf431800b17380549e44b0f9c500
4
- data.tar.gz: 65102446840ccaa599271b4875a9be8836c95934
2
+ SHA256:
3
+ metadata.gz: 849571797dc28b6279e4281c3d1b5e356a9fc8150845690d82eced4fc0c000c1
4
+ data.tar.gz: e944d253acde61ff799b0f07f31fb8d8aca97eda479351ff304ab8188b769dfc
5
5
  SHA512:
6
- metadata.gz: 2a8d21f29a3a24b42f59c47f3edac13a1fdc25736249d58582b7dabf2d47484c36bed3c6d6b0166ecf5e1f26be3b7c763460d3ec1b132fbcd67669e7329afe1e
7
- data.tar.gz: e7e3e23b0698d345fb32cf4bd545ca8f8370ee6de25bd8b64c228e5947c0d024beeb90935bbdf31171aa7d30590a0c233c1f87bab935ae041051c1222baf4602
6
+ metadata.gz: 6ef756b1698fba1341bac6e6f05b4fdbd1286ae0afc14320245a89938392d9bfd2871035a09b9acf5529231da28f2ab955df4e11a30b5ea70941f6e12873b883
7
+ data.tar.gz: 7795015fad0cb95435b0a1492b90438534b0821f698715dc0d986f845a6d4c6726aec744ed9f62063e178e107579b8771f8ac85914314488683c0bc65732784b
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.4.4
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["bryan@brynary.com"]
11
11
  spec.summary = "Service classes for Code Climate"
12
12
  spec.description = "Service classes for Code Climate"
13
- spec.homepage = ""
13
+ spec.homepage = "https://codeclimate.com/"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -58,12 +58,12 @@ class CC::Service::GitlabMergeRequests < CC::PullRequests
58
58
 
59
59
  def setup_http
60
60
  http.headers["Content-Type"] = "application/json"
61
- http.headers["PRIVATE-TOKEN"] = config.access_token
61
+ http.headers["Private-Token"] = config.access_token
62
62
  http.headers["User-Agent"] = "Code Climate"
63
63
  end
64
64
 
65
65
  def base_status_url(commit_sha)
66
- "#{config.base_url}/api/v3/projects/#{CGI.escape(slug)}/statuses/#{commit_sha}"
66
+ "#{config.base_url}/api/v4/projects/#{CGI.escape(slug)}/statuses/#{commit_sha}"
67
67
  end
68
68
 
69
69
  def slug
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Services
3
- VERSION = "1.10.1".freeze
3
+ VERSION = "1.11.0".freeze
4
4
  end
5
5
  end
@@ -116,13 +116,13 @@ describe CC::Service::GitlabMergeRequests, type: :service do
116
116
  end
117
117
 
118
118
  it "merge request status test success" do
119
- http_stubs.post("api/v3/projects/hal%2Fhal9000/statuses/#{"0" * 40}") { |_env| [404, {}, ""] }
119
+ http_stubs.post("api/v4/projects/hal%2Fhal9000/statuses/#{"0" * 40}") { |_env| [404, {}, ""] }
120
120
 
121
121
  expect(receive_test({}, git_url: "ssh://git@gitlab.com/hal/hal9000.git")[:ok]).to eq(true)
122
122
  end
123
123
 
124
124
  it "merge request status test failure" do
125
- http_stubs.post("api/v3/projects/hal%2Fhal9000/statuses/#{"0" * 40}") { |_env| [401, {}, ""] }
125
+ http_stubs.post("api/v4/projects/hal%2Fhal9000/statuses/#{"0" * 40}") { |_env| [401, {}, ""] }
126
126
 
127
127
  expect { receive_test({}, git_url: "ssh://git@gitlab.com/hal/hal9000.git") }.to raise_error(CC::Service::HTTPError)
128
128
  end
@@ -134,8 +134,8 @@ describe CC::Service::GitlabMergeRequests, type: :service do
134
134
  end
135
135
 
136
136
  it "different base url" do
137
- http_stubs.post("api/v3/projects/hal%2Fhal9000/statuses/#{"0" * 40}") do |env|
138
- expect(env[:url].to_s).to eq("https://gitlab.hal.org/api/v3/projects/hal%2Fhal9000/statuses/#{"0" * 40}")
137
+ http_stubs.post("api/v4/projects/hal%2Fhal9000/statuses/#{"0" * 40}") do |env|
138
+ expect(env[:url].to_s).to eq("https://gitlab.hal.org/api/v4/projects/hal%2Fhal9000/statuses/#{"0" * 40}")
139
139
  [404, {}, ""]
140
140
  end
141
141
 
@@ -145,8 +145,8 @@ describe CC::Service::GitlabMergeRequests, type: :service do
145
145
  private
146
146
 
147
147
  def expect_status_update(repo, commit_sha, params)
148
- http_stubs.post "api/v3/projects/#{CGI.escape(repo)}/statuses/#{commit_sha}" do |env|
149
- expect(env[:request_headers]["PRIVATE-TOKEN"]).to eq("123")
148
+ http_stubs.post "api/v4/projects/#{CGI.escape(repo)}/statuses/#{commit_sha}" do |env|
149
+ expect(env[:request_headers]["Private-Token"]).to eq("123")
150
150
 
151
151
  body = JSON.parse(env[:body])
152
152
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Helmkamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-03 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -218,7 +218,7 @@ files:
218
218
  - spec/support/fake_logger.rb
219
219
  - spec/support/resolv_helpers.rb
220
220
  - spec/support/service_context.rb
221
- homepage: ''
221
+ homepage: https://codeclimate.com/
222
222
  licenses:
223
223
  - MIT
224
224
  metadata: {}
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.4.5
241
+ rubygems_version: 2.7.7
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Service classes for Code Climate