github_status_notifier 0.1.1 → 0.1.2
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/README.md +3 -2
- data/github_status_notifier.gemspec +11 -1
- data/lib/github_status_notifier/cli.rb +8 -5
- data/lib/github_status_notifier/notifier.rb +5 -2
- data/lib/github_status_notifier/version.rb +1 -1
- metadata +2 -4
- data/.tachikoma.yml +0 -1
- data/.travis.yml +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8bd28382e75520a746c5b981c8e5b75145dceac
|
4
|
+
data.tar.gz: dad2ff156b7adf68868abd723c07428c3c549af5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 363f7ba3f7ce56c26804aab438575c700992eab01eb07c492455a228bc54c02fc604f67c9abcf29f285a4e00f0413bd3b318c96e176b28f9940b4ca403516863
|
7
|
+
data.tar.gz: 1d97c744f596d3285323d394854d8bb905f4c3d1f72e289a2d229be826c8f03bc2a843b66e0305349a456422c8be7355575ecb1c236f01325aa52f096e8470df
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ $ github-status-notifier notify --exit-status $?
|
|
22
22
|
```
|
23
23
|
Commands:
|
24
24
|
github-status-notifier help [COMMAND] # Describe available commands or one specific command
|
25
|
-
github-status-notifier notify # Notify current
|
25
|
+
github-status-notifier notify # Notify current state to GitHub status
|
26
26
|
github-status-notifier version # Show the GithubStatusNotifier version
|
27
27
|
|
28
28
|
Usage:
|
@@ -38,8 +38,9 @@ Options:
|
|
38
38
|
[--target-url=TARGET_URL]
|
39
39
|
[--description=DESCRIPTION]
|
40
40
|
[--context=CONTEXT]
|
41
|
+
# Default: github_status_notifier
|
41
42
|
|
42
|
-
Notify current
|
43
|
+
Notify current state to GitHub status
|
43
44
|
```
|
44
45
|
|
45
46
|
see also: [Statuses | GitHub API](https://developer.github.com/v3/repos/statuses/)
|
@@ -14,7 +14,17 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = 'https://github.com/packsaddle/ruby-github_status_notifier'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.files =
|
17
|
+
spec.files = \
|
18
|
+
`git ls-files -z`
|
19
|
+
.split("\x0")
|
20
|
+
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
.reject do |f|
|
22
|
+
[
|
23
|
+
'.travis.yml',
|
24
|
+
'circle.yml',
|
25
|
+
'.tachikoma.yml'
|
26
|
+
].include?(f)
|
27
|
+
end
|
18
28
|
spec.bindir = 'exe'
|
19
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
30
|
spec.require_paths = ['lib']
|
@@ -13,15 +13,15 @@ module GithubStatusNotifier
|
|
13
13
|
puts "GithubStatusNotifier version #{::GithubStatusNotifier::VERSION}"
|
14
14
|
end
|
15
15
|
|
16
|
-
desc 'notify', 'Notify current
|
16
|
+
desc 'notify', 'Notify current state to GitHub status'
|
17
17
|
option :exit_status, type: :numeric
|
18
18
|
option :keep_exit_status, type: :boolean, default: false
|
19
19
|
option :debug, type: :boolean, default: false
|
20
20
|
option :verbose, type: :boolean, default: false
|
21
|
-
option :state, type: :string, enum:
|
21
|
+
option :state, type: :string, enum: Notifier::ALLOWED_STATUS
|
22
22
|
option :target_url, type: :string
|
23
23
|
option :description, type: :string
|
24
|
-
option :context, type: :string
|
24
|
+
option :context, type: :string, default: Notifier::CONTEXT
|
25
25
|
def notify
|
26
26
|
if options[:debug]
|
27
27
|
logger.level = Logger::DEBUG
|
@@ -30,8 +30,7 @@ module GithubStatusNotifier
|
|
30
30
|
end
|
31
31
|
logger.debug(options.inspect)
|
32
32
|
if options[:keep_exit_status] && !options[:exit_status]
|
33
|
-
|
34
|
-
abort
|
33
|
+
fail ArgumentError, 'keep-exit-status requires exit-status'
|
35
34
|
end
|
36
35
|
|
37
36
|
params = {
|
@@ -47,6 +46,10 @@ module GithubStatusNotifier
|
|
47
46
|
if options[:keep_exit_status]
|
48
47
|
exit options[:exit_status]
|
49
48
|
end
|
49
|
+
rescue StandardError => e
|
50
|
+
logger.error 'options:'
|
51
|
+
logger.error options
|
52
|
+
raise e
|
50
53
|
end
|
51
54
|
|
52
55
|
no_commands do
|
@@ -19,8 +19,11 @@ module GithubStatusNotifier
|
|
19
19
|
}
|
20
20
|
client.create_status(state, pass_params)
|
21
21
|
rescue StandardError => e
|
22
|
-
logger.error
|
23
|
-
logger.error
|
22
|
+
logger.error 'state:'
|
23
|
+
logger.error state
|
24
|
+
logger.error 'pass_params:'
|
25
|
+
logger.error pass_params
|
26
|
+
raise e
|
24
27
|
end
|
25
28
|
|
26
29
|
def decide_target_url(url)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_status_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -91,8 +91,6 @@ extra_rdoc_files: []
|
|
91
91
|
files:
|
92
92
|
- ".gitignore"
|
93
93
|
- ".rubocop.yml"
|
94
|
-
- ".tachikoma.yml"
|
95
|
-
- ".travis.yml"
|
96
94
|
- CODE_OF_CONDUCT.md
|
97
95
|
- Gemfile
|
98
96
|
- LICENSE.txt
|
data/.tachikoma.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
strategy: 'none'
|