slack_message 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/slack_message/api.rb +1 -0
- data/lib/slack_message/dsl.rb +1 -1
- data/slack_message.gemspec +1 -1
- data/spec/slack_message_spec.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3438c93abd1488bafc0ee9f33df94674290b68bd94110e8f2e601d95d3254bc
|
4
|
+
data.tar.gz: 5eee7e715e66042ab6c3ccbc47eedba3e2ddddacd327e1096e3a2d3476b076b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddc5ace3b66e6977b164accfeec16c67450ed8fbd182939e85aa1d56c251319f203c4527d75d410c2858bbfa7540889a83ed08aed12890488944077edf1867ed
|
7
|
+
data.tar.gz: 16601f240ee826b8cadbd03429b5fd431ba21a5b159c1ca3c70932da362b54388c32115544bf782c45f9e2b1c603801d82e2fd6827e7020abfcaed18669601ee
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,13 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [1.7.1] - 2021-10-06
|
6
|
+
- Fixed literally a syntax issue.
|
7
|
+
- Fixed specs.
|
8
|
+
- Fixed API to include JSON since consumers may not have loaded it.
|
9
|
+
|
5
10
|
## [1.7.0] - 2021-10-06
|
11
|
+
- THIS RELEASE IS BADLY BROKEN.
|
6
12
|
- Added new error messages when API configuration is wrong / missing.
|
7
13
|
- Fixed issue with `instance_eval` and using methods within block.
|
8
14
|
- Fixed issue with sectionless `list_item`.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -225,6 +225,8 @@ opinionated stances on how to make use of that API. For instance:
|
|
225
225
|
* Generally, same goes for the `emoji` flag on almost every text element.
|
226
226
|
* It's possible to ask for a `blank_line` in sections, even though that concept
|
227
227
|
isn't real. In this case, a text line containing only an emspace is rendered.
|
228
|
+
* It's easy to configure a bot for consistent name / channel use. My previous
|
229
|
+
use of SlackNotifier led to frequently inconsistent names.
|
228
230
|
|
229
231
|
What it Doesn't Do
|
230
232
|
------------
|
data/lib/slack_message/api.rb
CHANGED
data/lib/slack_message/dsl.rb
CHANGED
@@ -6,7 +6,7 @@ class SlackMessage::Dsl
|
|
6
6
|
def initialize(block)
|
7
7
|
# Delegate missing methods to caller scope. Thanks 2008:
|
8
8
|
# https://www.dan-manges.com/blog/ruby-dsls-instance-eval-with-delegation
|
9
|
-
@caller_self = eval("self", block.binding
|
9
|
+
@caller_self = eval("self", block.binding)
|
10
10
|
|
11
11
|
@body = []
|
12
12
|
@default_section = Section.new
|
data/slack_message.gemspec
CHANGED
data/spec/slack_message_spec.rb
CHANGED
@@ -7,9 +7,10 @@ RSpec.describe SlackMessage do
|
|
7
7
|
|
8
8
|
describe "API convenience" do
|
9
9
|
it "can grab user IDs" do
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
SlackMessage.configure { |c| c.api_token = "asdf" }
|
11
|
+
allow(Net::HTTP).to receive(:start).and_return(
|
12
|
+
double(code: "200", body: '{ "user": { "id": "ABC123" }}')
|
13
|
+
)
|
13
14
|
|
14
15
|
result = SlackMessage.user_id_for("hello@joemastey.com")
|
15
16
|
expect(result).to eq("ABC123")
|
@@ -63,7 +64,6 @@ RSpec.describe SlackMessage do
|
|
63
64
|
config.add_profile(:nonstandard, name: 'another profile', url: 'http://hooks.slack.com/1234/')
|
64
65
|
end
|
65
66
|
|
66
|
-
|
67
67
|
expect(SlackMessage.configuration.profile(:default)[:name]).to eq('default profile')
|
68
68
|
expect(SlackMessage.configuration.profile(:nonstandard)[:name]).to eq('another profile')
|
69
69
|
|