dry_ice 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/dry_ice/version.rb +1 -1
  2. data/lib/dry_ice.rb +9 -5
  3. metadata +2 -2
@@ -1,5 +1,5 @@
1
1
  module Httparty
2
2
  module DryIce
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lib/dry_ice.rb CHANGED
@@ -114,12 +114,13 @@ module HTTParty #:nodoc:
114
114
  def serialize_response(response)
115
115
  headers = response.headers.dup
116
116
  body = response.body.dup
117
- [headers,body].to_msgpack
117
+ parsed_response = response.parsed_response
118
+ [headers,body,parsed_response].to_msgpack
118
119
  end
119
120
 
120
121
  def build_response(serialized_response)
121
122
  res = MessagePack.unpack(serialized_response)
122
- CachedHTTPartyResponse.new(res[0], res[1])
123
+ CachedHTTPartyResponse.new(res[0], res[1], res[2])
123
124
  end
124
125
 
125
126
  def read(*args)
@@ -136,10 +137,10 @@ module HTTParty #:nodoc:
136
137
 
137
138
  class CachedHTTPartyResponse
138
139
 
139
- attr_accessor :headers, :body
140
+ attr_accessor :headers, :body, :parsed_response
140
141
 
141
- def initialize(headers, body)
142
- @headers, @body = headers, body
142
+ def initialize(headers, body, parsed_response)
143
+ @headers, @body, @parsed_response = headers, body, parsed_response
143
144
  end
144
145
 
145
146
  end
@@ -147,3 +148,6 @@ module HTTParty #:nodoc:
147
148
  end
148
149
  end
149
150
 
151
+
152
+
153
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry_ice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-12 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty