faraday_middleware-active_support_json 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzcxODBlNDJkZjE0MmNhZDEyODJmY2U3NzhkZWEyMzAyNmYxYzRiNA==
5
- data.tar.gz: !binary |-
6
- ZDU5YzJlZjg2NDU3MmIwMzA2ZTUwZjg5MzE0YWMwMWIwYzRkMjgxMg==
2
+ SHA1:
3
+ metadata.gz: e988bdf6cd9ba7a0f0a5f0475720aec04446bce5
4
+ data.tar.gz: b262f8eae3eee238d4845ba03d1d7790ebc210a6
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YjQyMjhmNjcwZmFkYzhmZmM5ZmNhZGEwZjBhMzhhNGU5OTE1NGEzOTIxZTEz
10
- Y2JiMzcxYTY4OTgwODAxZGExOTYzYWRhOGU0ZTU0MjdkYzExNWNjNzg1NjUw
11
- YTMwYWUwZDkzMDI4NTFjZGM5OGY4NDIwOWI2Nzk1NzM0M2U3N2M=
12
- data.tar.gz: !binary |-
13
- ZTU2MDNmOTMyNjFmMzBhZmRlNDdmYzllYTRlOTEwOTY5YzE4ZjE1MGI5NDBj
14
- MTVmNWYzNjI5MWZhZDUyMmRhMWIwNDczMTg3ZjM5MzY5NzE5ODI4YWI1OGEz
15
- NTQ1MmUwZTNiOGM2ZTVlMDAwOTg1MDVhZGE4NmQ1NDYyMTBjOGQ=
6
+ metadata.gz: 592b4d61d9538079cf76a17cc82825779b067ea95e29d08be9065c0e709d391526a2a2274efc4b193591bf289ac96a12345daa0b997b5f4d0886eb85fe1e17f6
7
+ data.tar.gz: 83bb0c04053744b91de23ca8ad137177b3fca27bed9368cd478fe827db40f01fcc37932342fe2420d36941b3741704f959ca033c5b0d32a6c9e23991485c57d8
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ /**/*.lock
@@ -1,4 +1,13 @@
1
1
  rvm:
2
- - jruby
3
2
  - 1.9.3
4
- - 2.0.0
3
+ - 2.0.0
4
+ - 2.1.2
5
+ - rbx-2
6
+ - jruby
7
+ gemfile:
8
+ - gemfiles/activesupport_3.2.gemfile
9
+ - gemfiles/activesupport_4.0.gemfile
10
+ - gemfiles/activesupport_4.1.gemfile
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: rbx-2
@@ -0,0 +1,11 @@
1
+ appraise "activesupport-3.2" do
2
+ gem 'activesupport', "~> 3.2"
3
+ end
4
+
5
+ appraise "activesupport-4.0" do
6
+ gem 'activesupport', "~> 4.0.0"
7
+ end
8
+
9
+ appraise "activesupport-4.1" do
10
+ gem 'activesupport', "~> 4.1.0"
11
+ end
@@ -12,10 +12,11 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = 'faraday_middleware-active_support_json'
14
14
  gem.require_paths = ['lib']
15
- gem.version = '0.0.2'
15
+ gem.version = '0.0.3'
16
16
 
17
17
  gem.add_dependency 'faraday_middleware'
18
- gem.add_dependency 'activesupport', '< 4'
18
+ gem.add_dependency 'activesupport', '> 3', '< 5'
19
19
 
20
20
  gem.add_development_dependency 'rspec'
21
+ gem.add_development_dependency 'appraisal'
21
22
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rake", :group => :test
6
+ gem "activesupport", "~> 3.2"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rake", :group => :test
6
+ gem "activesupport", "~> 4.0.0"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rake", :group => :test
6
+ gem "activesupport", "~> 4.1.0"
7
+
8
+ gemspec :path => "../"
@@ -4,10 +4,17 @@ require 'faraday_middleware/request/encode_json'
4
4
  module FaradayMiddleware
5
5
  module ActiveSupport
6
6
  class ParseJson < FaradayMiddleware::ResponseMiddleware
7
+ dependency 'active_support/version'
7
8
  dependency 'active_support/json'
8
9
 
9
- def parse(body)
10
- ::ActiveSupport::JSON.decode(body, @options) rescue body
10
+ if ::ActiveSupport::VERSION::MAJOR < 4
11
+ def parse(body)
12
+ ::ActiveSupport::JSON.decode(body, @options) rescue body
13
+ end
14
+ else
15
+ def parse(body)
16
+ ::ActiveSupport::JSON.decode(body) rescue body
17
+ end
11
18
  end
12
19
  end
13
20
 
@@ -19,8 +19,10 @@ describe FaradayMiddleware::ActiveSupport::ParseJson do
19
19
  connection.get('/').body.should == {'a'=>1, 'b'=>2}
20
20
  end
21
21
 
22
- it 'should delegate options given by builder' do
23
- connection(:symbolize_keys => true).get('/').body.should == response
22
+ if ::ActiveSupport::VERSION::MAJOR < 4
23
+ it 'should delegate options given by builder' do
24
+ connection(:symbolize_keys => true).get('/').body.should == response
25
+ end
24
26
  end
25
27
  end
26
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday_middleware-active_support_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Rogenius
@@ -9,48 +9,68 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-17 00:00:00.000000000 Z
12
+ date: 2014-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday_middleware
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - <
32
+ - - ">"
33
33
  - !ruby/object:Gem::Version
34
- version: '4'
34
+ version: '3'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '5'
35
38
  type: :runtime
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
39
- - - <
42
+ - - ">"
43
+ - !ruby/object:Gem::Version
44
+ version: '3'
45
+ - - "<"
40
46
  - !ruby/object:Gem::Version
41
- version: '4'
47
+ version: '5'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: rspec
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
- - - ! '>='
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: appraisal
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
47
67
  - !ruby/object:Gem::Version
48
68
  version: '0'
49
69
  type: :development
50
70
  prerelease: false
51
71
  version_requirements: !ruby/object:Gem::Requirement
52
72
  requirements:
53
- - - ! '>='
73
+ - - ">="
54
74
  - !ruby/object:Gem::Version
55
75
  version: '0'
56
76
  description: Faraday middleware for handling JSON using ActiveSupport::JSON
@@ -60,14 +80,18 @@ executables: []
60
80
  extensions: []
61
81
  extra_rdoc_files: []
62
82
  files:
63
- - .gitignore
64
- - .rspec
65
- - .travis.yml
83
+ - ".gitignore"
84
+ - ".rspec"
85
+ - ".travis.yml"
86
+ - Appraisals
66
87
  - Gemfile
67
88
  - LICENSE
68
89
  - README.md
69
90
  - Rakefile
70
91
  - faraday_middleware-active_support_json.gemspec
92
+ - gemfiles/activesupport_3.2.gemfile
93
+ - gemfiles/activesupport_4.0.gemfile
94
+ - gemfiles/activesupport_4.1.gemfile
71
95
  - lib/faraday_middleware-active_support_json.rb
72
96
  - lib/faraday_middleware/active_support_json.rb
73
97
  - spec/faraday_middleware/active_support_json_spec.rb
@@ -81,12 +105,12 @@ require_paths:
81
105
  - lib
82
106
  required_ruby_version: !ruby/object:Gem::Requirement
83
107
  requirements:
84
- - - ! '>='
108
+ - - ">="
85
109
  - !ruby/object:Gem::Version
86
110
  version: '0'
87
111
  required_rubygems_version: !ruby/object:Gem::Requirement
88
112
  requirements:
89
- - - ! '>='
113
+ - - ">="
90
114
  - !ruby/object:Gem::Version
91
115
  version: '0'
92
116
  requirements: []