ghn 2.0.0.pre5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +7 -0
- data/lib/ghn/version.rb +1 -1
- data/spec/lib/ghn/notification_spec.rb +38 -12
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6a09393357c647c2c627461f53b357102c1f596
|
4
|
+
data.tar.gz: 5dab77d48c3c86373fc24cb468844584efd4bb15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30b8ff9f8df0f64d6c3acdfe2e8de3d77d777c2b33de616ff20f86da90f493979ce344bafd8cc328f8975ef2591658e9d0db598213b061cb08271a8c6484897f
|
7
|
+
data.tar.gz: 67ab8cbe8665db22ff685d9bf014589e37d5a38159bb26d62f26610d4edea09190a80b24b4d2436d926e7f6eef563a1a41c545fdced422a324138b841ed7f1bf
|
data/CONTRIBUTORS.md
ADDED
data/lib/ghn/version.rb
CHANGED
@@ -2,7 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Ghn::Notification do
|
4
4
|
describe '#type_class' do
|
5
|
-
|
5
|
+
let(:follow_issuecomment) { false }
|
6
|
+
|
7
|
+
subject { Ghn::Notification.new(notification, follow_issuecomment).type_class }
|
6
8
|
|
7
9
|
context 'issue' do
|
8
10
|
let(:notification) { fixture('issue.json') }
|
@@ -39,17 +41,25 @@ describe Ghn::Notification do
|
|
39
41
|
describe '#url' do
|
40
42
|
it do
|
41
43
|
expect(
|
42
|
-
Ghn::IssueNotification.new(fixture('issue.json')).url
|
44
|
+
Ghn::IssueNotification.new(fixture('issue.json'), false).url
|
43
45
|
).to eq 'https://github.com/username/reponame/issues/305'
|
44
46
|
end
|
45
47
|
|
46
|
-
context 'with comment' do
|
48
|
+
context 'with comment and --follow-issuecomment is turned on' do
|
47
49
|
it do
|
48
50
|
expect(
|
49
|
-
Ghn::IssueNotification.new(fixture('issue_with_comment.json')).url
|
51
|
+
Ghn::IssueNotification.new(fixture('issue_with_comment.json'), true).url
|
50
52
|
).to eq 'https://github.com/username/reponame/issues/305#issuecomment-53070200'
|
51
53
|
end
|
52
54
|
end
|
55
|
+
|
56
|
+
context 'with comment but --follow-issuecomment is turned off' do
|
57
|
+
it do
|
58
|
+
expect(
|
59
|
+
Ghn::IssueNotification.new(fixture('issue_with_comment.json'), false).url
|
60
|
+
).to eq 'https://github.com/username/reponame/issues/305'
|
61
|
+
end
|
62
|
+
end
|
53
63
|
end
|
54
64
|
end
|
55
65
|
|
@@ -57,17 +67,25 @@ describe Ghn::Notification do
|
|
57
67
|
describe '#url' do
|
58
68
|
it do
|
59
69
|
expect(
|
60
|
-
Ghn::PullRequestNotification.new(fixture('pull_request.json')).url
|
70
|
+
Ghn::PullRequestNotification.new(fixture('pull_request.json'), false).url
|
61
71
|
).to eq 'https://github.com/username/reponame/pull/22'
|
62
72
|
end
|
63
73
|
|
64
|
-
context 'with comment' do
|
74
|
+
context 'with comment and --follow-issuecomment is turned on' do
|
65
75
|
it do
|
66
76
|
expect(
|
67
|
-
Ghn::PullRequestNotification.new(fixture('pull_request_with_comment.json')).url
|
77
|
+
Ghn::PullRequestNotification.new(fixture('pull_request_with_comment.json'), true).url
|
68
78
|
).to eq 'https://github.com/username/reponame/pull/22#issuecomment-16607215'
|
69
79
|
end
|
70
80
|
end
|
81
|
+
|
82
|
+
context 'with comment but --follow-issuecomment is turned off' do
|
83
|
+
it do
|
84
|
+
expect(
|
85
|
+
Ghn::PullRequestNotification.new(fixture('pull_request_with_comment.json'), false).url
|
86
|
+
).to eq 'https://github.com/username/reponame/pull/22'
|
87
|
+
end
|
88
|
+
end
|
71
89
|
end
|
72
90
|
end
|
73
91
|
|
@@ -75,17 +93,25 @@ describe Ghn::Notification do
|
|
75
93
|
describe '#url' do
|
76
94
|
it do
|
77
95
|
expect(
|
78
|
-
Ghn::CommitNotification.new(fixture('commit.json')).url
|
96
|
+
Ghn::CommitNotification.new(fixture('commit.json'), false).url
|
79
97
|
).to eq 'https://github.com/username/reponame/commit/6a4a135335acef4dfe15912d231429c07d4ad143'
|
80
98
|
end
|
81
99
|
|
82
|
-
context 'with comment' do
|
100
|
+
context 'with comment and --follow-issuecomment is turned on' do
|
83
101
|
it do
|
84
102
|
expect(
|
85
|
-
Ghn::CommitNotification.new(fixture('commit_with_comment.json')).url
|
103
|
+
Ghn::CommitNotification.new(fixture('commit_with_comment.json'), true).url
|
86
104
|
).to eq 'https://github.com/username/reponame/commit/6a4a135335acef4dfe15912d231429c07d4ad143#issuecomment-7491006'
|
87
105
|
end
|
88
106
|
end
|
107
|
+
|
108
|
+
context 'with comment but --follow-issuecomment is turned off' do
|
109
|
+
it do
|
110
|
+
expect(
|
111
|
+
Ghn::CommitNotification.new(fixture('commit_with_comment.json'), false).url
|
112
|
+
).to eq 'https://github.com/username/reponame/commit/6a4a135335acef4dfe15912d231429c07d4ad143'
|
113
|
+
end
|
114
|
+
end
|
89
115
|
end
|
90
116
|
end
|
91
117
|
|
@@ -93,7 +119,7 @@ describe Ghn::Notification do
|
|
93
119
|
describe '#url' do
|
94
120
|
it do
|
95
121
|
expect(
|
96
|
-
Ghn::ReleaseNotification.new(fixture('release.json')).url
|
122
|
+
Ghn::ReleaseNotification.new(fixture('release.json'), false).url
|
97
123
|
).to eq 'https://github.com/yandod/candycane/releases/tag/v0.9.4'
|
98
124
|
end
|
99
125
|
end
|
@@ -103,7 +129,7 @@ describe Ghn::Notification do
|
|
103
129
|
describe '#url' do
|
104
130
|
it do
|
105
131
|
expect(
|
106
|
-
Ghn::UnknownNotification.new(fixture('release.json')).url
|
132
|
+
Ghn::UnknownNotification.new(fixture('release.json'), false).url
|
107
133
|
).to be nil
|
108
134
|
end
|
109
135
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kensuke Nagae
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- ".gitignore"
|
93
93
|
- ".travis.yml"
|
94
94
|
- CHANGELOG.md
|
95
|
+
- CONTRIBUTORS.md
|
95
96
|
- Gemfile
|
96
97
|
- LICENSE.txt
|
97
98
|
- README.md
|
@@ -129,9 +130,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
130
|
version: '0'
|
130
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
132
|
requirements:
|
132
|
-
- - "
|
133
|
+
- - ">="
|
133
134
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
135
|
+
version: '0'
|
135
136
|
requirements: []
|
136
137
|
rubyforge_project:
|
137
138
|
rubygems_version: 2.2.2
|