RestClientPlus
Extensions to Ruby's RestClient
Installation
Tested against ruby versions
not working
1.8.7
working
1.9.3-p484
2.0.0-p353
2.1.0dev (2013-11-23 trunk 43807)
Add this line to your application's Gemfile:
gem 'rest_client_plus'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rest_client_plus
Require using:
$ require 'rest_client_plus'
Issues
Warning: You are using Excon 0.20.1. WebMock supports version >= 0.27.5.
Usage
RestClientPlus provides GET, POST and PUT methods which return a Ruby hash if json is received.
ArrayHelper.unwrap_from_array(array) will unwrap a hash from a single-element array (array). Array is also extended with Array#unwrap_from_array so:
[ {:key => "value"} ].unwrap_from_array! #=> {:key => "value"}
Running Tests
/ruby tests/*
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Add Tests to the project
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request