Skip to content

Commit

Permalink
Bump nokogiri-html5-inference to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Apr 30, 2024
1 parent 6d8cefc commit b49b864
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PATH
activesupport (>= 5.2, < 8)
cable_ready (~> 5.0)
nokogiri (~> 1.0)
nokogiri-html5-inference
nokogiri-html5-inference (~> 0.2)
rack (>= 2, < 4)
railties (>= 5.2, < 8)
redis (>= 4.0, < 6.0)
Expand Down Expand Up @@ -128,7 +128,7 @@ GEM
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
nokogiri-html5-inference (0.1.1)
nokogiri-html5-inference (0.2.0)
nokogiri (~> 1.14)
parallel (1.22.1)
parser (3.2.1.0)
Expand Down
2 changes: 1 addition & 1 deletion stimulus_reflex.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Gem::Specification.new do |gem|
gem.add_dependency "nokogiri", "~> 1.0"
gem.add_dependency "rack", ">= 2", "< 4"
gem.add_dependency "redis", ">= 4.0", "< 6.0"
gem.add_dependency "nokogiri-html5-inference"
gem.add_dependency "nokogiri-html5-inference", "~> 0.2"

gem.add_development_dependency "bundler", "~> 2.0"
gem.add_development_dependency "magic_frozen_string_literal", "~> 1.2"
Expand Down
20 changes: 10 additions & 10 deletions test/html/document_fragment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ class StimulusReflex::HTML::DocumentFragmentTest < ActiveSupport::TestCase
)
fragment = StimulusReflex::HTML::DocumentFragment.new(html)

assert_equal %(<head></head> <body></body>), fragment.to_html.squish
assert_equal %(<head></head> <body></body>), fragment.outer_html.squish
assert_equal %(<head></head><body> </body>), fragment.to_html.squish
assert_equal %(<head></head><body> </body>), fragment.outer_html.squish
end

test "<head> alongside <body> with content" do
Expand All @@ -361,8 +361,8 @@ class StimulusReflex::HTML::DocumentFragmentTest < ActiveSupport::TestCase
)
fragment = StimulusReflex::HTML::DocumentFragment.new(html)

assert_equal %(<head> <meta name="attribute" content="value"> </head> <body class="bg-green-200"> <h1>Hello World</h1> </body>), fragment.to_html.squish
assert_equal %(<head> <meta name="attribute" content="value"> </head> <body class="bg-green-200"> <h1>Hello World</h1> </body>), fragment.outer_html.squish
assert_equal %(<head> <meta name="attribute" content="value"> </head><body class="bg-green-200"> <h1>Hello World</h1> </body>), fragment.to_html.squish
assert_equal %(<head> <meta name="attribute" content="value"> </head><body class="bg-green-200"> <h1>Hello World</h1> </body>), fragment.outer_html.squish
end

test "<head> alongside <body> inside <html>" do
Expand Down Expand Up @@ -432,8 +432,8 @@ class StimulusReflex::HTML::DocumentFragmentTest < ActiveSupport::TestCase
)
fragment = StimulusReflex::HTML::DocumentFragment.new(html)

assert_equal %(<head> <title>Title</title> </head>), fragment.to_html.squish
assert_equal %(<head> <title>Title</title> </head>), fragment.outer_html.squish
assert_equal %(<head> <title>Title</title> </head><body></body>), fragment.to_html.squish
assert_equal %(<head> <title>Title</title> </head><body></body>), fragment.outer_html.squish
end

test "non-closed <meta>" do
Expand Down Expand Up @@ -464,8 +464,8 @@ class StimulusReflex::HTML::DocumentFragmentTest < ActiveSupport::TestCase
)
fragment = StimulusReflex::HTML::DocumentFragment.new(html)

assert_equal %(<head> <meta name="title" content="value"> </head>), fragment.to_html.squish
assert_equal %(<head> <meta name="title" content="value"> </head>), fragment.outer_html.squish
assert_equal %(<head> <meta name="title" content="value"> </head><body></body>), fragment.to_html.squish
assert_equal %(<head> <meta name="title" content="value"> </head><body></body>), fragment.outer_html.squish
end

test "closed <meta> in <head>" do
Expand All @@ -476,8 +476,8 @@ class StimulusReflex::HTML::DocumentFragmentTest < ActiveSupport::TestCase
)
fragment = StimulusReflex::HTML::DocumentFragment.new(html)

assert_equal %(<head> <meta name="title" content="value"> </head>), fragment.to_html.squish
assert_equal %(<head> <meta name="title" content="value"> </head>), fragment.outer_html.squish
assert_equal %(<head> <meta name="title" content="value"> </head><body></body>), fragment.to_html.squish
assert_equal %(<head> <meta name="title" content="value"> </head><body></body>), fragment.outer_html.squish
end

test "uppercase tags" do
Expand Down

0 comments on commit b49b864

Please sign in to comment.