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 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
@@ -6,7 +6,7 @@ A simple Faraday middleware that parses JSON responses. It is identical to `Fara
6
6
 
7
7
  ``` ruby
8
8
  # Gemfile
9
- gem 'faraday_middleware-parse_oj'
9
+ gem 'faraday_middleware-parse_oj', '~> 0.2'
10
10
  ```
11
11
 
12
12
  or
data/Rakefile CHANGED
@@ -6,4 +6,4 @@ RSpec::Core::RakeTask.new do |t|
6
6
  t.rspec_opts = '--color --format doc'
7
7
  end
8
8
 
9
- task :default => :spec
9
+ task default: :spec
@@ -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.1'
11
+ VERSION = '0.2'
12
12
  end
13
13
  end
14
14
 
15
- Faraday.register_middleware :response, :oj => FaradayMiddleware::ParseOj
15
+ Faraday.register_middleware :response, oj: FaradayMiddleware::ParseOj
@@ -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.1'
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: 2012-07-01 00:00:00.000000000 Z
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: