html-pipeline 3.2.3 → 3.2.4

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: 4ee767ba855fbce40027a79f0a7847c5455354efe01293d07dd5dfc4cf0ee915
4
- data.tar.gz: 0210caf87e60730954c56005ef6cf372a1aad46b72f14554790799e9a3741ba3
3
+ metadata.gz: fd951d54c89f057036db67e4d74dbca0de8e5ca07f27a89979d3b7814ec67a38
4
+ data.tar.gz: ef06eacc4b6eab0f53d207d873eb02fb0b61c4f746a621f0ad1c4800b5292bce
5
5
  SHA512:
6
- metadata.gz: bcf817cc462caf0f082aac827c3959dba7aab1b988d072304c450415fdf763ee32d8e6974d95f856fa98bf1b2505115e9e75ee09b242fecb49db0d75dd7056a8
7
- data.tar.gz: f4ba81e5b1acba6a6e22b799a2ac802a0ae67822371b9d351ae2d3e033f7495e93e1f64495a280104768453b5c9ed26be5bd7007a2bb95fe077274ce8b2fa524
6
+ metadata.gz: 4dc2bf7b6c312ee045c31df9fb48d76303563fffbc863c3cb70a3c0caf96e8040ae6fb3ff99c9c1e7c7aa8dddeae7cafeb7cc287c54d1b920cea44731fe39878
7
+ data.tar.gz: 8d0f26c1474af8a306b35659d4f4a3633922484fcd4ce6e97c3d4804684b195b67fe58bf42cb2c1ff95e6486c13932633365d3326db6bc071f6cf2d55b45660b
@@ -1,6 +1,7 @@
1
1
  name: PR auto-{approve,merge}
2
2
 
3
3
  on:
4
+ workflow_dispatch:
4
5
  pull_request_target:
5
6
 
6
7
  permissions:
@@ -8,6 +9,8 @@ permissions:
8
9
  contents: write
9
10
 
10
11
  jobs:
11
- dependabot:
12
- uses: yettoapp/actions/.github/workflows/automerge_dependabot.yml@main
13
- secrets: inherit
12
+ bot-check:
13
+ uses: gjtorikian/actions/.github/workflows/automerge.yml@main
14
+ secrets:
15
+ gh_token: ${{ secrets.GITHUB_TOKEN }}
16
+
@@ -4,19 +4,11 @@ on:
4
4
  pull_request:
5
5
 
6
6
  permissions:
7
- contents: read
7
+ contents: write
8
+ pull-requests: write
8
9
 
9
10
  jobs:
10
11
  test:
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v4
15
-
16
- - name: Set up Ruby
17
- uses: yettoapp/actions/setup-languages@main
18
- with:
19
- ruby: true
20
-
21
- - name: Run tests
22
- run: bundle exec rake test
12
+ uses: gjtorikian/actions/.github/workflows/ruby_test_suite.yml@main
13
+ secrets:
14
+ gh_token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
1
- name: Linting
1
+ name: Lint
2
2
 
3
3
  on:
4
4
  pull_request:
@@ -6,18 +6,11 @@ on:
6
6
  - "**/*.rb"
7
7
 
8
8
  permissions:
9
- contents: read
9
+ contents: write
10
10
 
11
11
  jobs:
12
- test:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v4
12
+ lint:
13
+ uses: gjtorikian/actions/.github/workflows/ruby_lint.yml@main
14
+ secrets:
15
+ gh_token: ${{ secrets.GITHUB_TOKEN }}
16
16
 
17
- - name: Set up Ruby
18
- uses: yettoapp/actions/setup-languages@main
19
- with:
20
- ruby: true
21
-
22
- - name: Rubocop
23
- run: bundle exec rake rubocop
@@ -11,14 +11,20 @@ on:
11
11
  types:
12
12
  - closed
13
13
 
14
+ permissions:
15
+ pull-requests: write
16
+ contents: write
17
+ id-token: write
18
+ actions: write
19
+
14
20
  jobs:
15
21
  ruby:
16
- uses: yettoapp/actions/.github/workflows/ruby_gem_release.yml@main
22
+ uses: gjtorikian/actions/.github/workflows/ruby_gem_release.yml@main
17
23
  secrets:
18
- rubygems_api_key: ${{ secrets.RUBYGEMS_API_BOT_KEY }}
19
24
  gh_token: ${{ secrets.GITHUB_TOKEN }}
20
25
  with:
21
26
  gem_name: html-pipeline
22
27
  version_filepath: lib/html_pipeline/version.rb
23
28
  prepare: ${{ github.event_name == 'push' }}
24
29
  release: ${{ github.event_name == 'workflow_dispatch' || ((github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'release'))) }}
30
+ oidc_role_to_assume: rg_oidc_akr_h9dt72ax2bswgewowdv7
data/.gitignore CHANGED
@@ -17,4 +17,6 @@ test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
19
  exec/*
20
+
20
21
  vendor/cache/
22
+ vendor/bundle/
@@ -4,5 +4,8 @@
4
4
  },
5
5
  "[ruby]": {
6
6
  "editor.defaultFormatter": "Shopify.ruby-lsp"
7
+ },
8
+ "[github-actions-workflow]": {
9
+ "editor.defaultFormatter": "redhat.vscode-yaml"
7
10
  }
8
11
  }
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # [v3.2.4] - 06-01-2026
2
+ ## What's Changed
3
+ * [skip test] Release v3.2.3 by @github-actions[bot] in https://github.com/gjtorikian/html-pipeline/pull/419
4
+ * Bump actions/checkout from 4 to 5 in the github-actions group by @dependabot[bot] in https://github.com/gjtorikian/html-pipeline/pull/424
5
+ * Bump actions/checkout from 5 to 6 in the github-actions group by @dependabot[bot] in https://github.com/gjtorikian/html-pipeline/pull/426
6
+ * Support Ruby 4.0 by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/427
7
+ * Allow for completely nil sanitization by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/428
8
+
9
+
10
+ **Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v3.2.3...v3.2.4
11
+ # [v3.2.3] - 24-04-2025
12
+ ## What's Changed
13
+ * Allow for just text pipelines by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/418
14
+
15
+
16
+ **Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v3.2.2...v3.2.3
1
17
  # [v3.2.2] - 09-08-2024
2
18
  ## What's Changed
3
19
  * Add support for @ prefix on MentionFilter base_url by @jeremysmithco in https://github.com/gjtorikian/html-pipeline/pull/411
data/Gemfile CHANGED
@@ -25,12 +25,12 @@ group :development do
25
25
  end
26
26
 
27
27
  group :test do
28
- gem "commonmarker", "~> 2.0.1", require: false
28
+ gem "commonmarker", "~> 2.6", require: false
29
29
  gem "gemoji", "~> 4.1", require: false
30
30
  gem "gemojione", "~> 4.3", require: false
31
31
 
32
- gem "minitest"
33
-
32
+ gem "minitest", "~> 6.0"
33
+ gem "minitest-mock", "~> 5.27"
34
34
  gem "minitest-bisect", "~> 1.6"
35
35
 
36
36
  gem "nokogiri", "~> 1.13"
@@ -16,7 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.files = %x(git ls-files -z).split("\x0").reject { |f| f =~ %r{^(test|gemfiles|script)/} }
17
17
  gem.require_paths = ["lib"]
18
18
 
19
- gem.required_ruby_version = "~> 3.1"
19
+ gem.required_ruby_version = ">= 3.2"
20
+
20
21
  # https://github.com/rubygems/rubygems/pull/5852#issuecomment-1231118509
21
22
  gem.required_rubygems_version = ">= 3.3.22"
22
23
 
@@ -73,10 +73,10 @@ class HTMLPipeline
73
73
  default_img_attrs(name).transform_keys(&:to_sym)
74
74
  .merge!(context[:img_attrs] || {}).transform_keys(&:to_sym)
75
75
  .each_with_object([]) do |(attr, value), arr|
76
- next if value.nil?
76
+ next if value.nil?
77
77
 
78
- value = value.respond_to?(:call) && value.call(name) || value
79
- arr << %(#{attr}="#{value}")
78
+ value = value.respond_to?(:call) && value.call(name) || value
79
+ arr << %(#{attr}="#{value}")
80
80
  end.compact.join(" ")
81
81
 
82
82
  "<img #{html_attrs}>"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HTMLPipeline
4
- VERSION = "3.2.3"
4
+ VERSION = "3.2.4"
5
5
  end
data/lib/html_pipeline.rb CHANGED
@@ -195,6 +195,8 @@ class HTMLPipeline
195
195
  result:,
196
196
  })
197
197
  end
198
+ else
199
+ result[:output] = html
198
200
  end
199
201
 
200
202
  result = result.merge(@node_filters.collect(&:result).reduce({}, :merge))
@@ -272,7 +274,7 @@ class HTMLPipeline
272
274
  invalid_filters = filters.reject { |f| correctly_ancestored?(f, klass) }
273
275
 
274
276
  unless invalid_filters.empty?
275
- verb = invalid_filters.count == 1 ? "does" : "do"
277
+ verb = invalid_filters.one? ? "does" : "do"
276
278
  raise InvalidFilterError, "All filters must inherit from `#{klass}`; #{invalid_filters.join(", ")} #{verb} not"
277
279
  end
278
280
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-04-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: selma
@@ -24,7 +23,6 @@ dependencies:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0.4'
27
- force_ruby_platform: false
28
26
  - !ruby/object:Gem::Dependency
29
27
  name: zeitwerk
30
28
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +37,6 @@ dependencies:
39
37
  - - "~>"
40
38
  - !ruby/object:Gem::Version
41
39
  version: '2.5'
42
- force_ruby_platform: false
43
40
  description: HTML processing filters and utilities
44
41
  email:
45
42
  - gjtorikian@gmail.com
@@ -102,17 +99,16 @@ require_paths:
102
99
  - lib
103
100
  required_ruby_version: !ruby/object:Gem::Requirement
104
101
  requirements:
105
- - - "~>"
102
+ - - ">="
106
103
  - !ruby/object:Gem::Version
107
- version: '3.1'
104
+ version: '3.2'
108
105
  required_rubygems_version: !ruby/object:Gem::Requirement
109
106
  requirements:
110
107
  - - ">="
111
108
  - !ruby/object:Gem::Version
112
109
  version: 3.3.22
113
110
  requirements: []
114
- rubygems_version: 3.4.6
115
- signing_key:
111
+ rubygems_version: 4.0.3
116
112
  specification_version: 4
117
113
  summary: Helpers for processing content through a chain of filters
118
114
  test_files: []