codeclimate-services 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/helpers/quality_helper.rb +8 -0
- data/lib/cc/services/asana.rb +1 -3
- data/lib/cc/services/github_issues.rb +1 -3
- data/lib/cc/services/jira.rb +1 -3
- data/lib/cc/services/lighthouse.rb +1 -3
- data/lib/cc/services/pivotal_tracker.rb +1 -3
- data/lib/cc/services/version.rb +1 -1
- data/test/github_issues_test.rb +8 -0
- 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: c0054c90b880e5234b968e1d7b22d6e8ce96f6ba
|
4
|
+
data.tar.gz: 7da2b030334e81ed263492809232d5a5eac4f999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073441465b05c723b544409b507af2a5309d558657ff959e1d6317ebc2f393340bb67c9b72903dc860dcb996fba2d3b8ea6348f6cc5be18b30dc7f77c579b8fd
|
7
|
+
data.tar.gz: ab3e9b5ed0e03521974c27e810e5121f895157ce6096af705c86b2faac124e5189dda5aebe2b4486159f2d3999fbb51a4bc3ddf5731015dcfbd1f83686c618bd
|
@@ -7,6 +7,14 @@ module CC::Service::QualityHelper
|
|
7
7
|
payload["constant_name"]
|
8
8
|
end
|
9
9
|
|
10
|
+
def quality_title
|
11
|
+
if payload["rating"].present?
|
12
|
+
"Refactor #{constant_name} from #{rating} on Code Climate"
|
13
|
+
else
|
14
|
+
"Refactor #{constant_name} on Code Climate"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
10
18
|
def rating
|
11
19
|
with_article(payload["rating"])
|
12
20
|
end
|
data/lib/cc/services/asana.rb
CHANGED
@@ -40,9 +40,7 @@ class CC::Service::Asana < CC::Service
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def receive_quality
|
43
|
-
|
44
|
-
|
45
|
-
create_task("#{title} - #{details_url}")
|
43
|
+
create_task("#{quality_title} - #{details_url}")
|
46
44
|
end
|
47
45
|
|
48
46
|
def receive_vulnerability
|
@@ -33,9 +33,7 @@ class CC::Service::GitHubIssues < CC::Service
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def receive_quality
|
36
|
-
|
37
|
-
|
38
|
-
create_issue(title, details_url)
|
36
|
+
create_issue(quality_title, details_url)
|
39
37
|
end
|
40
38
|
|
41
39
|
def receive_vulnerability
|
data/lib/cc/services/jira.rb
CHANGED
@@ -36,9 +36,7 @@ class CC::Service::Jira < CC::Service
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def receive_quality
|
39
|
-
|
40
|
-
|
41
|
-
create_ticket(title, details_url)
|
39
|
+
create_ticket(quality_title, details_url)
|
42
40
|
end
|
43
41
|
|
44
42
|
def receive_issue
|
@@ -30,9 +30,7 @@ class CC::Service::Lighthouse < CC::Service
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def receive_quality
|
33
|
-
|
34
|
-
|
35
|
-
create_ticket(title, details_url)
|
33
|
+
create_ticket(quality_title, details_url)
|
36
34
|
end
|
37
35
|
|
38
36
|
def receive_issue
|
@@ -28,9 +28,7 @@ class CC::Service::PivotalTracker < CC::Service
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def receive_quality
|
31
|
-
|
32
|
-
|
33
|
-
create_story(name, details_url)
|
31
|
+
create_story(quality_title, details_url)
|
34
32
|
end
|
35
33
|
|
36
34
|
def receive_issue
|
data/lib/cc/services/version.rb
CHANGED
data/test/github_issues_test.rb
CHANGED
@@ -22,6 +22,14 @@ class TestGitHubIssues < CC::Service::TestCase
|
|
22
22
|
)
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_quality_without_rating
|
26
|
+
assert_github_receives(
|
27
|
+
event(:quality, to: nil),
|
28
|
+
"Refactor User on Code Climate",
|
29
|
+
"https://codeclimate.com/repos/1/feed"
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
25
33
|
def test_issue
|
26
34
|
payload = {
|
27
35
|
issue: {
|
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.1.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-06-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|