html-pipeline 2.2.1 → 2.2.2

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: 0e72dc090d182972e34d1e85ce424fd21ff571dc
4
- data.tar.gz: 60ad946d8d793928e2971895e716447d5309ae77
3
+ metadata.gz: 16a48d98ee9c3474ccd93042fd1d6d30ecd3a885
4
+ data.tar.gz: c0b00a50d607e06a9b3b587649c27cd2dcabed2e
5
5
  SHA512:
6
- metadata.gz: 2a84d775b9d9333579e4fad0fc8e5446a7d9697464efced88470ae0c57c56d59d32ea5fac6fdc146d1f9efe41b878120a33c9a3b1160d4aec12155ab841db334
7
- data.tar.gz: 800a8751a239ba0ed1962b972ea620057e10b08c05d432b0d0634fa531976978ec7983dcf94304b4456fce741b260a4afe7fe91e2cc6b46c699129d6379d5aaf
6
+ metadata.gz: e8ff21a81b2fdad7d420923144d024a9c8d99f0623d4f5184ecc94a54f2261a9939ff2009bb774456f52a3c3462cee4971301bf3a7019cbaa815f4840d010850
7
+ data.tar.gz: 3e2b025fcd1a0c79f2dfe27f39260e1be59de9d45d099108ade7ca11c28d9b64ee36f3b349eda7c66111570faf6efbfd1091876ffc32df0f50460da1f5eef83f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.2.2
4
+
5
+ * Fix for calling mention_link_filter with only one argument [#230](https://github.com/jch/html-pipeline/pull/230)
6
+ * Add html-pipeline-linkify_github to 3rd Party Extensions in README [#228](https://github.com/jch/html-pipeline/pull/228)
7
+
3
8
  ## 2.2.1
4
9
 
5
10
  * Soften Nokogiri dependency to versions ">= 1.4" [#208](https://github.com/jch/html-pipeline/pull/208)
data/README.md CHANGED
@@ -248,6 +248,8 @@ Here are some extensions people have built:
248
248
  * [html-pipeline-youtube](https://github.com/st0012/html-pipeline-youtube) - An HTML::Pipeline filter for YouTube links
249
249
  * [html-pipeline-flickr](https://github.com/st0012/html-pipeline-flickr) - An HTML::Pipeline filter for Flickr links
250
250
  * [html-pipeline-vimeo](https://github.com/dlackty/html-pipeline-vimeo) - An HTML::Pipeline filter for Vimeo links
251
+ * [html-pipeline-hashtag](https://github.com/mr-dxdy/html-pipeline-hashtag) - An HTML::Pipeline filter for hashtags
252
+ * [html-pipeline-linkify_github](https://github.com/jollygoodcode/html-pipeline-linkify_github) - An HTML::Pipeline filter to autolink GitHub urls
251
253
 
252
254
  ## Instrumenting
253
255
 
@@ -103,7 +103,7 @@ module HTML
103
103
  #
104
104
  # Returns a string with @mentions replaced with links. All links have a
105
105
  # 'user-mention' class name attached for styling.
106
- def mention_link_filter(text, base_url='/', info_url=nil, username_pattern)
106
+ def mention_link_filter(text, base_url='/', info_url=nil, username_pattern=UsernamePattern)
107
107
  self.class.mentioned_logins_in(text, username_pattern) do |match, login, is_mentioned|
108
108
  link =
109
109
  if is_mentioned
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Pipeline
3
- VERSION = "2.2.1"
3
+ VERSION = "2.2.2"
4
4
  end
5
5
  end
@@ -203,4 +203,10 @@ class HTML::Pipeline::MentionFilterTest < Minitest::Test
203
203
  filter(doc.clone, '/', nil, /test/)
204
204
  assert_equal pattern_count + 1, HTML::Pipeline::MentionFilter::MentionPatterns.length
205
205
  end
206
+
207
+ def test_mention_link_filter
208
+ filter = HTML::Pipeline::MentionFilter.new nil
209
+ expected = "<a href='/hubot' class='user-mention'>@hubot</a>"
210
+ assert_equal expected, filter.mention_link_filter("@hubot")
211
+ end
206
212
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tomayko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-01 00:00:00.000000000 Z
12
+ date: 2015-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri