html-pipeline 3.0.0.pre5 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76b152d297b41b59af64604d1e0b034734c3ce6f3de999b1e614de96f500ecab
4
- data.tar.gz: 5d06fbfb10d4390bec9b0c7efffadea4c0e7cf1aaf8ff4e57b23c4b2599bd928
3
+ metadata.gz: 248d46dd59af87c501118e123ac1ffa5e16447942ca892a9b4985e0fa43c6548
4
+ data.tar.gz: 48a75cb97c189f4da648df25121e96efd4a9a278081c6ddd75c129c86f4fcbdd
5
5
  SHA512:
6
- metadata.gz: b4e943345b5febc342cd26417419982be10d2bc1e393e5783c280e06333db6d0e74a92b7d3fc173e84139fa9bc34f534f8823518b2a54ce7911e2e3e94d8dd86
7
- data.tar.gz: 7f0fcf7e8821f86acd723a402b5911a3d667a09dd1013ae452a5494395f7535cc30a3bf1b5dca5aaac2c6bb54c103ad62d5ffdaf7f52c4ece182f553ddc810fd
6
+ metadata.gz: f2fb4d1b8097e9c0af8eb9621701484a5701a12183fcabe13729f19f42f4648bfebf4d76830c90611d734ff5d9d93b5253f8a269b011cac0b5c38aa7e48bfffc
7
+ data.tar.gz: e0721ac24b36925bf40b63fbae758f7c649b36c501bcb0769219551500f586d2c3643922be3588aaf65e6393dd064bf382a64ade7f31cebba3d7a2a58b6c92bc
@@ -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
+ - "*"
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v3
14
+ - uses: actions/checkout@v4
15
15
 
16
16
  - name: Set up Ruby
17
17
  uses: yettoapp/actions/setup-languages@main
@@ -12,7 +12,7 @@ jobs:
12
12
  test:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
- - uses: actions/checkout@v3
15
+ - uses: actions/checkout@v4
16
16
 
17
17
  - name: Set up Ruby
18
18
  uses: yettoapp/actions/setup-languages@main
@@ -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,28 @@
1
+ ## [v3.0.0.pre6] - 16-08-2023
2
+ null
1
3
  # Changelog
2
4
 
3
- ## [Unreleased](https://github.com/gjtorikian/html-pipeline/tree/HEAD)
5
+ ## [v3.0.0.pre5](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre5) (2023-06-05)
4
6
 
5
- [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre3...HEAD)
7
+ [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre4...v3.0.0.pre5)
8
+
9
+ ## [v3.0.0.pre4](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre4) (2023-06-05)
10
+
11
+ [Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v3.0.0.pre3...v3.0.0.pre4)
6
12
 
7
13
  **Closed issues:**
8
14
 
15
+ - Suggestion: add more tags to the sanitization filter [\#378](https://github.com/gjtorikian/html-pipeline/issues/378)
16
+ - 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
17
  - v3: Question regarding requiring a ConvertFilter if there are NodeFilters [\#374](https://github.com/gjtorikian/html-pipeline/issues/374)
18
+ - alt Attribute for Emoji Images Should Use Unicode [\#272](https://github.com/gjtorikian/html-pipeline/issues/272)
19
+
20
+ **Merged pull requests:**
21
+
22
+ - 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))
23
+ - 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))
24
+ - Add the AssetProxyFilter [\#379](https://github.com/gjtorikian/html-pipeline/pull/379) ([digitalmoksha](https://github.com/digitalmoksha))
25
+ - 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
26
 
11
27
  ## [v3.0.0.pre3](https://github.com/gjtorikian/html-pipeline/tree/v3.0.0.pre3) (2023-02-15)
12
28
 
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"
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
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-12-24 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.5.3
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Helpers for processing content through a chain of filters