roadie 5.1.0 → 5.2.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: 39c01590157057fcedad04740a1594a45f18150d74c7e8fe071dd3aea6908e1f
4
- data.tar.gz: 490cc578b42057ca635ce613d8e50b05401b0a07597761f70423467aa99aa673
3
+ metadata.gz: d61e03043b7a3086eeccdb7ca1e804ca3eebb5b6dabcc96d09bd5a7daa06b845
4
+ data.tar.gz: d48918c67a5fe53b88e1b2607269fdf353457e8829cc7dba84bdab3f308426d3
5
5
  SHA512:
6
- metadata.gz: d71f85f1aba91c711351972b65074835f690f62d0cd4a0feb663f67df89a86d8acddc855fe7be4e23601fe3b0508c1558f6c18cc260c69c1ad5b1b1857ad04e2
7
- data.tar.gz: 1d708c10a62800d44efbe825601546a8713b953f81a2549d91a23e74e26048839adc418d38c38bbd08bd885bc6504a3a07c5cca46f94d3ad147d347f3086ffaa
6
+ metadata.gz: 7e646c9a1864e7eb00fef92649583203721b551194ae9c5dd8f979200f8fae06f84b0298252dc3f851585f45047a66ae8f10c417dcdda776046cfc5c59267c0a
7
+ data.tar.gz: 0f01356119714952a4715ae0db43b96dc964168572943e7a9837cdbadadf493db56440484a6d6564fcccec6cbbc125076bf1cade4e588674ad9802dd7120d5a0
@@ -15,11 +15,11 @@ jobs:
15
15
  strategy:
16
16
  fail-fast: false
17
17
  matrix:
18
- ruby: ["2.6", "2.7", "3.0", "3.1"]
18
+ ruby: ["2.7", "3.0", "3.1", "3.2"]
19
19
 
20
20
  steps:
21
21
  - name: Checkout code
22
- uses: actions/checkout@v2
22
+ uses: actions/checkout@v3
23
23
 
24
24
  # This setup is not compatible with the way Travis CI was
25
25
  # setup, so the cache will only work for the root folder.
@@ -34,13 +34,19 @@ jobs:
34
34
 
35
35
  - uses: codecov/codecov-action@v2
36
36
 
37
- lint:
38
- runs-on: ubuntu-latest
39
- steps:
40
- - name: standardrb
41
- env:
42
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43
- uses: amoeba/standardrb-action@v2
44
- permissions:
45
- checks: write
46
- contents: read
37
+ # Does not work. The action runs in Ruby 2.6, which is not compatible with
38
+ # the gem and fails to install.
39
+ # This is very strange considering that the source of the action uses a
40
+ # Dockerfile with Ruby 2.7. However, I don't want to spend time to fix this
41
+ # in a passively maintained gem.
42
+ #
43
+ # lint:
44
+ # runs-on: ubuntu-latest
45
+ # steps:
46
+ # - name: standardrb
47
+ # env:
48
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
+ # uses: amoeba/standardrb-action@v2
50
+ # permissions:
51
+ # checks: write
52
+ # contents: read
data/.rubocop.yml CHANGED
@@ -1,5 +1,9 @@
1
- AllCops:
2
- DisabledByDefault: true
1
+ require:
2
+ - standard
3
+
4
+ inherit_gem:
5
+ standard: config/base.yml
3
6
 
4
- Style/FrozenStringLiteralComment:
5
- Enabled: true
7
+ AllCops:
8
+ SuggestExtensions: false
9
+ TargetRubyVersion: 2.7
data/.solargraph.yml CHANGED
@@ -8,9 +8,5 @@ exclude:
8
8
  - ".bundle/**/*"
9
9
  require: []
10
10
  domains: []
11
- plugins:
12
- - solargraph-standardrb
13
- reporters:
14
- - standardrb
15
11
  require_paths: []
16
12
  max_files: 5000
data/.standard.yml ADDED
@@ -0,0 +1 @@
1
+ ruby_version: 2.7
data/Changelog.md CHANGED
@@ -1,6 +1,14 @@
1
1
  ### dev
2
2
 
3
- [full changelog](https://github.com/Mange/roadie/compare/v5.1.0...master)
3
+ [full changelog](https://github.com/Mange/roadie/compare/v5.2.0...master)
4
+
5
+ ### 5.2.0
6
+
7
+ [full changelog](https://github.com/Mange/roadie/compare/v5.1.0...v5.2.0)
8
+
9
+ * Upgrade to Nokogiri `~>` 1.15.
10
+ * Drop support for Ruby 2.6.
11
+ * Add official support for Ruby 3.2.
4
12
 
5
13
  ### 5.1.0
6
14
 
data/Gemfile CHANGED
@@ -8,3 +8,4 @@ gem "codecov", group: :test, require: false
8
8
  # Not actually required to run the tests for the gem, but a real convenience
9
9
  # for local development.
10
10
  gem "standard", group: [:test, :development], require: false
11
+ gem "solargraph", group: [:test, :development], require: false
data/README.md CHANGED
@@ -54,7 +54,7 @@ Install & Usage
54
54
  [Add this gem to your Gemfile as recommended by Rubygems](http://rubygems.org/gems/roadie) and run `bundle install`.
55
55
 
56
56
  ```ruby
57
- gem 'roadie', '~> 4.0'
57
+ gem 'roadie', '~> 5.2'
58
58
  ```
59
59
 
60
60
  You can then create a new instance of a Roadie document:
@@ -450,10 +450,10 @@ Build Status
450
450
 
451
451
  Tested with Github CI using:
452
452
 
453
- * MRI 2.6
454
453
  * MRI 2.7
455
454
  * MRI 3.0
456
455
  * MRI 3.1
456
+ * MRI 3.2
457
457
 
458
458
  Let me know if you want any other runtime supported officially.
459
459
 
@@ -8,6 +8,7 @@ module Roadie
8
8
  # should take place.
9
9
  class NullUrlRewriter
10
10
  def initialize(generator = nil)
11
+ # Intentionally left blank.
11
12
  end
12
13
 
13
14
  def transform_dom(dom)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Roadie
4
- VERSION = "5.1.0"
4
+ VERSION = "5.2.0"
5
5
  end
data/roadie.gemspec CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
15
15
  s.description = "Roadie tries to make sending HTML emails a little less painful by inlining stylesheets and rewriting relative URLs for you."
16
16
  s.license = "MIT"
17
17
 
18
- s.required_ruby_version = ">= 2.6"
18
+ s.required_ruby_version = ">= 2.7"
19
19
 
20
- s.add_dependency "nokogiri", "~> 1.8"
20
+ s.add_dependency "nokogiri", "~> 1.15"
21
21
  s.add_dependency "css_parser", "~> 1.4"
22
22
 
23
23
  s.add_development_dependency "rake"
@@ -29,5 +29,4 @@ Gem::Specification.new do |s|
29
29
  s.require_paths = %w[lib]
30
30
 
31
31
  s.files = `git ls-files`.split("\n")
32
- s.test_files = `git ls-files -- spec/*`.split("\n")
33
32
  end
@@ -251,8 +251,7 @@ describe "Roadie functionality" do
251
251
  result = parse_html document.transform
252
252
 
253
253
  expect(result.at_css("a.one")["href"]).to eq("https://myapp.com/rails/app/about_us")
254
- # Nokogiri still treats the attribute as an URL and escapes it.
255
- expect(result.at_css("a.two")["href"]).to eq("%24UNSUBSCRIBE_URL")
254
+ expect(result.at_css("a.two")["href"]).to eq("$UNSUBSCRIBE_URL")
256
255
 
257
256
  expect(result).to have_styling("color" => "green").at_selector("a.one")
258
257
  expect(result).to have_styling("color" => "green").at_selector("a.two")
@@ -39,7 +39,7 @@ module Roadie
39
39
  context "when one of media queries includes feature condition" do
40
40
  it "returns false" do
41
41
  selector = double "Selector", inlinable?: "maybe"
42
- expect(StyleBlock.new(selector, [], [:all, :'screen (min-width: 300px)']).inlinable?).to be(false)
42
+ expect(StyleBlock.new(selector, [], [:all, :"screen (min-width: 300px)"]).inlinable?).to be(false)
43
43
  end
44
44
  end
45
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roadie
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Bergmark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-19 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '1.15'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '1.15'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: css_parser
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -104,11 +104,11 @@ extra_rdoc_files:
104
104
  - README.md
105
105
  - Changelog.md
106
106
  files:
107
- - ".autotest"
108
107
  - ".github/workflows/main.yml"
109
108
  - ".gitignore"
110
109
  - ".rubocop.yml"
111
110
  - ".solargraph.yml"
111
+ - ".standard.yml"
112
112
  - ".yardopts"
113
113
  - Changelog.md
114
114
  - Gemfile
@@ -190,50 +190,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: '2.6'
193
+ version: '2.7'
194
194
  required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - ">="
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  requirements: []
200
- rubygems_version: 3.3.7
200
+ rubygems_version: 3.4.17
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Making HTML emails comfortable for the Ruby rockstars
204
- test_files:
205
- - spec/fixtures/big_em.css
206
- - spec/fixtures/stylesheets/green.css
207
- - spec/hash_as_cache_store_spec.rb
208
- - spec/integration_spec.rb
209
- - spec/lib/roadie/asset_scanner_spec.rb
210
- - spec/lib/roadie/cached_provider_spec.rb
211
- - spec/lib/roadie/css_not_found_spec.rb
212
- - spec/lib/roadie/deduplicator_spec.rb
213
- - spec/lib/roadie/document_spec.rb
214
- - spec/lib/roadie/filesystem_provider_spec.rb
215
- - spec/lib/roadie/inliner_spec.rb
216
- - spec/lib/roadie/markup_improver_spec.rb
217
- - spec/lib/roadie/net_http_provider_spec.rb
218
- - spec/lib/roadie/null_provider_spec.rb
219
- - spec/lib/roadie/null_url_rewriter_spec.rb
220
- - spec/lib/roadie/path_rewriter_provider_spec.rb
221
- - spec/lib/roadie/provider_list_spec.rb
222
- - spec/lib/roadie/selector_spec.rb
223
- - spec/lib/roadie/style_attribute_builder_spec.rb
224
- - spec/lib/roadie/style_block_spec.rb
225
- - spec/lib/roadie/style_property_spec.rb
226
- - spec/lib/roadie/stylesheet_spec.rb
227
- - spec/lib/roadie/test_provider_spec.rb
228
- - spec/lib/roadie/url_generator_spec.rb
229
- - spec/lib/roadie/url_rewriter_spec.rb
230
- - spec/lib/roadie/utils_spec.rb
231
- - spec/shared_examples/asset_provider.rb
232
- - spec/shared_examples/url_rewriter.rb
233
- - spec/spec_helper.rb
234
- - spec/support/have_attribute_matcher.rb
235
- - spec/support/have_node_matcher.rb
236
- - spec/support/have_selector_matcher.rb
237
- - spec/support/have_styling_matcher.rb
238
- - spec/support/have_xpath_matcher.rb
239
- - spec/support/test_provider.rb
204
+ test_files: []
data/.autotest DELETED
@@ -1,10 +0,0 @@
1
- # Override autotest default magic to rerun all tests every time a
2
- # change is detected on the file system.
3
- class Autotest
4
- def get_to_green
5
- begin
6
- rerun_all_tests
7
- wait_for_changes unless all_good
8
- end until all_good
9
- end
10
- end