html-pipeline 3.0.0.pre2 → 3.0.0.pre3

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
  SHA256:
3
- metadata.gz: 786f70829bb579116d522e399faeb85c5e47354255015a7ad4f302d062151c18
4
- data.tar.gz: d8dfaeb90583a9644c9a1d31447122953ca34f6225e9720fb8d83cc7c7848faa
3
+ metadata.gz: 613a099c0290d87932d2bbaf78052d8c472518bb911d82fe651ad78a3cc32ee9
4
+ data.tar.gz: d03826dc83afb689e87395d3a365a24fd5b3608e3a29b632a79a5928acb84a2b
5
5
  SHA512:
6
- metadata.gz: 0b04a86725107c550b252af0dee5b6647f7cce1db0ccd3349eae1b867e1b10910a256006457e8be4dab66e8e01dd7c891e7736b0c4e5294751fab45b0ed58a37
7
- data.tar.gz: 468721f150845e39d69942259f02e0ff79e35730678c080ac9470ed92ae24e0b917bb14ba5bda82565e052f47057c0d1d3703069faaa9a0e319c939e27260751
6
+ metadata.gz: 35ce289f0ca10929fba016a5dd0d7c0a6bf0d8f8d4390385590c0937190df67605b96b474a477a54feb5192a54fc5b299940d264483700a9c5deac04cff1b9e1
7
+ data.tar.gz: dbddce89afcb5f0291d28c9b24b4a2e4f25ea847d8960dc06a11f0c6cfd6cf2feb169f406fd69ca5f25a3eabc4338ce0cf7f2b94fa2147c682135bb6dee70728
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/gjtorikian/html-pipeline/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre3...HEAD)
6
+
7
+ **Closed issues:**
8
+
9
+ - v3: Question regarding requiring a ConvertFilter if there are NodeFilters [\#374](https://github.com/gjtorikian/html-pipeline/issues/374)
10
+
11
+ ## [v3.0.0.pre3](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre3) (2023-02-15)
12
+
13
+ [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre2...v3.0.0.pre3)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - req convert\_filter if `text/node`filter present [\#375](https://github.com/gjtorikian/html-pipeline/pull/375) ([gjtorikian](https://github.com/gjtorikian))
18
+
3
19
  ## [v3.0.0.pre2](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre2) (2023-01-26)
4
20
 
5
21
  [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre1...v3.0.0.pre2)
@@ -80,7 +80,7 @@ class HTMLPipeline
80
80
  def needs(*keys)
81
81
  missing = keys.reject { |key| context.include?(key) }
82
82
 
83
- return unless missing.any?
83
+ return if missing.none?
84
84
 
85
85
  raise ArgumentError,
86
86
  "Missing context keys for #{self.class.name}: #{missing.map(&:inspect).join(", ")}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HTMLPipeline
4
- VERSION = "3.0.0.pre2"
4
+ VERSION = "3.0.0.pre3"
5
5
  end
data/lib/html_pipeline.rb CHANGED
@@ -116,8 +116,9 @@ end
116
116
  validate_filters(@node_filters, HTMLPipeline::NodeFilter)
117
117
 
118
118
  @convert_filter = convert_filter
119
- if @convert_filter.nil? && !@node_filters.empty?
120
- raise InvalidFilterError, "Must provide `convert_filter` if `node_filter`s is also provided"
119
+
120
+ if @convert_filter.nil? && (!@text_filters.empty? && !@node_filters.empty?)
121
+ raise InvalidFilterError, "Must provide `convert_filter` if `text_filters` and `node_filters` are also provided"
121
122
  elsif !@convert_filter.nil?
122
123
  validate_filter(@convert_filter, HTMLPipeline::ConvertFilter)
123
124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre2
4
+ version: 3.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-26 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selma