slack_message 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/README.md +16 -11
- data/docs/02_posting_a_message.md +7 -3
- data/docs/03_message_dsl.md +112 -51
- data/docs/04_editing_messages.md +6 -7
- data/docs/05_deleting_messages.md +7 -7
- data/docs/06_notifying_users.md +1 -1
- data/docs/index.md +4 -0
- data/lib/slack_message/dsl.rb +11 -0
- data/slack_message.gemspec +1 -1
- data/spec/slack_message_spec.rb +11 -3
- 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: 100c64a0e3204d4715ffde4c0a11e0b380c7966289b8b841ef2ab7cb73f657b2
|
4
|
+
data.tar.gz: 3213f9c1817a211f57685002025dc72929f41652ba7c9e69e62d5314508fc3dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 238cdf0160b6c2101cbabdadef3818dd0bcd2163d9a3ababba854affa0fbaca2533489aa203b27a2309af8e85aa7e814786a9ce8eb29dd51d949cefc1d209921
|
7
|
+
data.tar.gz: b0ad7654cfcac475f32eb81ede6e730046ef3721190ae1f255ceaff58331fbf6d4ee570a290dc16e660ca32611cc8639998677c5980f2eaaedd72388293b22df
|
data/.github/workflows/main.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.0.2] - 2022-04-16
|
4
|
+
- Fix tests on ruby 3.0.
|
5
|
+
- More adjustments and additions to docs.
|
6
|
+
- Add warnings when overriding notification text and context block.
|
7
|
+
|
3
8
|
## [3.0.1] - 2021-12-22
|
4
9
|
- Major overhaul of error handling and expansion on which errors trigger
|
5
10
|
friendly messages for users.
|
data/README.md
CHANGED
@@ -19,12 +19,11 @@ You'll find much more information about how to use SlackMessage by visiting
|
|
19
19
|
[the docs](https://jmmastey.github.io/slack_message).
|
20
20
|
|
21
21
|
|
22
|
-
###
|
22
|
+
### A Rich DSL Focused on Maintainability
|
23
23
|
|
24
|
-
SlackMessage is able to build all kinds of rich messages for you
|
25
|
-
|
26
|
-
|
27
|
-
Builder](https://app.slack.com/block-kit-builder/). There are lots of options:
|
24
|
+
SlackMessage is able to build all kinds of rich messages for you. It focuses on
|
25
|
+
writing code that looks similar to the output messages themselves, with as
|
26
|
+
little repetition and cruft as possible.
|
28
27
|
|
29
28
|
```ruby
|
30
29
|
SlackMessage.post_to('#general') do
|
@@ -76,20 +75,26 @@ Accordingly, SlackMessage is developed with some strong opinions in mind:
|
|
76
75
|
doesn't exist in the API), or leading spaces.
|
77
76
|
* Configuration is kept simple, with helpers for frequently reused bots.
|
78
77
|
|
79
|
-
Some
|
78
|
+
Some changes that are still planned or desired, but not yet added:
|
80
79
|
|
81
80
|
* any interactive elements at all: https://api.slack.com/interactivity/handling
|
82
81
|
* multiple recipients: https://api.slack.com/methods/conversations.open
|
83
|
-
* more mrkdwn syntax, like quotes or code blocks
|
84
|
-
* more and better organized testing capability (scheduled messages, editing, deleting)
|
82
|
+
* more mrkdwn syntax, like quotes or code blocks https://api.slack.com/reference/surfaces/formatting#line-breaks
|
83
|
+
* more and better organized testing capability (for scheduled messages, editing, deleting)
|
85
84
|
* posting ephemeral messages: https://api.slack.com/methods/chat.postEphemeral
|
85
|
+
* easier way to dump / load message responses
|
86
|
+
* updated docs w/ links to BlockBuilder
|
86
87
|
|
87
88
|
### Contributing
|
88
89
|
|
89
|
-
Contributions are very welcome. Fork, fix, submit pull. Since simplicity of API
|
90
|
+
Contributions are very welcome. Fork, fix, submit pull. Since simplicity of API
|
91
|
+
is a strong priority, so opening an issue to discuss possible interface changes
|
92
|
+
would be wise.
|
90
93
|
|
91
|
-
Contribution is expected to conform to the [Contributor
|
94
|
+
Contribution is expected to conform to the [Contributor
|
95
|
+
Covenant](https://github.com/jmmastey/slack_message/blob/master/CODE_OF_CONDUCT.md).
|
92
96
|
|
93
97
|
### License
|
94
98
|
|
95
|
-
This software is released under the [MIT
|
99
|
+
This software is released under the [MIT
|
100
|
+
License](https://github.com/jmmastey/slack_message/blob/master/MIT-LICENSE).
|
@@ -101,7 +101,7 @@ end
|
|
101
101
|
|
102
102
|
### Scheduling a Message
|
103
103
|
|
104
|
-
To schedule a message, simply provide
|
104
|
+
To schedule a message, simply provide an `at` parameter to your post. Provide
|
105
105
|
either a time object that responds to `to_i`, or an integer that represents a
|
106
106
|
[unix timestamp](https://en.wikipedia.org/wiki/Unix_time) for the time at which
|
107
107
|
you want your message posted.
|
@@ -121,8 +121,12 @@ nor can they be scheduled more than 120 days into the future.
|
|
121
121
|
|
122
122
|
### Best Practices
|
123
123
|
|
124
|
-
|
125
|
-
|
124
|
+
From experience, building messages with maintainability in mind is key. Adding
|
125
|
+
lots of flow control and indirection will undermine your ability to understand
|
126
|
+
and change messages later.
|
127
|
+
|
128
|
+
For simple messages, using implicit sections is perfectly fine. However, if you
|
129
|
+
intend to create several sections, it's usually better to just declare them.
|
126
130
|
|
127
131
|
See the [API documentation for
|
128
132
|
chat.postMessage](https://api.slack.com/methods/chat.postMessage) or
|
data/docs/03_message_dsl.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
-
|
1
|
+
## The Message DSL
|
2
2
|
|
3
|
-
A pretty good number of the elements available in BlockKit are usable in
|
3
|
+
A pretty good number of the elements available in BlockKit are usable in
|
4
|
+
SlackMessage. There are also a few elements that haven't been implemented in
|
5
|
+
the official API, but are too useful to be missing.
|
4
6
|
|
5
|
-
|
7
|
+
### Basic Text
|
6
8
|
|
7
|
-
While BlockKit officially requires that any elements are contained within a
|
9
|
+
While BlockKit officially requires that any elements are contained within a
|
10
|
+
section element, that requirement is relaxed in SlackMessage. If you don't
|
11
|
+
specify a section, one will silently be created to encapsulate your code.
|
12
|
+
That's the secret behind the most basic messages in these docs.
|
8
13
|
|
9
14
|
```ruby
|
10
15
|
SlackMessage.build do
|
@@ -108,7 +113,51 @@ end
|
|
108
113
|
Note that between the two newlines in the above example is a unicode emspace,
|
109
114
|
which the API will respect as a line worth rendering.
|
110
115
|
|
111
|
-
|
116
|
+
### Explicitly Declared Sections
|
117
|
+
|
118
|
+
Adding more sections is trivial. Simply declare each section and it will be
|
119
|
+
separated in the rendered message. This can often occur when looping.
|
120
|
+
|
121
|
+
```ruby
|
122
|
+
SlackMessage.build do
|
123
|
+
pet_types.each do |type, breeds|
|
124
|
+
section do
|
125
|
+
text "*#{type}:* #{breeds.join(", ")}"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
It can also be useful to add a visual divider (similar to an `hr` in HTML)
|
132
|
+
between sections. To add one of these, use the `divider` helper. You can also
|
133
|
+
add a divider at the end of all the sections, but it often looks silly.
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
SlackMessage.build do
|
137
|
+
section do
|
138
|
+
text "*Topsiders:* Emily, Elsie, Derick"
|
139
|
+
end
|
140
|
+
|
141
|
+
divider
|
142
|
+
|
143
|
+
section do
|
144
|
+
text "*Undergrounders:* Kristina, Lauren, Different Emily"
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# => [
|
149
|
+
# {:type=>"section", :text=>{:type=>"mrkdwn", :text=>"*Topsiders:* Emily, Elsie, Derick"}},
|
150
|
+
# {:type=>"divider"},
|
151
|
+
# {:type=>"section", :text=>{:type=>"mrkdwn", :text=>"*Undergrounders:* Kristina, Lauren, Different Emily"}}
|
152
|
+
# ]
|
153
|
+
```
|
154
|
+
|
155
|
+
Note that a divider can only occur between sections, not within a single
|
156
|
+
section. Because of how implicit sections are built, it may look like this
|
157
|
+
works for simple messages. But, you may have troubles when you start adding
|
158
|
+
more complicated elements to your messages.
|
159
|
+
|
160
|
+
### Buttons
|
112
161
|
|
113
162
|
BlockKit allows you to specify a button to the right of a section / block. That
|
114
163
|
button will be aligned outside the normal space for a section, and is meant to
|
@@ -132,10 +181,10 @@ end
|
|
132
181
|
Slack allows three styles for buttons: `default`, `primary`, and `danger`.
|
133
182
|
These correspond to gray, green and red buttons respectively. If not specified,
|
134
183
|
SlackMessage will use the `primary` style for buttons. I get that this could be
|
135
|
-
confusing when there is a default
|
136
|
-
is way more common.
|
184
|
+
confusing when there is a style specifically named default, but in my
|
185
|
+
experience, a colorful button is way more common.
|
137
186
|
|
138
|
-
You can override
|
187
|
+
You can override button style by specifying the style with your link button.
|
139
188
|
|
140
189
|
```ruby
|
141
190
|
SlackMessage.build do
|
@@ -152,7 +201,7 @@ end
|
|
152
201
|
# :style=>:danger}}]
|
153
202
|
```
|
154
203
|
|
155
|
-
|
204
|
+
### Ordered and Unordered Lists
|
156
205
|
|
157
206
|
The Slack API doesn't have native support for HTML-style ordered and unordered
|
158
207
|
lists, but there are convenience methods in SlackMessage to render a close
|
@@ -182,7 +231,7 @@ Because Slack automatically collapses leading whitespace, indention of lists is
|
|
182
231
|
handled using unicode emspaces. Bullets for unordered lists are also unicode
|
183
232
|
characters to avoid being read as markdown.
|
184
233
|
|
185
|
-
|
234
|
+
### List Items (e.g. HTML dt & dd)
|
186
235
|
|
187
236
|
When trying to represent title / value lists, you can use the "list item" block
|
188
237
|
type to pass a set of values. Slack does not allow you to customize how many
|
@@ -199,58 +248,67 @@ SlackMessage.build do
|
|
199
248
|
end
|
200
249
|
```
|
201
250
|
|
202
|
-
|
251
|
+
### Images and Accessory Images
|
203
252
|
|
204
|
-
|
205
|
-
|
253
|
+
There are two main types of images in Slack: the
|
254
|
+
[image](https://imgur.com/XEUap1r) and the [accessory
|
255
|
+
image](https://imgur.com/zuhjBDq). In short, `accessory_image` is part of a
|
256
|
+
section itself and is shown alongside an existing block, while `image` is shown
|
257
|
+
as its own top-level element.
|
258
|
+
|
259
|
+
Accordingly, an accessory image should be used within a section. An accessory
|
260
|
+
image can accept alt-text, which is also a best practice, for usability
|
261
|
+
reasons.
|
206
262
|
|
207
263
|
```ruby
|
208
264
|
SlackMessage.build do
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
end
|
265
|
+
section do
|
266
|
+
text 'Looks like the coffee machine is empty.'
|
267
|
+
accessory_image 'https://your.com/empty_coffee_logo.jpg', alt_text: 'logo of a forlorn coffee cup'
|
213
268
|
end
|
214
269
|
end
|
215
270
|
```
|
216
271
|
|
217
|
-
|
218
|
-
|
219
|
-
|
272
|
+
Only one accessory image can be used per section, and declaring more will issue
|
273
|
+
a warning and simply override the previous accessory image.
|
274
|
+
|
275
|
+
By contrast, `image` can be used many times, and will create a new top-level
|
276
|
+
section for each call. Image accepts alt-text, but also a title, which will
|
277
|
+
be displayed above the image (along with an icon to collapse the image).
|
220
278
|
|
221
279
|
```ruby
|
222
280
|
SlackMessage.build do
|
223
281
|
section do
|
224
|
-
text
|
282
|
+
text 'Most Recent Tiny Pig Images'
|
225
283
|
end
|
226
284
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
text "*Undergrounders:* Kristina, Lauren, Different Emily"
|
231
|
-
end
|
285
|
+
image 'https://your.com/employee_pets/best/pig_1.jpg', alt_text: 'a tiny pig eating ice cream', title: 'Spider Pig'
|
286
|
+
image 'https://your.com/employee_pets/best/pig_2.jpg', alt_text: 'a tiny pig smiling mischeviously', title: 'Porkeypine'
|
287
|
+
image 'https://your.com/employee_pets/best/pig_3.jpg', alt_text: 'a tiny pig with wellies and an umbrella', title: 'Albert Sweinstein'
|
232
288
|
end
|
233
|
-
|
234
|
-
# => [
|
235
|
-
# {:type=>"section", :text=>{:type=>"mrkdwn", :text=>"*Topsiders:* Emily, Elsie, Derick"}},
|
236
|
-
# {:type=>"divider"},
|
237
|
-
# {:type=>"section", :text=>{:type=>"mrkdwn", :text=>"*Undergrounders:* Kristina, Lauren, Different Emily"}}
|
238
|
-
# ]
|
239
289
|
```
|
240
290
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
291
|
+
Sectionless messages can also use `accessory_image`, but this can get confusing
|
292
|
+
since they could potentially be interspersed with top-level images, so I
|
293
|
+
wouldn't recommend it.
|
294
|
+
|
295
|
+
```ruby
|
296
|
+
# the difference between these two image styles is confusing, and the call
|
297
|
+
# to `image` closed the current section and started a new one.
|
298
|
+
SlackMessage.build do
|
299
|
+
text 'Looks like the coffee machine is empty.'
|
300
|
+
accessory_image 'https://your.com/empty_coffee_logo.jpg'
|
245
301
|
|
246
|
-
|
247
|
-
|
302
|
+
text '*Most Recent Coffee Maker Surveillance Photo*'
|
303
|
+
image 'https://your.com/surveillance/coffee/current.jpg'
|
304
|
+
end
|
305
|
+
```
|
248
306
|
|
249
|
-
|
307
|
+
### Footers (Context)
|
250
308
|
|
251
309
|
Slack allows you to add a small additional piece of text to your message, which
|
252
|
-
will be rendered in italics and small text. It can support both links and
|
253
|
-
and is useful for providing minor details for your message.
|
310
|
+
will be rendered in italics and small text. It can support both links and
|
311
|
+
emoji, and is useful for providing minor details for your message.
|
254
312
|
|
255
313
|
```ruby
|
256
314
|
SlackMessage.build do
|
@@ -268,15 +326,16 @@ end
|
|
268
326
|
# }]
|
269
327
|
```
|
270
328
|
|
271
|
-
Context does not belong to a section, and
|
272
|
-
|
329
|
+
Context does not belong to a section, and only one can be added to your entire
|
330
|
+
slack message. Specifying another `context` will issue a warning and overwrite
|
331
|
+
any previous call.
|
273
332
|
|
274
|
-
|
333
|
+
### Bot Customization
|
275
334
|
|
276
335
|
By default - and with scheduled messages - Slack will use the name and icon of
|
277
|
-
the Slack app whose API key you configured. As seen before, it's
|
278
|
-
|
279
|
-
|
336
|
+
the Slack app whose API key you configured. As seen before, it's possible to
|
337
|
+
override those default names and icons in configuration. However, it can also
|
338
|
+
be customized per-message.
|
280
339
|
|
281
340
|
```ruby
|
282
341
|
SlackMessage.build do
|
@@ -290,13 +349,13 @@ end
|
|
290
349
|
```
|
291
350
|
|
292
351
|
Notice that the bot details aren't shown in the output of the `build` command.
|
293
|
-
To view the
|
352
|
+
To view the change to the message payload from these calls, use `debug` mode.
|
294
353
|
|
295
|
-
The `bot_icon` can be specified as either an emoji (`:
|
354
|
+
The `bot_icon` can be specified as either an emoji (`:shipit:`), or a URL
|
296
355
|
pointing to an image (`http://mysite.com/shipit.png`). Any other value seems to
|
297
356
|
cause an error.
|
298
357
|
|
299
|
-
|
358
|
+
### Custom Notification Text
|
300
359
|
|
301
360
|
For users who have notifications turned on, Slack will provide a small message
|
302
361
|
preview when you send them a message. By default, this preview will take the
|
@@ -319,7 +378,9 @@ end
|
|
319
378
|
```
|
320
379
|
|
321
380
|
Again notice that notification text is not set within the blocks themselves, so
|
322
|
-
you will need to enable debugging to see how it changes what is sent to the
|
381
|
+
you will need to enable debugging to see how it changes what is sent to the
|
382
|
+
API. Only one custom notification is allowed, so further calls will issue a
|
383
|
+
warning and replace the previous notification text.
|
323
384
|
|
324
385
|
---
|
325
386
|
|
data/docs/04_editing_messages.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
## Updating a Previous Message
|
2
2
|
|
3
3
|
After you've posted a message, you may want to edit it later. Interactive bots,
|
4
4
|
for instance, may want to repeatedly update a message.
|
@@ -52,12 +52,11 @@ class SomeWorker < ApplicationWorker
|
|
52
52
|
end
|
53
53
|
```
|
54
54
|
|
55
|
-
|
55
|
+
### Storing Response Objects for Later
|
56
56
|
|
57
|
-
Since updates are likely to occur after you
|
58
|
-
|
59
|
-
|
60
|
-
for later.
|
57
|
+
Since updates are likely to occur long after you post the original message, you
|
58
|
+
may want to persist a reference to the message until you need to update it
|
59
|
+
later. As one option, you could serialize the response object for later.
|
61
60
|
|
62
61
|
```ruby
|
63
62
|
# initially
|
@@ -74,7 +73,7 @@ SlackMessage.update(message) do
|
|
74
73
|
end
|
75
74
|
```
|
76
75
|
|
77
|
-
|
76
|
+
### Updating Scheduled Messages
|
78
77
|
|
79
78
|
Sadly, there's currently no way to edit a scheduled message. You'll receive an
|
80
79
|
error if you attempt to call `update` on a scheduled message.
|
@@ -1,26 +1,26 @@
|
|
1
|
-
|
1
|
+
## Deleting Messages
|
2
2
|
|
3
3
|
Deleting a message is much like editing a message, only simpler. Just like when
|
4
4
|
you edit a message, you'll need a reference to the message you posted.
|
5
5
|
|
6
|
-
*Important Note: It's not possible to delete a message sent directly to a user.
|
7
|
-
It's also not possible to delete a scheduled message once it's already posted.
|
8
|
-
Don't send anything you don't want your boss to read.*
|
9
|
-
|
10
6
|
```ruby
|
11
7
|
message = SlackMessage.post_to('#general') do
|
12
8
|
text "Testing: #{SLACK_SECRET_KEY}"
|
13
9
|
end
|
14
10
|
```
|
15
11
|
|
16
|
-
|
12
|
+
Then you can simply call the `delete` method to make up for your mistakes.
|
17
13
|
|
18
14
|
```ruby
|
19
15
|
SlackMessage.delete(message)
|
20
16
|
```
|
21
17
|
|
18
|
+
*Important Note: It's not possible to delete a message sent directly to a user.
|
19
|
+
It's also not possible to delete a scheduled message once it's already posted.
|
20
|
+
Don't send anything you don't want your boss to read.*
|
21
|
+
|
22
22
|
As with editing a message, it's possible to persist messages to redis / your
|
23
|
-
database
|
23
|
+
database to be removed at a later date.
|
24
24
|
|
25
25
|
```ruby
|
26
26
|
# initially
|
data/docs/06_notifying_users.md
CHANGED
data/docs/index.md
CHANGED
data/lib/slack_message/dsl.rb
CHANGED
@@ -63,6 +63,13 @@ class SlackMessage::Dsl
|
|
63
63
|
|
64
64
|
text = self.enrich_text(text)
|
65
65
|
|
66
|
+
|
67
|
+
previous_context = @body.find { |element| element[:type] && element[:type] == "context" }
|
68
|
+
if previous_context
|
69
|
+
previous_text = previous_context[:elements].first[:text]
|
70
|
+
warn "WARNING: Overriding previous context in section: #{previous_text}"
|
71
|
+
end
|
72
|
+
|
66
73
|
@body.push({ type: "context", elements: [{
|
67
74
|
type: "mrkdwn", text: text
|
68
75
|
}]})
|
@@ -94,6 +101,10 @@ class SlackMessage::Dsl
|
|
94
101
|
end
|
95
102
|
|
96
103
|
def notification_text(msg)
|
104
|
+
if @custom_notification
|
105
|
+
warn "WARNING: Overriding previous custom notification text: #{@custom_notification}"
|
106
|
+
end
|
107
|
+
|
97
108
|
@custom_notification = msg
|
98
109
|
end
|
99
110
|
|
data/slack_message.gemspec
CHANGED
data/spec/slack_message_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
RSpec.describe SlackMessage do
|
4
|
+
|
4
5
|
describe "DSL" do
|
5
6
|
describe "#build" do
|
6
7
|
it "renders some JSON" do
|
@@ -49,6 +50,13 @@ RSpec.describe SlackMessage do
|
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
53
|
+
fit do
|
54
|
+
SlackMessage.build do
|
55
|
+
notification_text 'one'
|
56
|
+
notification_text 'two'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
52
60
|
it "can assert expectations against posts" do
|
53
61
|
expect {
|
54
62
|
SlackMessage.post_to('#lieutenant') { text "foo" }
|
@@ -166,7 +174,7 @@ RSpec.describe SlackMessage do
|
|
166
174
|
end
|
167
175
|
|
168
176
|
it "raises nice error messages when API methods return errors" do
|
169
|
-
SlackMessage::RSpec.respond_with('error' => 'nuffin')
|
177
|
+
SlackMessage::RSpec.respond_with({'error' => 'nuffin'})
|
170
178
|
|
171
179
|
expect {
|
172
180
|
SlackMessage.post_to('#general') { text 'nuh uh' }
|
@@ -188,7 +196,7 @@ RSpec.describe SlackMessage do
|
|
188
196
|
it "raises errors w/ updates too" do
|
189
197
|
message = SlackMessage.post_to('#general') { text 'nuh uh' }
|
190
198
|
|
191
|
-
SlackMessage::RSpec.respond_with('error' => 'bad choice')
|
199
|
+
SlackMessage::RSpec.respond_with({'error' => 'bad choice'})
|
192
200
|
|
193
201
|
expect {
|
194
202
|
SlackMessage.update(message) { text 'nuh uh' }
|
@@ -198,7 +206,7 @@ RSpec.describe SlackMessage do
|
|
198
206
|
it "even raises errors during deletes" do
|
199
207
|
message = SlackMessage.post_to('#general') { text 'nuh uh' }
|
200
208
|
|
201
|
-
SlackMessage::RSpec.respond_with('error' => 'bad choice')
|
209
|
+
SlackMessage::RSpec.respond_with({'error' => 'bad choice'})
|
202
210
|
|
203
211
|
expect {
|
204
212
|
SlackMessage.delete(message) { text 'nuh uh' }
|
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.0.
|
4
|
+
version: 3.0.2
|
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: 2022-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|