VcrToCurl
Use this gem to convert vcr cassettes into curl commands. Great for replaying requests in your tests
Installation
Add this line to your application's Gemfile:
gem 'VcrToCurl'
And then execute:
$ bundle
Or install it yourself as:
$ gem install VcrToCurl
Usage
Command Line Utility
$ convert_cassette path/to/vcr_cassette_here.yml
curl -X POST -d 'fizz=buzz&foo=bar' http://echo.httpkit.com/
In your codez
cassette_to_curl = VcrToCurl::CassetteToCurl.new('your_cassette_here.yml')
cassette_to_curl.curl_commands
=> an array of curl commands for interactions in this cassette
Contributing
- Fork it ( https://github.com/[my-github-username]/VcrToCurl/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request