slack-notifier 0.6.0 → 0.6.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: f3a07aa79b784ac446857af4e6256d467d0d09ab
4
- data.tar.gz: 9d41a7a8c98ac9b9a780c1398c07b7a1988db111
3
+ metadata.gz: 64899197a10189dcf547d2145599c9cd2f58dc58
4
+ data.tar.gz: 760a4379a03ce8171fa78c41f903bd718ee6469e
5
5
  SHA512:
6
- metadata.gz: 9ce9ea031ea4f5e996a784ebd43b22896ddc49b7d258ef353cfb59b7d30e6250178255390933322c146cebf46686f4cd333548df0a4cd3ebfd339c3180f9148e
7
- data.tar.gz: d03f6d11af25cc31083478893f95be4c6172aa8533b2acf9b18cfa4e11c33dd096b6489dabeacf6a131b3553b1ff95c4683653af27b93133687be4abdd32dc40
6
+ metadata.gz: 43b0dba726b3e0d06b8616bbcfe8f3dc4f742f480794c59a4bd6f2c1a4a1fa2e1628bf28258315be502c3ca3248d661e56f34fadc39258b0ccd911ffa4a94a60
7
+ data.tar.gz: 24a89065f0d7f010c09bd8f71f89989a1b824c6ab483cfeeeed1e6507a362c9acabfd011471ed66cbba7fef584a57fa55cf4ca8b95a6ef33af07dd9adfa3753b
@@ -37,7 +37,7 @@ module Slack
37
37
  end
38
38
 
39
39
  def html_pattern
40
- / <a (?:.*?) href=['"](.+)['"] (?:.*)> (.+?) <\/a> /x
40
+ / <a (?:.*?) href=['"](.+?)['"] (?:.*?)> (.+?) <\/a> /x
41
41
  end
42
42
 
43
43
  def markdown_pattern
@@ -1,5 +1,5 @@
1
1
  module Slack
2
2
  class Notifier
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
@@ -19,6 +19,24 @@ describe Slack::Notifier::LinkFormatter do
19
19
  expect( formatted ).to include("<http://example.com>")
20
20
  end
21
21
 
22
+ it "handles multiple html links" do
23
+ formatted = described_class.format("Hello World, enjoy <a href='http://example.com'>this</a><a href='http://example2.com'>this2</a>.")
24
+ expect( formatted ).to include("<http://example.com|this>")
25
+ expect( formatted ).to include("<http://example2.com|this2>")
26
+ end
27
+
28
+ it "handles multiple markdown links" do
29
+ formatted = described_class.format("Hello World, enjoy [this](http://example.com)[this2](http://example2.com).")
30
+ expect( formatted ).to include("<http://example.com|this>")
31
+ expect( formatted ).to include("<http://example2.com|this2>")
32
+ end
33
+
34
+ it "handles mixed html & markdown links" do
35
+ formatted = described_class.format("Hello World, enjoy [this](http://example.com)<a href='http://example2.com'>this2</a>.")
36
+ expect( formatted ).to include("<http://example.com|this>")
37
+ expect( formatted ).to include("<http://example2.com|this2>")
38
+ end
39
+
22
40
  end
23
41
 
24
42
  end
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: 0.6.0
4
+ version: 0.6.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: 2014-08-24 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: " A slim ruby wrapper for posting to slack webhooks "
14
14
  email: