slack-notifier 1.3.0 → 1.3.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5924bad4c5a0afb1f1a02528a516fb9ddc0aad85
|
4
|
+
data.tar.gz: 376a76a81211128232dc6a013605ea527ce82334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02fb792d70de5843919aafa2d08442c450200afe8cd80aaa037e5aad71ff6edd20f13d89a675b7df28541044daa42927f1c932d4d988157ad4cfb3210dba4cdf
|
7
|
+
data.tar.gz: 76578fba2c0e256d4e74f6d55852bf099315ea7ae3f720aaab379a2782978500110568ecf49856d1e779cd449b06182ec30bc8305b9859cc2c5b025a1ff1c8d4
|
@@ -47,12 +47,14 @@ module Slack
|
|
47
47
|
return out
|
48
48
|
end
|
49
49
|
|
50
|
+
# http://rubular.com/r/19cNXW5qbH
|
50
51
|
def html_pattern
|
51
52
|
/ <a (?:.*?) href=['"](.+?)['"] (?:.*?)> (.+?) <\/a> /x
|
52
53
|
end
|
53
54
|
|
55
|
+
# http://rubular.com/r/fLEdmTSghW
|
54
56
|
def markdown_pattern
|
55
|
-
/\[(
|
57
|
+
/\[ ([^\[\]]*?) \] \( (https?:\/\/.*?) \) /x
|
56
58
|
end
|
57
59
|
|
58
60
|
end
|
@@ -15,6 +15,11 @@ describe Slack::Notifier::LinkFormatter do
|
|
15
15
|
expect( formatted ).to include("<http://example.com|this>")
|
16
16
|
end
|
17
17
|
|
18
|
+
it "formats markdown links in brackets" do
|
19
|
+
formatted = described_class.format("Hello World, enjoy [[this](http://example.com) in brackets].")
|
20
|
+
expect( formatted ).to eq("Hello World, enjoy [<http://example.com|this> in brackets].")
|
21
|
+
end
|
22
|
+
|
18
23
|
it "formats markdown links with no title" do
|
19
24
|
formatted = described_class.format("Hello World, enjoy [](http://example.com).")
|
20
25
|
expect( formatted ).to include("<http://example.com>")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ' A slim ruby wrapper for posting to slack webhooks '
|
14
14
|
email:
|