twurl icon indicating copy to clipboard operation
twurl copied to clipboard

0.9.7

Open smaeda-ks opened this issue 5 years ago • 7 comments

This PR includes:

  • bump minimum supported Ruby version to 2.5 https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/
  • remove --no-ssl option as all endpoints are now forced to use TLS anyway
  • workaround for OpenStruct bug in Ruby 3.0.0 https://github.com/twitter/twurl/issues/159#issuecomment-762511975 https://github.com/twitter/twurl/issues/160
  • -v option to include Ruby runtime version
  • fix escaping issues with -d option https://github.com/twitter/twurl/issues/157
  • changing --raw-data option behavior

Breaking Changes

impact: low

changing --raw-data option behavior

Although the description says Sends the specified data as it is... it's actually parsing input data using CGI.parse() method. This isn't ideal, especially when it comes to JSON data, for instance. We shouldn't touch the specified raw data at all.

This commit changes this behavior and makes this option a real thing, so users can also send JSON data using -r option by properly setting the content-type request header using -A option. For backword-compatibility, we still allow -d option to send JSON data as long as content-type: application/json request header is set along with it.

Also, since -r takes input data as-is, it doesn't make sense to allow combine use with -d option or adding -r option more than once, so we treat them as an error going forward.

ERROR: can't specify '-r' option more than once ERROR: can't use '-r' and '-d' options together

smaeda-ks avatar Jan 20 '21 13:01 smaeda-ks

Hi @andypiper, let me know if you have any questions. Not sure why Travis CI is stuck with "received" status but once it's started this should pass tests on all versions. Thanks

smaeda-ks avatar Jan 20 '21 13:01 smaeda-ks

https://travis-ci.com/github/twitter/twurl/builds/213791826 all green :)

smaeda-ks avatar Jan 22 '21 09:01 smaeda-ks

Also, since we're not really using Coveralls, can just remove it from test_helper.rb:

- SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
+ SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter]

https://github.com/lemurheavy/coveralls-ruby/issues/161

smaeda-ks avatar Jan 22 '21 09:01 smaeda-ks

No activities for code review/approval for more than a year. Closing this PR.

smaeda-ks avatar Feb 03 '22 02:02 smaeda-ks

@smaeda-ks review is happening now - thank you so much for this. Re-opening.

andypiper avatar Feb 03 '22 11:02 andypiper

ok, then I'll have to revisit and make sure this works on more recent Ruby versions. With that said, this PR is not ready for an immediate review anyhow.

smaeda-ks avatar Feb 03 '22 17:02 smaeda-ks

Hi @andypiper, this PR should be ready for merging. Added a few comments due to https://github.com/twitter/twurl/pull/173 but should be all set.

Could you please merge this so we can release 0.9.7? Thanks

smaeda-ks avatar Apr 16 '22 21:04 smaeda-ks