txgh 5.3.2 → 5.3.3
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/lib/txgh/version.rb +1 -1
- data/lib/txgh.rb +2 -0
- data/spec/txgh_spec.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 984667d623e6cec03d0a87db3396258e0f1b1b40
|
|
4
|
+
data.tar.gz: 534f1e4aff8abc9c431d07932c6a848a5db20655
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b625c3b8391fc666e1c70aac34d16ad61510dd581577452b18b4c6d732fc781d4b1f43091dd9c0ad095b924ff070ea102f93ee694c1d80f6498f9fc5627dde16
|
|
7
|
+
data.tar.gz: d063bc9532a7b2de136fefbf7f1cc8d351bb167f0a23b17fb6d9a1fa25395651a85ff00f339d28100b7bdb72316ebeac8ec7652d031bde433a3dbebb862ef1b8
|
data/lib/txgh/version.rb
CHANGED
data/lib/txgh.rb
CHANGED
|
@@ -57,6 +57,8 @@ module Txgh
|
|
|
57
57
|
resource = options.fetch(:resource)
|
|
58
58
|
|
|
59
59
|
GithubStatus.new(project, repo, resource).update(options.fetch(:sha))
|
|
60
|
+
rescue Octokit::UnprocessableEntity
|
|
61
|
+
# raised because we've tried to create too many statuses for the commit
|
|
60
62
|
end
|
|
61
63
|
|
|
62
64
|
def env
|
data/spec/txgh_spec.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
|
+
require 'octokit'
|
|
2
3
|
|
|
3
4
|
describe Txgh do
|
|
4
5
|
def with_env(env)
|
|
@@ -29,4 +30,18 @@ describe Txgh do
|
|
|
29
30
|
expect(instance.provider.scheme).to eq('raw')
|
|
30
31
|
end
|
|
31
32
|
end
|
|
33
|
+
|
|
34
|
+
describe '#update_status_callback' do
|
|
35
|
+
it 'handles github errors' do
|
|
36
|
+
expect_any_instance_of(Txgh::GithubStatus).to(
|
|
37
|
+
receive(:update).and_raise(Octokit::UnprocessableEntity)
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
expect do
|
|
41
|
+
Txgh.update_status_callback(
|
|
42
|
+
project: nil, repo: nil, resource: nil, sha: nil
|
|
43
|
+
)
|
|
44
|
+
end.to_not raise_error
|
|
45
|
+
end
|
|
46
|
+
end
|
|
32
47
|
end
|