faraday_middleware-parse_oj 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +2 -2
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/faraday_middleware/parse_oj.rb +3 -3
- data/spec/parse_oj_spec.rb +1 -1
- metadata +2 -3
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2012 Vsevolod Romashov
|
1
|
+
Copyright (c) 2012-2013 Vsevolod Romashov
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -5,11 +5,11 @@ module FaradayMiddleware
|
|
5
5
|
dependency 'oj'
|
6
6
|
|
7
7
|
define_parser do |body|
|
8
|
-
Oj.load(body) unless body.strip.empty?
|
8
|
+
Oj.load(body, mode: :compat) unless body.strip.empty?
|
9
9
|
end
|
10
10
|
|
11
|
-
VERSION = '0.
|
11
|
+
VERSION = '0.2'
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
Faraday.register_middleware :response, :
|
15
|
+
Faraday.register_middleware :response, oj: FaradayMiddleware::ParseOj
|
data/spec/parse_oj_spec.rb
CHANGED
@@ -16,7 +16,7 @@ describe FaradayMiddleware::ParseOj do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "parses the response body with Oj.load" do
|
19
|
-
Oj.should_receive(:load).with(@body).and_return(@parsed_body)
|
19
|
+
Oj.should_receive(:load).with(@body, mode: :compat).and_return(@parsed_body)
|
20
20
|
@connection.get('/url').body.should == @parsed_body
|
21
21
|
end
|
22
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday_middleware-parse_oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
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:
|
12
|
+
date: 2013-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday_middleware
|
@@ -116,4 +116,3 @@ specification_version: 3
|
|
116
116
|
summary: Oj middleware for Faraday
|
117
117
|
test_files:
|
118
118
|
- spec/parse_oj_spec.rb
|
119
|
-
has_rdoc:
|