slack-notifier 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79b056b73685dbdd4d4172685ec26bbcc2d56b44
4
- data.tar.gz: ff1568f0280763fe1079512389b7cba3e34a48aa
3
+ metadata.gz: 5924bad4c5a0afb1f1a02528a516fb9ddc0aad85
4
+ data.tar.gz: 376a76a81211128232dc6a013605ea527ce82334
5
5
  SHA512:
6
- metadata.gz: fc041be0c332e467e1cee9e59ea1e2f688c780c1886c2cbf25205e96f8c21714a23352d5649645fa86dfe32ce68958394f564bdb82d92b14655d8ba29caea44d
7
- data.tar.gz: 88c2002407abbb61df56cfbd4d3554d9f2676e86aebab6c7cce890d1b065b5948986d6c1fd6e0ad3bc8dc3eebef8297bf54cd498f1963ae848284a3bd2276942
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
@@ -1,5 +1,5 @@
1
1
  module Slack
2
2
  class Notifier
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  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.0
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-04 00:00:00.000000000 Z
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: