html-pipeline 2.7.0 → 2.7.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: bf9a25deddae9a797d4b623951638ceabe2e1088
4
- data.tar.gz: d43f0b6af9ba798fa8127f64b4b34fcb84f700be
3
+ metadata.gz: 51be736324dd52bf97242e77f261fbbd77f14922
4
+ data.tar.gz: d3e7b8b65e9c6856e86ea9d287d450b2ddce66ca
5
5
  SHA512:
6
- metadata.gz: 524dbe5ed8ea3fd4793479c48ff85f0c2149f9588fc3f8e0df72044ab82b99e9ce991de9997eea75224168a64f851504434374a288128dcef8033c607f539bb5
7
- data.tar.gz: 8a5c40010496e9ab411d9a6a9aec59b5830325e8e372dc95aba0bbbc0033765d54e2abb41e9ef811e23fd8be51d84db62d73aa9d9d26c1eb0adcc3d858145e3e
6
+ metadata.gz: 9a4a67b0002cf54ef1b4983af83682f2cbfb6ec65a7c95bcef5fe4e644798a61f10c61191fb9ae9dd09863c5e3a5a30e9bd65f3b1a7f5232cd777d9eedd7a1bd
7
+ data.tar.gz: 7ddab3f6d8b59870c12ca8a5cbc449fd9b58cec104897563375da29d43ed6e9301eba92fde400a54eded048ece4659ab093e3c9d50525cc1ea3ae8e50616a770
data/.gitignore CHANGED
@@ -4,6 +4,7 @@
4
4
  .config
5
5
  .yardoc
6
6
  Gemfile.lock
7
+ gemfiles/*.lock
7
8
  InstalledFiles
8
9
  _yardoc
9
10
  coverage
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
+ bundler_args: --path ../../vendor/bundle
4
5
 
5
6
  addons:
6
7
  apt:
@@ -14,7 +14,7 @@
14
14
 
15
15
  ## 2.4.1
16
16
 
17
- * Regression in EmailReplyPipeline: unfiltered content is being ommitted [#253](https://github.com/jch/html-pipeline/pull/253)
17
+ * Regression in EmailReplyPipeline: unfiltered content is being omitted [#253](https://github.com/jch/html-pipeline/pull/253)
18
18
 
19
19
  ## 2.4.0
20
20
 
@@ -44,6 +44,12 @@ module HTML
44
44
  autoload :TextFilter, 'html/pipeline/text_filter'
45
45
 
46
46
  class MissingDependencyError < LoadError; end
47
+ def self.require_dependency(name, requirer)
48
+ require name
49
+ rescue LoadError => e
50
+ raise MissingDependencyError,
51
+ "Missing dependency '#{name}' for #{requirer}. See README.md for details.\n#{e.class.name}: #{e}"
52
+ end
47
53
 
48
54
  # Our DOM implementation.
49
55
  DocumentFragment = Nokogiri::HTML::DocumentFragment
@@ -1,8 +1,4 @@
1
- begin
2
- require "rinku"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'rinku' for AutolinkFilter. See README.md for details."
5
- end
1
+ HTML::Pipeline.require_dependency("rinku", "AutolinkFilter")
6
2
 
7
3
  module HTML
8
4
  class Pipeline
@@ -1,14 +1,5 @@
1
- begin
2
- require "escape_utils"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'escape_utils' for EmailReplyFilter. See README.md for details."
5
- end
6
-
7
- begin
8
- require "email_reply_parser"
9
- rescue LoadError => _
10
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'email_reply_parser' for EmailReplyFilter. See README.md for details."
11
- end
1
+ HTML::Pipeline.require_dependency("escape_utils", "EmailReplyFilter")
2
+ HTML::Pipeline.require_dependency("email_reply_parser", "EmailReplyFilter")
12
3
 
13
4
  module HTML
14
5
  class Pipeline
@@ -1,10 +1,5 @@
1
1
  require "cgi"
2
-
3
- begin
4
- require "gemoji"
5
- rescue LoadError => _
6
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'gemoji' for EmojiFilter. See README.md for details."
7
- end
2
+ HTML::Pipeline.require_dependency("gemoji", "EmojiFilter")
8
3
 
9
4
  module HTML
10
5
  class Pipeline
@@ -1,8 +1,4 @@
1
- begin
2
- require "commonmarker"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'commonmarker' for MarkdownFilter. See README.md for details."
5
- end
1
+ HTML::Pipeline.require_dependency("commonmarker", "MarkdownFilter")
6
2
 
7
3
  module HTML
8
4
  class Pipeline
@@ -1,8 +1,4 @@
1
- begin
2
- require "escape_utils"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'escape_utils' for PlainTextInputFilter. See README.md for details."
5
- end
1
+ HTML::Pipeline.require_dependency("escape_utils", "PlainTextInputFilter")
6
2
 
7
3
  module HTML
8
4
  class Pipeline
@@ -1,8 +1,4 @@
1
- begin
2
- require "sanitize"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'sanitize' for SanitizationFilter. See README.md for details."
5
- end
1
+ HTML::Pipeline.require_dependency("sanitize", "SanitizationFilter")
6
2
 
7
3
  module HTML
8
4
  class Pipeline
@@ -1,8 +1,4 @@
1
- begin
2
- require "linguist"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'github-linguist' for SyntaxHighlightFilter. See README.md for details."
5
- end
1
+ HTML::Pipeline.require_dependency("linguist", "SyntaxHighlightFilter")
6
2
 
7
3
  module HTML
8
4
  class Pipeline
@@ -1,8 +1,4 @@
1
- begin
2
- require "redcloth"
3
- rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'RedCloth' for TextileFilter. See README.md for details."
5
- end
1
+ HTML::Pipeline.require_dependency("redcloth", "RedCloth")
6
2
 
7
3
  module HTML
8
4
  class Pipeline
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Pipeline
3
- VERSION = "2.7.0"
3
+ VERSION = "2.7.1"
4
4
  end
5
5
  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.7.0
4
+ version: 2.7.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: 2017-08-16 00:00:00.000000000 Z
12
+ date: 2017-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri