codeclimate-services 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/services/asana.rb +1 -1
- data/lib/cc/services/github_pull_requests.rb +2 -1
- data/lib/cc/services/version.rb +1 -1
- data/test/asana_test.rb +1 -1
- data/test/github_pull_requests_test.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e927c485d5023eb5431b788445cfe75fe27320ae
|
4
|
+
data.tar.gz: a4407d4b1c9cdd98d4c795e771848046e888e92a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dcbe79bc6a2ae60dda8636fdde2c5fadae2c29274c931e43bec38efd22cf4e809051248fd4b3cb0c93f6e02f27273bac4365c16c202f503b2a141604003e13b
|
7
|
+
data.tar.gz: 3df6b8145d1bfcd49595420111532c66f119c2fc528b1336aa95c2f4383d709199c26ff3a69ffdffd0bfdd122557b8bd71755055477f93b1a53202d62eef768d
|
data/lib/cc/services/asana.rb
CHANGED
@@ -7,7 +7,8 @@ class CC::Service::GitHubPullRequests < CC::Service
|
|
7
7
|
description: "A personal OAuth token with permissions for the repo."
|
8
8
|
attribute :update_status, Axiom::Types::Boolean,
|
9
9
|
label: "Update status?",
|
10
|
-
description: "Update the pull request status after analyzing?"
|
10
|
+
description: "Update the pull request status after analyzing?",
|
11
|
+
default: true
|
11
12
|
attribute :base_url, Axiom::Types::String,
|
12
13
|
label: "Github API Base URL",
|
13
14
|
description: "Base URL for the Github API",
|
data/lib/cc/services/version.rb
CHANGED
data/test/asana_test.rb
CHANGED
@@ -58,7 +58,7 @@ class TestAsana < CC::Service::TestCase
|
|
58
58
|
|
59
59
|
private
|
60
60
|
|
61
|
-
def assert_asana_receives(event_data, name, notes =
|
61
|
+
def assert_asana_receives(event_data, name, notes = "")
|
62
62
|
@stubs.post '/api/1.0/tasks' do |env|
|
63
63
|
body = JSON.parse(env[:body])
|
64
64
|
data = body["data"]
|
@@ -103,7 +103,7 @@ class TestGitHubPullRequests < CC::Service::TestCase
|
|
103
103
|
def test_no_status_update_for_skips_when_update_status_config_is_falsey
|
104
104
|
# With no POST expectation, test will fail if request is made.
|
105
105
|
|
106
|
-
receive_pull_request({}, {
|
106
|
+
receive_pull_request({ update_status: false }, {
|
107
107
|
github_slug: "pbrisbin/foo",
|
108
108
|
commit_sha: "abc123",
|
109
109
|
state: "skipped",
|
@@ -113,7 +113,7 @@ class TestGitHubPullRequests < CC::Service::TestCase
|
|
113
113
|
def test_no_status_update_for_pending_when_update_status_config_is_falsey
|
114
114
|
# With no POST expectation, test will fail if request is made.
|
115
115
|
|
116
|
-
receive_pull_request({}, {
|
116
|
+
receive_pull_request({ update_status: false }, {
|
117
117
|
github_slug: "pbrisbin/foo",
|
118
118
|
commit_sha: "abc123",
|
119
119
|
state: "pending",
|
@@ -123,7 +123,7 @@ class TestGitHubPullRequests < CC::Service::TestCase
|
|
123
123
|
def test_no_status_update_for_error_when_update_status_config_is_falsey
|
124
124
|
# With no POST expectation, test will fail if request is made.
|
125
125
|
|
126
|
-
receive_pull_request({}, {
|
126
|
+
receive_pull_request({ update_status: false }, {
|
127
127
|
github_slug: "pbrisbin/foo",
|
128
128
|
commit_sha: "abc123",
|
129
129
|
state: "error",
|
@@ -158,7 +158,7 @@ class TestGitHubPullRequests < CC::Service::TestCase
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def test_pull_request_nothing_happened
|
161
|
-
response = receive_pull_request({}, { state: "success" })
|
161
|
+
response = receive_pull_request({ update_status: false }, { state: "success" })
|
162
162
|
|
163
163
|
assert_equal({ ok: false, message: "Nothing happened" }, response)
|
164
164
|
end
|
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.0.
|
4
|
+
version: 1.0.1
|
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-
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|