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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 284a96fe4285fcc34d367b9dd24abdf4cb51b43a
4
- data.tar.gz: e60dd3be41f2ed70a13602b260a4f7364c7b9656
3
+ metadata.gz: e927c485d5023eb5431b788445cfe75fe27320ae
4
+ data.tar.gz: a4407d4b1c9cdd98d4c795e771848046e888e92a
5
5
  SHA512:
6
- metadata.gz: 7e33711b3282b2870de63ef36e7fe520ebe7276949c44fd33f020a84eb30fb0afa4dfeec7113d939b6921f7d96e1ca2cbf26d0aa1e7b4830ae8f137c5bd91ab1
7
- data.tar.gz: 44d1e4c810e0392b32ba9aadb6cd79bf963bb67d227607340ca1620728e7c47c4e8fcd30be328e9177d57d23cf705a6e8f1b7ec530a43556eccd167a36e99842
6
+ metadata.gz: 7dcbe79bc6a2ae60dda8636fdde2c5fadae2c29274c931e43bec38efd22cf4e809051248fd4b3cb0c93f6e02f27273bac4365c16c202f503b2a141604003e13b
7
+ data.tar.gz: 3df6b8145d1bfcd49595420111532c66f119c2fc528b1336aa95c2f4383d709199c26ff3a69ffdffd0bfdd122557b8bd71755055477f93b1a53202d62eef768d
@@ -54,7 +54,7 @@ class CC::Service::Asana < CC::Service
54
54
 
55
55
  private
56
56
 
57
- def create_task(name, notes = nil)
57
+ def create_task(name, notes = "")
58
58
  params = generate_params(name, notes)
59
59
  authenticate_http
60
60
  http.headers["Content-Type"] = "application/json"
@@ -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",
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Services
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
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 = nil)
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.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-04-15 00:00:00.000000000 Z
11
+ date: 2016-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday