Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Make therubyracer conditionally installed #1716

Conversation

olleolleolle
Copy link
Member

@olleolleolle olleolleolle commented Aug 19, 2021

This PR makes the therubyracer testing tool install only on Ruby versions lower than 3.1.0.

This testing tool is used to run tests for Less, the templating library.

In order to get to a green build, this change exempts therubyracer and the Less tests from the CI build for "3.1.0" or later.

See #1715


Result: an installation that works, and then a few test failures. This is progress.

  1) Failure:
SettingsTest::TestDump_errors#test_does_not_dump_404_errors_0 [/home/runner/work/sinatra/sinatra/test/settings_test.rb:387]:
Expected false to be truthy.

  2) Failure:
RoutingTest#test_captures_the_exception_message_of_a_raised_NotFound_0 [/home/runner/work/sinatra/sinatra/test/routing_test.rb:186]:
--- expected
+++ actual
@@ -1 +1,3 @@
-"19"
+# encoding: US-ASCII
+#    valid: true
+"99"


  3) Failure:
RoutingTest#test_recalculates_body_length_correctly_for_404_response_0 [/home/runner/work/sinatra/sinatra/test/routing_test.rb:174]:
--- expected
+++ actual
@@ -1 +1,3 @@
-"18"
+# encoding: US-ASCII
+#    valid: true
+"64"


  4) Failure:
StaticTest#test_path_is_escaped_in_404_error_pages_0 [/home/runner/work/sinatra/sinatra/test/static_test.rb:87]:
Unexpected response content..
--- expected
+++ actual
@@ -1 +1,4 @@
-["GET /<script>"]
+["GET /<script>
+
+        raise NotFound, "\#{request.request_method} \#{request.path_info}"
+        ^^^^^"]


1166 runs, 2616 assertions, 4 failures, 0 errors, 1 skips

Number 4 is due to a new feature in Ruby, the error description ^^^^ notes, which accompany a raised exception. See https://github.com/ruby/error_highlight#examples

This testing tool is used to run tests for Less, the templating library.

In order to get to a green build, this change exempts therubyracer and
the Less tests from the CI build for "3.1.0" or later.
olleolleolle added a commit to olleolleolle/sinatra that referenced this pull request Aug 27, 2021
This removes the support for the defunct Less templating library, and
removes the therubyracer dependency, which was used to run tests for
it.

See sinatra#1716, sinatra#1715 for more discussion and background.
@olleolleolle
Copy link
Member Author

Closing this in favor of the #1718.

olleolleolle added a commit to olleolleolle/sinatra that referenced this pull request Oct 4, 2021
This removes the support for the defunct Less templating library, and
removes the therubyracer dependency, which was used to run tests for
it.

See sinatra#1716, sinatra#1715 for more discussion and background.
jkowens pushed a commit that referenced this pull request Feb 2, 2022
This removes the support for the defunct Less templating library, and
removes the therubyracer dependency, which was used to run tests for
it.

See #1716, #1715 for more discussion and background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant