slack_message 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/slack_message/dsl.rb +2 -2
- data/slack_message.gemspec +1 -1
- data/spec/slack_message_spec.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 494d2f51af95a53df19c42dcaa9f88168cf44509b1675dbe001a42fdf39250dc
|
4
|
+
data.tar.gz: 306050272f54d60a1b6820f315ac51c0b563af71862847efdb2940464ca201b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8e43baeab730d3c6e7acbb1232b98d4a265b55260ab3c12bcc87325cb81d03f00b7ff05ff72667105e10e123c604630eac7331db238823374b8584d8242e611
|
7
|
+
data.tar.gz: 2c2709365ec780ca44c6960414861c9479eb3b2918d547ca3f3299745aa382e6affd6dfd46a364c27097f5e562939913e098c52bc72cb29911f7c9c669756d30
|
data/CHANGELOG.md
CHANGED
data/lib/slack_message/dsl.rb
CHANGED
@@ -80,8 +80,8 @@ class SlackMessage::Dsl
|
|
80
80
|
# delegation to allow terse syntax without e.g. `section`
|
81
81
|
|
82
82
|
def text(*args); default_section.text(*args); end
|
83
|
-
def link_button(*args); default_section.link_button(*args); end
|
84
|
-
def accessory_image(*args); default_section.accessory_image(*args); end
|
83
|
+
def link_button(*args, **kwargs); default_section.link_button(*args, **kwargs); end
|
84
|
+
def accessory_image(*args, **kwargs); default_section.accessory_image(*args, **kwargs); end
|
85
85
|
def blank_line(*args); default_section.blank_line(*args); end
|
86
86
|
def link(*args); default_section.link(*args); end
|
87
87
|
def list_item(*args); default_section.list_item(*args); end
|
data/slack_message.gemspec
CHANGED
data/spec/slack_message_spec.rb
CHANGED
@@ -127,6 +127,14 @@ RSpec.describe SlackMessage do
|
|
127
127
|
SlackMessage.post_to('#general') { text "foo" }
|
128
128
|
}.to post_to_slack.with_content_matching(/foo/)
|
129
129
|
end
|
130
|
+
|
131
|
+
it "lets you send links with custom styles" do
|
132
|
+
expect {
|
133
|
+
SlackMessage.post_to('#general') do
|
134
|
+
link_button 'Does this person exist?', 'https://thispersondoesnotexist.com/image', style: :danger
|
135
|
+
end
|
136
|
+
}.to post_to_slack.with_content_matching(/danger/)
|
137
|
+
end
|
130
138
|
end
|
131
139
|
|
132
140
|
describe "API convenience" do
|
@@ -195,7 +203,7 @@ RSpec.describe SlackMessage do
|
|
195
203
|
end
|
196
204
|
|
197
205
|
shared_examples 'post api error message' do |error, error_message|
|
198
|
-
it "responds to posts with error code '#{error}' with the expected message" do
|
206
|
+
it "responds to posts with error code '#{error}' with the expected message" do
|
199
207
|
SlackMessage::RSpec.respond_with({'error' => error})
|
200
208
|
|
201
209
|
expect {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_message
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Mastey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|