slack-notification 0.1.8 → 0.1.10
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/.rubocop.yml +2 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +3 -3
- data/lib/slack_notification.rb +4 -3
- data/slack-notification.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6da78d2fccc92e6a7f94d1041b807a50b5a9295e0cfe8caf24fb2bd7fef2e897
|
|
4
|
+
data.tar.gz: 0f3f14659682ea36086771291e5b0f5384b295878ed61db0fee6c700a83788e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bd692dec5865ff74f448178d63a0062cd31eeec5e356acf7541dd134568f3eda40907ddb149fce76bce23e051ad6b9d675644502c66d5faf8bbdc707973d92f
|
|
7
|
+
data.tar.gz: d3595956062dff254af19108c4aeb74f8619bc1d52d42a232a802d3d27899b5751d697f602f2a1ca01320bc29828a56c5da7ae8aa58a6dcb9b8f8748b6e6c6f7
|
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.5.1
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
slack-notification (0.1.
|
|
4
|
+
slack-notification (0.1.10)
|
|
5
5
|
slack-notifier (~> 2.3)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -16,7 +16,7 @@ GEM
|
|
|
16
16
|
rainbow (3.0.0)
|
|
17
17
|
rake (12.3.3)
|
|
18
18
|
regexp_parser (2.0.3)
|
|
19
|
-
rexml (3.2.
|
|
19
|
+
rexml (3.2.5)
|
|
20
20
|
rspec (3.9.0)
|
|
21
21
|
rspec-core (~> 3.9.0)
|
|
22
22
|
rspec-expectations (~> 3.9.0)
|
|
@@ -46,7 +46,7 @@ GEM
|
|
|
46
46
|
docile (~> 1.1)
|
|
47
47
|
simplecov-html (~> 0.11)
|
|
48
48
|
simplecov-html (0.12.2)
|
|
49
|
-
slack-notifier (2.
|
|
49
|
+
slack-notifier (2.4.0)
|
|
50
50
|
unicode-display_width (1.7.0)
|
|
51
51
|
|
|
52
52
|
PLATFORMS
|
data/lib/slack_notification.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require 'slack-notifier'
|
|
4
4
|
|
|
5
5
|
class SlackNotification
|
|
6
|
-
attr_accessor :type, :dryrun, :title, :fallback, :fields, :channel
|
|
6
|
+
attr_accessor :type, :dryrun, :title, :fallback, :fields, :blocks, :channel
|
|
7
7
|
|
|
8
8
|
def initialize(options = {})
|
|
9
9
|
@channel = validated_channel(options[:channel].to_s)
|
|
@@ -12,6 +12,7 @@ class SlackNotification
|
|
|
12
12
|
@fallback = options[:fallback]
|
|
13
13
|
@dryrun = options[:dryrun] || (defined?(Rails) && Rails.env.test?)
|
|
14
14
|
@fields = validated_fields(options[:fields])
|
|
15
|
+
@blocks = options[:blocks]
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
def data
|
|
@@ -25,7 +26,7 @@ class SlackNotification
|
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
def notify!
|
|
28
|
-
@dryrun ? data : notifier.post(attachments: [data])
|
|
29
|
+
@dryrun ? data : notifier.post(attachments: [data], blocks: @blocks)
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
private
|
|
@@ -87,7 +88,7 @@ private
|
|
|
87
88
|
unknown_channel(channel) unless slack_urls.keys.include?(channel)
|
|
88
89
|
|
|
89
90
|
channel ||= 'notifications'
|
|
90
|
-
channel = 'test' if defined?(Rails) && !Rails.env.production?
|
|
91
|
+
channel = 'test' if defined?(Rails) && !(Rails.env.production? || Rails.env.staging?)
|
|
91
92
|
channel
|
|
92
93
|
end
|
|
93
94
|
|
data/slack-notification.gemspec
CHANGED
|
@@ -5,8 +5,8 @@ $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.
|
|
9
|
-
spec.date = '
|
|
8
|
+
spec.version = '0.1.10'
|
|
9
|
+
spec.date = '2023-03-11'
|
|
10
10
|
spec.authors = ['Julian Fiander']
|
|
11
11
|
spec.email = ['julian@fiander.one']
|
|
12
12
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slack-notification
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Fiander
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -127,6 +127,7 @@ extra_rdoc_files: []
|
|
|
127
127
|
files:
|
|
128
128
|
- ".gitignore"
|
|
129
129
|
- ".rubocop.yml"
|
|
130
|
+
- ".ruby-version"
|
|
130
131
|
- ".travis.yml"
|
|
131
132
|
- Gemfile
|
|
132
133
|
- Gemfile.lock
|
|
@@ -158,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
159
|
- !ruby/object:Gem::Version
|
|
159
160
|
version: '0'
|
|
160
161
|
requirements: []
|
|
161
|
-
rubygems_version: 3.
|
|
162
|
+
rubygems_version: 3.2.30
|
|
162
163
|
signing_key:
|
|
163
164
|
specification_version: 4
|
|
164
165
|
summary: A simplified Slack API.
|