html-pipeline 2.4.0 → 2.4.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: ed15fa4f3c355b07e08e89afa43a22255c991707
4
- data.tar.gz: 0ae30d5bb58a6e147cabe6c4544d91924baa57ce
3
+ metadata.gz: 35aa83bb8902a72b012f930cafe924e7177a6d80
4
+ data.tar.gz: 808e09472fdeaf1cf294bf4715e6754b38b0157b
5
5
  SHA512:
6
- metadata.gz: 9e288b4a1bacea79b17470dbbc5c87c681df180f32c944082670830a9c9fe61790c2e6e86ff0867e4398de10b7968d6bfe17e073261eb62dd1878b02dba7dbe9
7
- data.tar.gz: 22009dc61f3647e40a23bff646020dfae75fc9acc1aee68d24d29abf23045365c630b8f95a90b0a71daa3656379ba6ac35e9bb76963ad9ac900cb2080b46ad36
6
+ metadata.gz: 214b479a825e9b5199e2e0c38a3d73519c56df8950786f12b2c5a35107081ffdec9a3fedcdbe1903428e276bfb2b893f353462e0acdf116f7fb2bfb53dd7c4bd
7
+ data.tar.gz: b0868ef474821065d9f4feb9c3769e66ccded085435931f2cbcdb03ddf66f42a4b469f60f8cd5719580f368a9d04316780581a157d481eca0a1d60dd0af51e35
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.4.1
4
+
5
+ * Regression in EmailReplyPipeline: unfiltered content is being ommitted [#253](https://github.com/jch/html-pipeline/pull/253)
6
+
3
7
  ## 2.4.0
4
8
 
5
9
  * Optionally filter email addresses [#247](https://github.com/jch/html-pipeline/pull/247)
data/README.md CHANGED
@@ -250,6 +250,9 @@ Here are some extensions people have built:
250
250
  * [html-pipeline-vimeo](https://github.com/dlackty/html-pipeline-vimeo) - An HTML::Pipeline filter for Vimeo links
251
251
  * [html-pipeline-hashtag](https://github.com/mr-dxdy/html-pipeline-hashtag) - An HTML::Pipeline filter for hashtags
252
252
  * [html-pipeline-linkify_github](https://github.com/jollygoodcode/html-pipeline-linkify_github) - An HTML::Pipeline filter to autolink GitHub urls
253
+ * [html-pipeline-redcarpet_filter](https://github.com/bmikol/html-pipeline-redcarpet_filter) - Render Markdown source text into Markdown HTML using Redcarpet
254
+ * [html-pipeline-typogruby_filter](https://github.com/bmikol/html-pipeline-typogruby_filter) - Add Typogruby text filters to your HTML::Pipeline
255
+
253
256
 
254
257
  ## Instrumenting
255
258
 
@@ -49,7 +49,7 @@ module HTML
49
49
  if fragment.quoted?
50
50
  if context[:hide_quoted_email_addresses]
51
51
  pieces.map! do |piece|
52
- piece.gsub!(EMAIL_REGEX, HIDDEN_EMAIL_PATTERN)
52
+ piece.gsub(EMAIL_REGEX, HIDDEN_EMAIL_PATTERN)
53
53
  end
54
54
  end
55
55
  pieces.unshift EMAIL_QUOTED_HEADER
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Pipeline
3
- VERSION = "2.4.0"
3
+ VERSION = "2.4.1"
4
4
  end
5
5
  end
@@ -29,4 +29,38 @@ EMAIL
29
29
  refute_match %r(boatymcboatface@example.com), doc
30
30
  refute_match %r(alreadyleaked@example.com), doc
31
31
  end
32
+
33
+ def test_preserves_non_email_content_while_filtering
34
+ str = <<-EMAIL
35
+ > Thank you! I have some thoughts on this pull request.
36
+ >
37
+ > * acme provides cmake and a wrapper for it. Please use '$(TARGET)-cmake' instead of cmake -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' -DCMAKE_BUILD_TYPE=Release.
38
+
39
+ Okay -- I'm afraid I just blindly copied the eigen3.mk file, since that's a library I'm familiar with :-)
40
+
41
+ > * Do you need -DCMAKE_SYSTEM_PROCESSOR=x86?
42
+
43
+ Yes, this is a bit dumb, but vc checks for that (or amd) to determine that it's not being built on ARM.
44
+
45
+ --
46
+ Boaty McBoatface | http://example.org
47
+ EMAIL
48
+
49
+ filter = EmailReplyFilter.new(str, :hide_quoted_email_addresses => true)
50
+ doc = filter.call.to_s
51
+
52
+ expected = <<-EXPECTED
53
+ <div class="email-quoted-reply"> Thank you! I have some thoughts on this pull request.
54
+
55
+ * acme provides cmake and a wrapper for it. Please use &#39;$(TARGET)-cmake&#39; instead of cmake -DCMAKE_TOOLCHAIN_FILE=&#39;$(CMAKE_TOOLCHAIN_FILE)&#39; -DCMAKE_BUILD_TYPE=Release.</div>
56
+ <div class="email-fragment">Okay -- I&#39;m afraid I just blindly copied the eigen3.mk file, since that&#39;s a library I&#39;m familiar with :-)</div>
57
+ <div class="email-quoted-reply"> * Do you need -DCMAKE_SYSTEM_PROCESSOR=x86?</div>
58
+ <div class="email-fragment">Yes, this is a bit dumb, but vc checks for that (or amd) to determine that it&#39;s not being built on ARM.</div>
59
+ <span class="email-hidden-toggle"><a href="#">&hellip;</a></span><div class="email-hidden-reply" style="display:none"><div class="email-signature-reply">--
60
+ Boaty McBoatface | http:&#47;&#47;example.org</div>
61
+ </div>
62
+ EXPECTED
63
+
64
+ assert_equal(expected.chomp, doc)
65
+ end
32
66
  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.4.0
4
+ version: 2.4.1
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: 2016-04-11 00:00:00.000000000 Z
12
+ date: 2016-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri