slack-notification 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d48baf58d70ad1a83cd4a8f82fd832f4ffe29319fb58dd22e654bb701e71391f
4
- data.tar.gz: 8be9a3b3a81a092622066c295d5b7011713420e240350eb06ed18e9dd52cf9a2
3
+ metadata.gz: 60341880209819b483eb92eef16ac13d7f4eb2d6564d3b48c21e7ed0ec670a61
4
+ data.tar.gz: 5d3942f666b9a4e94d73d73fedc9685322fc8ea3603831fd9178103e6186961f
5
5
  SHA512:
6
- metadata.gz: e3b2950e3653af693a91176c5424c41a46602765c00dfc15db85212493bbda625e335bff453d906453fe1601d38dc2240552eeb47d799078b959133355c7e212
7
- data.tar.gz: 37fdaefd47f2985f90d2d06e2b5054cd720724f3e11a366773df9fb0c58db58aeed65e4ac181fd293161bd9efcf75ae29d832552acf83ccd8aee0f213045419b
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, ir present.
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
 
@@ -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
@@ -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.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('..', __FILE__)) do
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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander