slack_message 3.0.2 → 3.1.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 +4 -0
- data/slack_message.gemspec +1 -1
- data/spec/slack_message_spec.rb +12 -2
- 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: 2b4cc88c84b2a958d75262b0d1fea97de8b7b694555159e4962a4a9fa16c55f6
|
4
|
+
data.tar.gz: 750afd5d7321952cc9dbf344d6db3659f85d916f988ca7ac3e56ec615cde4b34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eb4393b8e51b899a65abe790f4e217522441274bc6cc418ea21e43257716d218ad87fbddfce2fd7521f4305840312967249f4faf20261f5f7b665ec01d55896
|
7
|
+
data.tar.gz: ce790defaa92aeea75683771a85ef827386a1275524ac6006139aa3db58e387797ae5f8b8623e6896f07c5af0e6fd881b2878bac1cadf1be398333ab20066a2c
|
data/CHANGELOG.md
CHANGED
data/lib/slack_message/dsl.rb
CHANGED
data/slack_message.gemspec
CHANGED
data/spec/slack_message_spec.rb
CHANGED
@@ -4,6 +4,10 @@ RSpec.describe SlackMessage do
|
|
4
4
|
|
5
5
|
describe "DSL" do
|
6
6
|
describe "#build" do
|
7
|
+
def outer_method
|
8
|
+
"foo"
|
9
|
+
end
|
10
|
+
|
7
11
|
it "renders some JSON" do
|
8
12
|
SlackMessage.configure do |config|
|
9
13
|
config.clear_profiles!
|
@@ -13,11 +17,17 @@ RSpec.describe SlackMessage do
|
|
13
17
|
expected_output = [
|
14
18
|
{ type: "section",
|
15
19
|
text: { text: "foo", type: "mrkdwn" }
|
16
|
-
}
|
20
|
+
},
|
21
|
+
{ type: "section",
|
22
|
+
text: { text: "foo", type: "mrkdwn" }
|
23
|
+
},
|
17
24
|
]
|
18
25
|
|
19
26
|
output = SlackMessage.build do
|
20
|
-
text
|
27
|
+
text outer_method()
|
28
|
+
section do
|
29
|
+
text outer_method()
|
30
|
+
end
|
21
31
|
end
|
22
32
|
|
23
33
|
expect(output).to eq(expected_output)
|
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.1.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-04-
|
11
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|