-
Notifications
You must be signed in to change notification settings - Fork 298
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
INVESTIGATE: compatibility with Ruby 3 #159
Comments
The |
Rake conformance tests are failing in Ruby 3.0 but work in 2.7.2 (macOS) |
@andypiper I can help you with that if you need a hand. I think the reason why it stopped working since Ruby 3 is likely due to this bug: ruby/ostruct#23 We indeed rely on the OpenStruct here: As you can see in that issue link, the fix has been merged into Ruby upstream but they haven't released a new Ruby 3.x.x version yet, so we might need to wait for that. I'm not sure how long it takes, but once it's released and users update their Ruby runtime we probably don't need any particular fixes for Ruby 3. |
opened #161 |
The following test cases fail when running CI in Ruby 3.0. ``` 1) Failure: Twurl::CLI::OptionParsingTest#test_setting_host_updates_to_requested_value [/home/runner/work/twurl/twurl/test/cli_test.rb:214]: Expected: "localhost:3000" Actual: "api.twitter.com" 2) Failure: Twurl::CLI::OptionParsingTest#test_setting_proxy_updates_to_requested_value [/home/runner/work/twurl/twurl/test/cli_test.rb:237]: Expected: "localhost:80" Actual: nil 3) Failure: Twurl::CLI::OptionParsingTest#test_passing_no_ssl_option_disables_ssl [/home/runner/work/twurl/twurl/test/cli_test.rb:196]: Expected false to be truthy. 4) Failure: Twurl::CLI::OptionParsingTest#test_specifying_a_request_method_extracts_and_normalizes_request_method [/home/runner/work/twurl/twurl/test/cli_test.rb:54]: Expected: "put" Actual: "get" 5) Failure: Twurl::CLI::OptionParsingTest#test_protocol_is_stripped_from_host [/home/runner/work/twurl/twurl/test/cli_test.rb:221]: Expected: "localhost:3000" Actual: "api.twitter.com" 6) Failure: Twurl::CLI::OptionParsingTest#test_passing_data_and_an_explicit_request_method_uses_the_specified_method [/home/runner/work/twurl/twurl/test/cli_test.rb:148]: Expected: "delete" Actual: "post" 7) Failure: Twurl::Options::Test#test_ssl_is_enabled_if_the_protocol_is_https [/home/runner/work/twurl/twurl/test/cli_options_test.rb:18]: Expected false to be truthy. 8) Failure: Twurl::Options::Test#test_base_url_is_built_from_protocol_and_host [/home/runner/work/twurl/twurl/test/cli_options_test.rb:13]: Expected: "http://api.twitter.com" Actual: "https://api.twitter.com" ``` According to twitter#159 (comment), the cause appears to be a bug in OpenStruct. The bug was fixed in ruby/ostruct#23, and released as v0.3.3.
* Add GitHub Actions Workflow * Remove Coveralls as it is not being used #161 (comment) * Address changes in RR v3.0.0 Now we need to take the block as a proc, not as an argument. refs: rr/rr@d6da209#diff-a20b4cc1aac26c32a40206ad0776d4ff528201e97b737b7b3f0be1eb0e12e93dL44-L49 * Require RR v3 * Require OpenStruct v0.3.3+ The following test cases fail when running CI in Ruby 3.0. ``` 1) Failure: Twurl::CLI::OptionParsingTest#test_setting_host_updates_to_requested_value [/home/runner/work/twurl/twurl/test/cli_test.rb:214]: Expected: "localhost:3000" Actual: "api.twitter.com" 2) Failure: Twurl::CLI::OptionParsingTest#test_setting_proxy_updates_to_requested_value [/home/runner/work/twurl/twurl/test/cli_test.rb:237]: Expected: "localhost:80" Actual: nil 3) Failure: Twurl::CLI::OptionParsingTest#test_passing_no_ssl_option_disables_ssl [/home/runner/work/twurl/twurl/test/cli_test.rb:196]: Expected false to be truthy. 4) Failure: Twurl::CLI::OptionParsingTest#test_specifying_a_request_method_extracts_and_normalizes_request_method [/home/runner/work/twurl/twurl/test/cli_test.rb:54]: Expected: "put" Actual: "get" 5) Failure: Twurl::CLI::OptionParsingTest#test_protocol_is_stripped_from_host [/home/runner/work/twurl/twurl/test/cli_test.rb:221]: Expected: "localhost:3000" Actual: "api.twitter.com" 6) Failure: Twurl::CLI::OptionParsingTest#test_passing_data_and_an_explicit_request_method_uses_the_specified_method [/home/runner/work/twurl/twurl/test/cli_test.rb:148]: Expected: "delete" Actual: "post" 7) Failure: Twurl::Options::Test#test_ssl_is_enabled_if_the_protocol_is_https [/home/runner/work/twurl/twurl/test/cli_options_test.rb:18]: Expected false to be truthy. 8) Failure: Twurl::Options::Test#test_base_url_is_built_from_protocol_and_host [/home/runner/work/twurl/twurl/test/cli_options_test.rb:13]: Expected: "http://api.twitter.com" Actual: "https://api.twitter.com" ``` According to #159 (comment), the cause appears to be a bug in OpenStruct. The bug was fixed in ruby/ostruct#23, and released as v0.3.3. * Drop support for Ruby 2.4 - OpenStruct v0.3.3+ requires Ruby 2.5+. - It's already reached EOL on 2020-03-31. * Migrate CI from Travis CI to GitHub Actions
Issue to explore and document compatibility between
twurl
and Ruby v3.Contributions and PRs are welcomed.
The text was updated successfully, but these errors were encountered: