comrad 0.1.0 → 0.1.1
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 +1 -0
- data/comrad.gemspec +1 -1
- data/lib/comrad/notifier.rb +9 -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: 1d764f2405cc54fc402db2ea721aaf06f0618e64
|
|
4
|
+
data.tar.gz: c9cdd17e48479bfc8b2e8bf7a80b02159afcbe8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58331c3e29042ee858df78513f097301d64b3285197ffc9f0b15e90e5e32371a495ffc86da10ad67ceabe76e933c2c2e5d5c425fd9e66852824d96f637e088e4
|
|
7
|
+
data.tar.gz: c469074647c9914ea46e84537b4f20524f4dfa29184efd5f38b5495593ee3ea32dd72b7046025f69f7597bf7725f205117f503b8641f727fcb64deb3f7c32176
|
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Comrad
|
|
2
2
|
======
|
|
3
3
|
[](https://travis-ci.org/tas50/Comrad)
|
|
4
|
+
[](http://badge.fury.io/rb/comrad)
|
|
4
5
|
|
|
5
6
|
Application to sync changes from git to Chef Server via Jenkins
|
|
6
7
|
|
data/comrad.gemspec
CHANGED
data/lib/comrad/notifier.rb
CHANGED
|
@@ -22,6 +22,7 @@ module Comrad
|
|
|
22
22
|
# send notifications to slack
|
|
23
23
|
class Notifier
|
|
24
24
|
def self::configure
|
|
25
|
+
validate_config
|
|
25
26
|
Slack::Post.configure(
|
|
26
27
|
webhook_url: Config.config['slack']['webhook_url'],
|
|
27
28
|
username: 'comrad',
|
|
@@ -58,5 +59,13 @@ module Comrad
|
|
|
58
59
|
|
|
59
60
|
[attach]
|
|
60
61
|
end
|
|
62
|
+
|
|
63
|
+
# Ensure the slack config is present
|
|
64
|
+
def self::validate_config
|
|
65
|
+
unless Config.config['slack']['webhook_url'] && Config.config['slack']['channel']
|
|
66
|
+
puts "\nSlack config in comrad.yml is incomplete. Cannot continue.".to_red
|
|
67
|
+
exit!
|
|
68
|
+
end
|
|
69
|
+
end
|
|
61
70
|
end
|
|
62
71
|
end
|