cassette-rack 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da6831f1d92a784dd9f31ba101d2ce25814c0eb8
4
- data.tar.gz: 705a11253d8d34d765f374919530453867872255
3
+ metadata.gz: 551f5fd3f775ec4ae88741a1f39a6370be8fa141
4
+ data.tar.gz: c8d7cc6f54185fc8626a0eb67789d4c7d0b4874b
5
5
  SHA512:
6
- metadata.gz: 4ddc46cc6a54be3b305b937f03e787720debd2ac63f2780c822c6f71f45398caf5776ebd69f836664dd7178dd4a786fab514b04f010227f08261dbba66d837cb
7
- data.tar.gz: 55a672ecb89ceb28b9193a0071d5876e3674fb29522606270efd7ecb20d4309db4ac8d7fcf10b4cd6eca27e2a223ea1d7902607a3863c8943f4f0692089463e1
6
+ metadata.gz: 2a840156a5d88baa347e3d2aa47a1eeafefe3b87974126e41b39f42c33468a039503a33af8a7f70562b33caf835c4642bba04c5fc8b73477f2ac8c64b266e3f9
7
+ data.tar.gz: ef5c4bb93a127e68a2d5806136624b426db75addf51d3995dbde9152419da4316c26d70f84b5e5669cd75da1b3d65334a4850ec1f923fe287cf29e1f531a97f4
data/README.md CHANGED
@@ -4,6 +4,8 @@ Operate of the VCR cassette on Rack.
4
4
 
5
5
  ![caracal](https://dl.dropboxusercontent.com/u/14690051/images/logo/caracal.png)
6
6
 
7
+ Caracal is cassette rack alchemist.
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -1,5 +1,4 @@
1
1
  require 'kramdown'
2
-
3
2
  require_relative 'decorator/request'
4
3
  require_relative 'decorator/response'
5
4
 
@@ -9,11 +9,11 @@ module CassetteRack
9
9
  request(:get, path, params, headers)
10
10
  end
11
11
 
12
- def post(path, body, headers={})
12
+ def post(path, body={}, headers={})
13
13
  request(:post, path, {}, headers, body)
14
14
  end
15
15
 
16
- def patch(path, body, headers={})
16
+ def patch(path, body={}, headers={})
17
17
  request(:patch, path, {}, headers, body)
18
18
  end
19
19
 
@@ -51,7 +51,7 @@ module CassetteRack
51
51
  end
52
52
 
53
53
  def parse_content(body, req)
54
- if req.headers['content-type'] == 'application/json' and body.class == Hash
54
+ if req.headers['content-type'] == 'application/json' and body.is_a?(Hash)
55
55
  body.to_json
56
56
  else
57
57
  body
@@ -1,9 +1,6 @@
1
- #require 'json'
2
-
3
1
  module CassetteRack
4
2
  class Response
5
3
  attr_reader :status, :headers, :body, :content
6
- #, :method
7
4
 
8
5
  def initialize(res)
9
6
  @response = res
@@ -1,3 +1,3 @@
1
1
  module CassetteRack
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassette-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ogom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday