slack-notification 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 -1
- data/lib/slack_notification.rb +1 -1
- data/slack-notification.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60341880209819b483eb92eef16ac13d7f4eb2d6564d3b48c21e7ed0ec670a61
|
|
4
|
+
data.tar.gz: 5d3942f666b9a4e94d73d73fedc9685322fc8ea3603831fd9178103e6186961f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 147652377aa885cf0dd7f52ffa7af5e43daedfb2d7d9e1b2314f7cd5feed3505cc853fa7ce62910ce7598fac94e58b317a4a58f021bee8b88b5bd915d297ac3b
|
|
7
|
+
data.tar.gz: 76bf1d30404471d05a05eb412fcdfe9cd0015a7b263f764257b6ec6fadd4752afccaea75604f7889bcef52154a3beddcf1901ad7cdf21f00b9432c37986acb22
|
data/README.md
CHANGED
|
@@ -63,7 +63,9 @@ Array: Array of hashes, each of format: `{ title: 'Field name', value: field_va
|
|
|
63
63
|
|
|
64
64
|
Channels can be made available by setting ENV variables beginning with `SLACK_URL_`.
|
|
65
65
|
|
|
66
|
-
If you are using Rails credentials, the `:slack` will take priority over ENV variables,
|
|
66
|
+
If you are using Rails credentials, the `:slack` will take priority over ENV variables, if present.
|
|
67
|
+
|
|
68
|
+
The title field will default to `ENV['SLACK_DEFAULT_TITLE']`, if present.
|
|
67
69
|
|
|
68
70
|
## License
|
|
69
71
|
|
data/lib/slack_notification.rb
CHANGED
|
@@ -16,7 +16,7 @@ class SlackNotification
|
|
|
16
16
|
|
|
17
17
|
def data
|
|
18
18
|
@data = {}
|
|
19
|
-
@data['title'] = @title || 'Notification'
|
|
19
|
+
@data['title'] = @title || ENV['SLACK_DEFAULT_TITLE'] || 'Notification'
|
|
20
20
|
@data['fallback'] = @fallback || @data['title']
|
|
21
21
|
@data['fields'] = @fields if @fields.present?
|
|
22
22
|
@data['color'] = slack_color
|
data/slack-notification.gemspec
CHANGED
|
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'slack-notification'
|
|
8
|
-
spec.version = '0.1.
|
|
8
|
+
spec.version = '0.1.2'
|
|
9
9
|
spec.authors = ['Julian Fiander']
|
|
10
10
|
spec.email = ['julian@fiander.one']
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
|
|
20
20
|
# Specify which files should be added to the gem when it is released.
|
|
21
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
-
spec.files = Dir.chdir(File.expand_path(
|
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
23
23
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
24
24
|
end
|
|
25
25
|
spec.bindir = 'exe'
|