codeclimate-services 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/cc/services/gitlab_merge_requests.rb +6 -4
- data/lib/cc/services/version.rb +1 -1
- data/test/gitlab_merge_requests_test.rb +0 -32
- metadata +3 -4
- data/.travis.yml +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed88d8be8ac49555d5377c666aa801cee1925cf4
|
|
4
|
+
data.tar.gz: fcb034490cf3433428864320b70d624363ba868c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 09a9a246394f6278144e7410a79ad54bdb8603dd58b871a57903adf393499aaa5fd438cb9240ec278720fb752d9bbccf7b625f73eb3b33f924bbec267f42c729
|
|
7
|
+
data.tar.gz: d77d17e723202638ee9340e7ecb472f32104fef4e2b2aadbc54a7e538f24b3b7fb0c43b4bab45615a59fab8aa3557f02abe9bf59d5be575a09472f024a32a85d
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2.2.2
|
|
@@ -2,17 +2,19 @@ require "cc/presenters/pull_requests_presenter"
|
|
|
2
2
|
|
|
3
3
|
class CC::Service::GitlabMergeRequests < CC::PullRequests
|
|
4
4
|
class Config < CC::Service::Config
|
|
5
|
+
CONTEXT = "codeclimate".freeze
|
|
6
|
+
|
|
5
7
|
attribute :access_token, Axiom::Types::String,
|
|
6
8
|
label: "Access Token",
|
|
7
9
|
description: "A personal access token with permissions for the repo."
|
|
8
|
-
attribute :context, Axiom::Types::String,
|
|
9
|
-
label: "Context",
|
|
10
|
-
description: "The integration name for the merge request status",
|
|
11
|
-
default: "codeclimate"
|
|
12
10
|
attribute :base_url, Axiom::Types::String,
|
|
13
11
|
label: "GitLab API Base URL",
|
|
14
12
|
description: "Base URL for the GitLab API",
|
|
15
13
|
default: "https://gitlab.com"
|
|
14
|
+
|
|
15
|
+
def context
|
|
16
|
+
CONTEXT
|
|
17
|
+
end
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
self.title = "GitLab Merge Requests"
|
data/lib/cc/services/version.rb
CHANGED
|
@@ -146,38 +146,6 @@ class TestGitlabMergeRequests < CC::Service::TestCase
|
|
|
146
146
|
assert receive_test({ base_url: "https://gitlab.hal.org" }, { git_url: "ssh://git@gitlab.com/hal/hal9000.git" })[:ok], "Expected test of pull request to be true"
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
-
def test_different_context
|
|
150
|
-
expect_status_update(
|
|
151
|
-
"gordondiggs/ellis",
|
|
152
|
-
"abc123",
|
|
153
|
-
"context" => "sup",
|
|
154
|
-
"state" => "running",
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
response = receive_merge_request(
|
|
158
|
-
{ context: "sup" },
|
|
159
|
-
git_url: "https://gitlab.com/gordondiggs/ellis.git",
|
|
160
|
-
commit_sha: "abc123",
|
|
161
|
-
state: "pending",
|
|
162
|
-
)
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
def test_default_context
|
|
166
|
-
expect_status_update(
|
|
167
|
-
"gordondiggs/ellis",
|
|
168
|
-
"abc123",
|
|
169
|
-
"context" => "codeclimate",
|
|
170
|
-
"state" => "running",
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
response = receive_merge_request(
|
|
174
|
-
{},
|
|
175
|
-
git_url: "https://gitlab.com/gordondiggs/ellis.git",
|
|
176
|
-
commit_sha: "abc123",
|
|
177
|
-
state: "pending",
|
|
178
|
-
)
|
|
179
|
-
end
|
|
180
|
-
|
|
181
149
|
private
|
|
182
150
|
|
|
183
151
|
def expect_status_update(repo, commit_sha, params)
|
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.
|
|
4
|
+
version: 1.6.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: 2016-08-
|
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -145,7 +145,6 @@ extra_rdoc_files: []
|
|
|
145
145
|
files:
|
|
146
146
|
- ".gitignore"
|
|
147
147
|
- ".ruby-version"
|
|
148
|
-
- ".travis.yml"
|
|
149
148
|
- Gemfile
|
|
150
149
|
- LICENSE.txt
|
|
151
150
|
- README.md
|
|
@@ -240,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
240
239
|
version: '0'
|
|
241
240
|
requirements: []
|
|
242
241
|
rubyforge_project:
|
|
243
|
-
rubygems_version: 2.5
|
|
242
|
+
rubygems_version: 2.4.5
|
|
244
243
|
signing_key:
|
|
245
244
|
specification_version: 4
|
|
246
245
|
summary: Service classes for Code Climate
|
data/.travis.yml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
cache: bundler
|
|
3
|
-
rvm:
|
|
4
|
-
- 1.9.3
|
|
5
|
-
- 2.0
|
|
6
|
-
- 2.1
|
|
7
|
-
- 2.2
|
|
8
|
-
sudo: false
|
|
9
|
-
env:
|
|
10
|
-
global:
|
|
11
|
-
- CODECLIMATE_REPO_TOKEN=5095391006b09e374e5d9232c41a09cfa6a3bdb1f9529c2485052416f743b4fe
|
|
12
|
-
notifications:
|
|
13
|
-
slack: codeclimate:XU4Q4aPrFuBk6n2kt8sy0DLb
|