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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b35e974e04457e2d9e3b55af0c5c7562d0381c76477e9a85143c66e8d605071
4
- data.tar.gz: 21892df8e52b365ade154424d2c98a55434efb541e144d046d208fe8b1243f24
3
+ metadata.gz: 494d2f51af95a53df19c42dcaa9f88168cf44509b1675dbe001a42fdf39250dc
4
+ data.tar.gz: 306050272f54d60a1b6820f315ac51c0b563af71862847efdb2940464ca201b8
5
5
  SHA512:
6
- metadata.gz: 720e5bcf8d91f355939474b09f9d2a9830178037dca5c067ecfc4c6585631673e2ea13d888338ff1fb7a3d25ae1009b5f1a97f7a8244f1f06696b437227f6260
7
- data.tar.gz: b7fa2c16e3d5a31ac18605bda1e1eacdd367c6e94f34779c50964a92c679b8edcdc1168d3fa808392401669f55bbeae30aec607ec44a2cfd55b916d0ad0fe70d
6
+ metadata.gz: d8e43baeab730d3c6e7acbb1232b98d4a265b55260ab3c12bcc87325cb81d03f00b7ff05ff72667105e10e123c604630eac7331db238823374b8584d8242e611
7
+ data.tar.gz: 2c2709365ec780ca44c6960414861c9479eb3b2918d547ca3f3299745aa382e6affd6dfd46a364c27097f5e562939913e098c52bc72cb29911f7c9c669756d30
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.4.0] - 2023-02-21
4
+ - Add full support for ruby 3.0.x kwargs
5
+
3
6
  ## [3.3.0] - 2022-07-21
4
7
  - Differentiate errors for bad JSON versus invalid block data.
5
8
  - Expand tests to cover many more cases.
@@ -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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'slack_message'
3
- gem.version = "3.3.0"
3
+ gem.version = "3.4.0"
4
4
  gem.summary = "A nice DSL for composing rich messages in Slack"
5
5
  gem.authors = ["Joe Mastey"]
6
6
  gem.email = 'hello@joemastey.com'
@@ -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.3.0
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: 2022-07-21 00:00:00.000000000 Z
11
+ date: 2023-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec