html-pipeline 3.0.0.pre5 → 3.0.0.pre6

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: 76b152d297b41b59af64604d1e0b034734c3ce6f3de999b1e614de96f500ecab
4
- data.tar.gz: 5d06fbfb10d4390bec9b0c7efffadea4c0e7cf1aaf8ff4e57b23c4b2599bd928
3
+ metadata.gz: 06b43ddecf342ddc9817d1017c57a11cdb211089b6d067813e6da83fdee6a1a0
4
+ data.tar.gz: 889220f89a4818453caefd9878830a1ff451ecceb7ed6a2051e556c0bcd0fd2f
5
5
  SHA512:
6
- metadata.gz: b4e943345b5febc342cd26417419982be10d2bc1e393e5783c280e06333db6d0e74a92b7d3fc173e84139fa9bc34f534f8823518b2a54ce7911e2e3e94d8dd86
7
- data.tar.gz: 7f0fcf7e8821f86acd723a402b5911a3d667a09dd1013ae452a5494395f7535cc30a3bf1b5dca5aaac2c6bb54c103ad62d5ffdaf7f52c4ece182f553ddc810fd
6
+ metadata.gz: 430ef34d42cd91998e71aef5f247769c7c332bcb682541a0974c0ef1f2f019b7083b81d385fa77525fdce0efe583e0a8d9733ce076c3ef3edf79052a9d963233
7
+ data.tar.gz: 9eb94f3b775c1b13ac66044bb7da5f696cb9eb8684eda9f5a81a601d5d02ac3a1d5b376ca4addab733be480bb6252535e1e4e9ce33e028247a81ecb90b41cb9f
@@ -3,15 +3,25 @@ updates:
3
3
  - package-ecosystem: "github-actions"
4
4
  directory: "/"
5
5
  schedule:
6
- interval: daily
6
+ interval: weekly
7
+ day: monday
7
8
  time: "09:00"
8
9
  timezone: "Etc/UTC"
10
+ groups:
11
+ github-actions:
12
+ patterns:
13
+ - "*"
9
14
  open-pull-requests-limit: 10
10
15
 
11
- - package-ecosystem: "bundler"
16
+ - package-ecosystem: bundler
12
17
  directory: "/"
13
18
  schedule:
14
- interval: daily
19
+ interval: weekly
20
+ day: monday
15
21
  time: "09:00"
16
22
  timezone: "Etc/UTC"
17
23
  open-pull-requests-limit: 10
24
+ groups:
25
+ bundler-dependencies:
26
+ patterns:
27
+ - "*"
@@ -13,7 +13,7 @@ jobs:
13
13
  uses: yettoapp/actions/.github/workflows/ruby_gem_release.yml@main
14
14
  secrets:
15
15
  rubygems_api_key: ${{ secrets.RUBYGEMS_API_BOT_KEY }}
16
- gh_token: ${{ secrets.GITHUB_TOKEN }}
16
+ gh_token: ${{ secrets.PUBLIC_PUSH_TO_PROTECTED_BRANCH }}
17
17
  with:
18
18
  gem_name: html-pipeline
19
19
  version_filepath: lib/html_pipeline/version.rb
data/CHANGELOG.md CHANGED
@@ -1,12 +1,26 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/gjtorikian/html-pipeline/tree/HEAD)
3
+ ## [v3.0.0.pre5](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre5) (2023-06-05)
4
4
 
5
- [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre3...HEAD)
5
+ [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre4...v3.0.0.pre5)
6
+
7
+ ## [v3.0.0.pre4](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre4) (2023-06-05)
8
+
9
+ [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre3...v3.0.0.pre4)
6
10
 
7
11
  **Closed issues:**
8
12
 
13
+ - Suggestion: add more tags to the sanitization filter [\#378](https://github.com/gjtorikian/html-pipeline/issues/378)
14
+ - v3 gemoji, gemojione seem required - is there a way to not require at puma startup? [\#376](https://github.com/gjtorikian/html-pipeline/issues/376)
9
15
  - v3: Question regarding requiring a ConvertFilter if there are NodeFilters [\#374](https://github.com/gjtorikian/html-pipeline/issues/374)
16
+ - alt Attribute for Emoji Images Should Use Unicode [\#272](https://github.com/gjtorikian/html-pipeline/issues/272)
17
+
18
+ **Merged pull requests:**
19
+
20
+ - Update gemoji requirement from ~\> 3.0 to ~\> 4.1 [\#382](https://github.com/gjtorikian/html-pipeline/pull/382) ([dependabot[bot]](https://github.com/apps/dependabot))
21
+ - Update rouge requirement from ~\> 3.1 to ~\> 4.1 [\#381](https://github.com/gjtorikian/html-pipeline/pull/381) ([dependabot[bot]](https://github.com/apps/dependabot))
22
+ - Add the AssetProxyFilter [\#379](https://github.com/gjtorikian/html-pipeline/pull/379) ([digitalmoksha](https://github.com/digitalmoksha))
23
+ - Update selma requirement from ~\> 0.0.1 to \>= 0.0.1, \< 0.2.0 [\#377](https://github.com/gjtorikian/html-pipeline/pull/377) ([dependabot[bot]](https://github.com/apps/dependabot))
10
24
 
11
25
  ## [v3.0.0.pre3](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre3) (2023-02-15)
12
26
 
data/README.md CHANGED
@@ -79,7 +79,7 @@ end
79
79
 
80
80
  pipeline = HTMLPipeline.new(
81
81
  text_filters: [HelloJohnnyFilter.new]
82
- convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new),
82
+ convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new,
83
83
  # note: next line is not needed as sanitization occurs by default;
84
84
  # see below for more info
85
85
  sanitization_config: HTMLPipeline::SanitizationFilter::DEFAULT_CONFIG,
@@ -126,8 +126,8 @@ context = {
126
126
 
127
127
  # Pipeline used for user provided content on the web
128
128
  MarkdownPipeline = HTMLPipeline.new (
129
- text_filters: [HTMLPipeline::TextFilter::ImageMaxWidthFilter.new],
130
- convert_filter: [HTMLPipeline::ConvertFilter::MarkdownFilter.new],
129
+ text_filters: [HTMLPipeline::TextFilter::ImageFilter.new],
130
+ convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new,
131
131
  node_filters: [
132
132
  HTMLPipeline::NodeFilter::HttpsFilter.new,HTMLPipeline::NodeFilter::MentionFilter.new,
133
133
  ], context: context)
@@ -137,7 +137,7 @@ MarkdownPipeline = HTMLPipeline.new (
137
137
  HtmlEmailPipeline = HTMLPipeline.new(
138
138
  text_filters: [
139
139
  PlainTextInputFilter.new,
140
- ImageMaxWidthFilter.new
140
+ ImageFilter.new
141
141
  ], {})
142
142
  ```
143
143
 
@@ -173,7 +173,7 @@ pipeline = HTMLPipeline.new \
173
173
  text_filters: [
174
174
  HTMLPipeline::MarkdownFilter,
175
175
  ],
176
- convert_filter: [HTMLPipeline::ConvertFilter::MarkdownFilter.new],
176
+ convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new,
177
177
  sanitization_config: ALLOWLIST
178
178
 
179
179
  result = pipeline.call <<-CODE
@@ -201,7 +201,7 @@ pipeline = HTMLPipeline.new \
201
201
  text_filters: [
202
202
  HTMLPipeline::MarkdownFilter,
203
203
  ],
204
- convert_filter: [HTMLPipeline::ConvertFilter::MarkdownFilter.new],
204
+ convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new,
205
205
  sanitization_config: nil
206
206
  ```
207
207
 
@@ -267,6 +267,14 @@ gem "rouge"
267
267
 
268
268
  When developing a custom filter, call `HTMLPipeline.require_dependency` at the start to ensure that the local machine has the necessary dependency. You can also use `HTMLPipeline.require_dependencies` to provide a list of dependencies to check.
269
269
 
270
+ On a similar note, you must manually require whichever filters you desire:
271
+
272
+ ```ruby
273
+ require "html_pipeline" # must be included
274
+ require "html_pipeline/convert_filter/markdown_filter" # included because you want to use this filter
275
+ require "html_pipeline/node_filter/mention_filter" # included because you want to use this filter
276
+ ```
277
+
270
278
  ## Documentation
271
279
 
272
280
  Full reference documentation can be [found here](http://rubydoc.info/gems/html-pipeline/frames).
@@ -17,7 +17,7 @@ class HTMLPipeline
17
17
 
18
18
  # Build a regexp that matches all valid :emoji: names.
19
19
  def after_initialize
20
- @emoji_pattern ||= /:(#{emoji_names.map { |name| Regexp.escape(name) }.join('|')}):/
20
+ @emoji_pattern ||= /:(#{emoji_names.map { |name| Regexp.escape(name) }.join("|")}):/
21
21
  end
22
22
 
23
23
  def selector
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HTMLPipeline
4
- VERSION = "3.0.0.pre5"
4
+ VERSION = "3.0.0.pre6"
5
5
  end
data/lib/html_pipeline.rb CHANGED
@@ -2,10 +2,15 @@
2
2
 
3
3
  require "zeitwerk"
4
4
  lib_dir = File.join(File.dirname(__dir__), "lib")
5
+ lib_html_pipeline_dir = File.join(File.dirname(__dir__), "lib", "html_pipeline")
5
6
  gem_loader = Zeitwerk::Loader.for_gem
6
7
  gem_loader.inflector.inflect(
7
8
  "html_pipeline" => "HTMLPipeline",
8
9
  )
10
+
11
+ gem_loader.ignore(File.join(lib_html_pipeline_dir, "convert_filter"))
12
+ gem_loader.ignore(File.join(lib_html_pipeline_dir, "node_filter"))
13
+ gem_loader.ignore(File.join(lib_html_pipeline_dir, "text_filter"))
9
14
  gem_loader.ignore(File.join(lib_dir, "html-pipeline.rb"))
10
15
  gem_loader.setup
11
16
 
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.pre5
4
+ version: 3.0.0.pre6
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-06-05 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selma
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: 3.3.22
113
113
  requirements: []
114
- rubygems_version: 3.4.13
114
+ rubygems_version: 3.4.18
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Helpers for processing content through a chain of filters