faraday_middleware 0.7.0 → 0.8.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.
- data/.rspec +0 -1
- data/.travis.yml +1 -2
- data/CHANGELOG.md +9 -9
- data/Gemfile +3 -3
- data/README.md +2 -2
- data/Rakefile +9 -2
- data/faraday_middleware.gemspec +16 -24
- data/lib/faraday_middleware.rb +51 -11
- data/lib/faraday_middleware/addressable_patch.rb +20 -0
- data/lib/faraday_middleware/backwards_compatibility.rb +30 -0
- data/lib/faraday_middleware/instrumentation.rb +30 -0
- data/lib/faraday_middleware/rack_compatible.rb +76 -0
- data/lib/faraday_middleware/request/encode_json.rb +50 -0
- data/lib/faraday_middleware/request/oauth.rb +61 -0
- data/lib/faraday_middleware/request/oauth2.rb +60 -0
- data/lib/faraday_middleware/response/caching.rb +76 -0
- data/lib/faraday_middleware/response/follow_redirects.rb +53 -0
- data/lib/{faraday → faraday_middleware}/response/mashify.rb +2 -2
- data/lib/faraday_middleware/response/parse_json.rb +35 -0
- data/lib/faraday_middleware/response/parse_marshal.rb +10 -0
- data/lib/faraday_middleware/response/parse_xml.rb +11 -0
- data/lib/faraday_middleware/response/parse_yaml.rb +10 -0
- data/lib/faraday_middleware/response/rashify.rb +9 -0
- data/lib/faraday_middleware/response_middleware.rb +78 -0
- data/lib/faraday_middleware/version.rb +1 -1
- data/spec/caching_test.rb +122 -0
- data/spec/encode_json_spec.rb +95 -0
- data/spec/follow_redirects_spec.rb +33 -0
- data/spec/helper.rb +27 -12
- data/spec/mashify_spec.rb +8 -7
- data/spec/oauth2_spec.rb +100 -32
- data/spec/oauth_spec.rb +83 -28
- data/spec/parse_json_spec.rb +71 -46
- data/spec/parse_marshal_spec.rb +9 -26
- data/spec/parse_xml_spec.rb +56 -24
- data/spec/parse_yaml_spec.rb +40 -20
- data/spec/rashify_spec.rb +4 -3
- metadata +59 -57
- data/lib/faraday/request/oauth.rb +0 -23
- data/lib/faraday/request/oauth2.rb +0 -24
- data/lib/faraday/response/parse_json.rb +0 -20
- data/lib/faraday/response/parse_marshal.rb +0 -10
- data/lib/faraday/response/parse_xml.rb +0 -11
- data/lib/faraday/response/parse_yaml.rb +0 -11
- data/lib/faraday/response/rashify.rb +0 -19
data/spec/parse_json_spec.rb
CHANGED
@@ -1,69 +1,94 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'faraday_middleware/response/parse_json'
|
2
3
|
|
3
|
-
describe
|
4
|
-
context
|
5
|
-
|
4
|
+
describe FaradayMiddleware::ParseJson, :type => :response do
|
5
|
+
context "no type matching" do
|
6
|
+
it "doesn't change nil body" do
|
7
|
+
process(nil).body.should be_nil
|
8
|
+
end
|
6
9
|
|
7
|
-
it
|
8
|
-
|
9
|
-
empty.should be_nil
|
10
|
+
it "nullifies empty body" do
|
11
|
+
process('').body.should be_nil
|
10
12
|
end
|
11
13
|
|
12
|
-
it
|
13
|
-
response =
|
14
|
-
response.should
|
14
|
+
it "parses json body" do
|
15
|
+
response = process('{"a":1}')
|
16
|
+
response.body.should eql('a' => 1)
|
17
|
+
response.env[:raw_body].should be_nil
|
15
18
|
end
|
19
|
+
end
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
|
21
|
+
context "with preserving raw" do
|
22
|
+
let(:options) { {:preserve_raw => true} }
|
23
|
+
|
24
|
+
it "parses json body" do
|
25
|
+
response = process('{"a":1}')
|
26
|
+
response.body.should eql('a' => 1)
|
27
|
+
response.env[:raw_body].should eql('{"a":1}')
|
20
28
|
end
|
21
29
|
|
22
|
-
it
|
23
|
-
|
24
|
-
|
25
|
-
me['name'].should == 'Erik Michaels-Ober'
|
26
|
-
me['screen_name'].should == 'sferik'
|
30
|
+
it "can opt out of preserving raw" do
|
31
|
+
response = process('{"a":1}', nil, :preserve_raw => false)
|
32
|
+
response.env[:raw_body].should be_nil
|
27
33
|
end
|
34
|
+
end
|
28
35
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
36
|
+
context "with regexp type matching" do
|
37
|
+
let(:options) { {:content_type => /\bjson$/} }
|
38
|
+
|
39
|
+
it "parses json body of correct type" do
|
40
|
+
response = process('{"a":1}', 'application/x-json')
|
41
|
+
response.body.should eql('a' => 1)
|
34
42
|
end
|
35
43
|
|
36
|
-
it
|
37
|
-
|
38
|
-
|
39
|
-
us.first['screen_name'].should == 'sferik'
|
40
|
-
us.last['screen_name'].should == 'pengwynn'
|
44
|
+
it "ignores json body of incorrect type" do
|
45
|
+
response = process('{"a":1}', 'text/json-xml')
|
46
|
+
response.body.should eql('{"a":1}')
|
41
47
|
end
|
48
|
+
end
|
42
49
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
50
|
+
context "with array type matching" do
|
51
|
+
let(:options) { {:content_type => %w[a/b c/d]} }
|
52
|
+
|
53
|
+
it "parses json body of correct type" do
|
54
|
+
process('{"a":1}', 'a/b').body.should be_a(Hash)
|
55
|
+
process('{"a":1}', 'c/d').body.should be_a(Hash)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "ignores json body of incorrect type" do
|
59
|
+
process('{"a":1}', 'a/d').body.should_not be_a(Hash)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
it "chokes on invalid json" do
|
64
|
+
['{!', ' ', '"a"', 'true', 'null', '1'].each do |data|
|
65
|
+
expect { process(data) }.to raise_error(Faraday::Error::ParsingError)
|
49
66
|
end
|
50
67
|
end
|
51
68
|
|
52
|
-
context
|
53
|
-
let(:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
69
|
+
context "with mime type fix" do
|
70
|
+
let(:middleware) {
|
71
|
+
app = described_class::MimeTypeFix.new(lambda {|env|
|
72
|
+
Faraday::Response.new(env)
|
73
|
+
}, :content_type => /^text\//)
|
74
|
+
described_class.new(app, :content_type => 'application/json')
|
75
|
+
}
|
76
|
+
|
77
|
+
it "ignores completely incompatible type" do
|
78
|
+
response = process('{"a":1}', 'application/xml')
|
79
|
+
response.body.should eql('{"a":1}')
|
80
|
+
end
|
81
|
+
|
82
|
+
it "ignores compatible type with bad data" do
|
83
|
+
response = process('var a = 1', 'text/javascript')
|
84
|
+
response.body.should eql('var a = 1')
|
85
|
+
response['content-type'].should eql('text/javascript')
|
59
86
|
end
|
60
87
|
|
61
|
-
it
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
me['name'].should == 'Erik Michaels-Ober'
|
66
|
-
me['screen_name'].should == 'sferik'
|
88
|
+
it "corrects compatible type and data" do
|
89
|
+
response = process('{"a":1}', 'text/javascript')
|
90
|
+
response.body.should be_a(Hash)
|
91
|
+
response['content-type'].should eql('application/json')
|
67
92
|
end
|
68
93
|
end
|
69
94
|
end
|
data/spec/parse_marshal_spec.rb
CHANGED
@@ -1,33 +1,16 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'faraday_middleware/response/parse_marshal'
|
2
3
|
|
3
|
-
describe
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
it 'should load a marshalled hash' do
|
8
|
-
me = parse_marshal.on_complete(:body => "\x04\b{\x06I\"\tname\x06:\x06ETI\"\x17Erik Michaels-Ober\x06;\x00T")
|
9
|
-
me.class.should == Hash
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'should handle hashes' do
|
13
|
-
me = parse_marshal.on_complete(:body => "\x04\b{\x06I\"\tname\x06:\x06ETI\"\x17Erik Michaels-Ober\x06;\x00T")
|
14
|
-
me['name'].should == 'Erik Michaels-Ober'
|
15
|
-
end
|
4
|
+
describe FaradayMiddleware::ParseMarshal, :type => :response do
|
5
|
+
it "restores a marshaled dump" do
|
6
|
+
process(Marshal.dump(:a => 1)).body.should be_eql(:a => 1)
|
16
7
|
end
|
17
8
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Faraday::Connection.new do |builder|
|
22
|
-
builder.adapter :test, stubs
|
23
|
-
builder.use Faraday::Response::ParseMarshal
|
24
|
-
end
|
25
|
-
end
|
9
|
+
it "nulifies blank response" do
|
10
|
+
process('').body.should be_nil
|
11
|
+
end
|
26
12
|
|
27
|
-
|
28
|
-
|
29
|
-
me = connection.get('/hash').body
|
30
|
-
me.class.should == Hash
|
31
|
-
end
|
13
|
+
it "chokes on invalid content" do
|
14
|
+
expect { process('abc') }.to raise_error(Faraday::Error::ParsingError)
|
32
15
|
end
|
33
16
|
end
|
data/spec/parse_xml_spec.rb
CHANGED
@@ -1,39 +1,71 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'faraday_middleware/response/parse_xml'
|
2
3
|
|
3
|
-
describe
|
4
|
-
|
5
|
-
|
4
|
+
describe FaradayMiddleware::ParseXml, :type => :response do
|
5
|
+
let(:xml) { '<user><name>Erik Michaels-Ober</name><screen_name>sferik</screen_name></user>' }
|
6
|
+
let(:user) { {'user' => {'name' => 'Erik Michaels-Ober', 'screen_name' => 'sferik'} } }
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
context "no type matching" do
|
9
|
+
it "doesn't change nil body" do
|
10
|
+
process(nil).body.should be_nil
|
10
11
|
end
|
11
12
|
|
12
|
-
it
|
13
|
-
|
14
|
-
me.class.should == Hash
|
13
|
+
it "turns empty body into empty hash" do
|
14
|
+
process('').body.should be_eql({})
|
15
15
|
end
|
16
16
|
|
17
|
-
it
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
it "parses xml body" do
|
18
|
+
response = process(xml)
|
19
|
+
response.body.should eql(user)
|
20
|
+
response.env[:raw_body].should be_nil
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
context
|
25
|
-
let(:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
context "with preserving raw" do
|
25
|
+
let(:options) { {:preserve_raw => true} }
|
26
|
+
|
27
|
+
it "parses xml body" do
|
28
|
+
response = process(xml)
|
29
|
+
response.body.should eql(user)
|
30
|
+
response.env[:raw_body].should eql(xml)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "can opt out of preserving raw" do
|
34
|
+
response = process(xml, nil, :preserve_raw => false)
|
35
|
+
response.env[:raw_body].should be_nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "with regexp type matching" do
|
40
|
+
let(:options) { {:content_type => /\bxml$/} }
|
41
|
+
|
42
|
+
it "parses xml body of correct type" do
|
43
|
+
response = process(xml, 'application/xml')
|
44
|
+
response.body.should eql(user)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "ignores xml body of incorrect type" do
|
48
|
+
response = process(xml, 'text/html')
|
49
|
+
response.body.should eql(xml)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context "with array type matching" do
|
54
|
+
let(:options) { {:content_type => %w[a/b c/d]} }
|
55
|
+
|
56
|
+
it "parses xml body of correct type" do
|
57
|
+
process(xml, 'a/b').body.should be_a(Hash)
|
58
|
+
process(xml, 'c/d').body.should be_a(Hash)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "ignores xml body of incorrect type" do
|
62
|
+
process(xml, 'a/d').body.should_not be_a(Hash)
|
31
63
|
end
|
64
|
+
end
|
32
65
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
me.class.should == Hash
|
66
|
+
it "chokes on invalid xml" do
|
67
|
+
['{!', '"a"', 'true', 'null', '1'].each do |data|
|
68
|
+
expect { process(data) }.to raise_error(Faraday::Error::ParsingError)
|
37
69
|
end
|
38
70
|
end
|
39
71
|
end
|
data/spec/parse_yaml_spec.rb
CHANGED
@@ -1,33 +1,53 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'faraday_middleware/response/parse_yaml'
|
2
3
|
|
3
|
-
describe
|
4
|
-
context
|
5
|
-
|
4
|
+
describe FaradayMiddleware::ParseYaml, :type => :response do
|
5
|
+
context "no type matching" do
|
6
|
+
it "doesn't change nil body" do
|
7
|
+
process(nil).body.should be_nil
|
8
|
+
end
|
9
|
+
|
10
|
+
it "returns false for empty body" do
|
11
|
+
process('').body.should be_false
|
12
|
+
end
|
13
|
+
|
14
|
+
it "parses yaml body" do
|
15
|
+
response = process('a: 1')
|
16
|
+
response.body.should eql('a' => 1)
|
17
|
+
response.env[:raw_body].should be_nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context "with preserving raw" do
|
22
|
+
let(:options) { {:preserve_raw => true} }
|
6
23
|
|
7
|
-
it
|
8
|
-
|
9
|
-
|
24
|
+
it "parses yaml body" do
|
25
|
+
response = process('a: 1')
|
26
|
+
response.body.should eql('a' => 1)
|
27
|
+
response.env[:raw_body].should eql('a: 1')
|
10
28
|
end
|
11
29
|
|
12
|
-
it
|
13
|
-
|
14
|
-
|
30
|
+
it "can opt out of preserving raw" do
|
31
|
+
response = process('a: 1', nil, :preserve_raw => false)
|
32
|
+
response.env[:raw_body].should be_nil
|
15
33
|
end
|
16
34
|
end
|
17
35
|
|
18
|
-
context
|
19
|
-
let(:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
36
|
+
context "with regexp type matching" do
|
37
|
+
let(:options) { {:content_type => /\byaml$/} }
|
38
|
+
|
39
|
+
it "parses json body of correct type" do
|
40
|
+
response = process('a: 1', 'application/x-yaml')
|
41
|
+
response.body.should eql('a' => 1)
|
25
42
|
end
|
26
43
|
|
27
|
-
it
|
28
|
-
|
29
|
-
|
30
|
-
me.class.should == Hash
|
44
|
+
it "ignores json body of incorrect type" do
|
45
|
+
response = process('a: 1', 'text/yaml-xml')
|
46
|
+
response.body.should eql('a: 1')
|
31
47
|
end
|
32
48
|
end
|
49
|
+
|
50
|
+
it "chokes on invalid yaml" do
|
51
|
+
expect { process('{!') }.to raise_error(Faraday::Error::ParsingError)
|
52
|
+
end
|
33
53
|
end
|
data/spec/rashify_spec.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'faraday_middleware/response/rashify'
|
2
3
|
|
3
|
-
describe
|
4
|
+
describe FaradayMiddleware::Rashify do
|
4
5
|
|
5
6
|
context 'when used' do
|
6
|
-
let(:rashify) {
|
7
|
+
let(:rashify) { described_class.new }
|
7
8
|
|
8
9
|
it 'should create a Hashie::Rash from the body' do
|
9
10
|
env = { :body => { "name" => "Erik Michaels-Ober", "username" => "sferik" } }
|
@@ -52,7 +53,7 @@ describe Faraday::Response::Rashify do
|
|
52
53
|
let(:connection) do
|
53
54
|
Faraday::Connection.new do |builder|
|
54
55
|
builder.adapter :test, stubs
|
55
|
-
builder.use
|
56
|
+
builder.use described_class
|
56
57
|
end
|
57
58
|
end
|
58
59
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday_middleware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,56 +10,58 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
default_executable:
|
13
|
+
date: 2012-01-24 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: faraday
|
18
|
-
requirement: &
|
17
|
+
requirement: &70328307940220 !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
19
|
requirements:
|
21
|
-
- -
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.7.4
|
23
|
+
- - <
|
22
24
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
25
|
+
version: '0.9'
|
24
26
|
type: :runtime
|
25
27
|
prerelease: false
|
26
|
-
version_requirements: *
|
28
|
+
version_requirements: *70328307940220
|
27
29
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
29
|
-
requirement: &
|
30
|
+
name: multi_xml
|
31
|
+
requirement: &70328307938460 !ruby/object:Gem::Requirement
|
30
32
|
none: false
|
31
33
|
requirements:
|
32
34
|
- - ~>
|
33
35
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0.
|
36
|
+
version: '0.2'
|
35
37
|
type: :development
|
36
38
|
prerelease: false
|
37
|
-
version_requirements: *
|
39
|
+
version_requirements: *70328307938460
|
38
40
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
40
|
-
requirement: &
|
41
|
+
name: rake
|
42
|
+
requirement: &70328307937560 !ruby/object:Gem::Requirement
|
41
43
|
none: false
|
42
44
|
requirements:
|
43
45
|
- - ~>
|
44
46
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
47
|
+
version: '0.9'
|
46
48
|
type: :development
|
47
49
|
prerelease: false
|
48
|
-
version_requirements: *
|
50
|
+
version_requirements: *70328307937560
|
49
51
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
51
|
-
requirement: &
|
52
|
+
name: hashie
|
53
|
+
requirement: &70328307936700 !ruby/object:Gem::Requirement
|
52
54
|
none: false
|
53
55
|
requirements:
|
54
56
|
- - ~>
|
55
57
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
58
|
+
version: '1.2'
|
57
59
|
type: :development
|
58
60
|
prerelease: false
|
59
|
-
version_requirements: *
|
61
|
+
version_requirements: *70328307936700
|
60
62
|
- !ruby/object:Gem::Dependency
|
61
63
|
name: rash
|
62
|
-
requirement: &
|
64
|
+
requirement: &70328307935660 !ruby/object:Gem::Requirement
|
63
65
|
none: false
|
64
66
|
requirements:
|
65
67
|
- - ~>
|
@@ -67,51 +69,40 @@ dependencies:
|
|
67
69
|
version: '0.3'
|
68
70
|
type: :development
|
69
71
|
prerelease: false
|
70
|
-
version_requirements: *
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: multi_json
|
73
|
-
requirement: &70235434350360 !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '1.0'
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: *70235434350360
|
72
|
+
version_requirements: *70328307935660
|
82
73
|
- !ruby/object:Gem::Dependency
|
83
|
-
name:
|
84
|
-
requirement: &
|
74
|
+
name: rspec
|
75
|
+
requirement: &70328307934840 !ruby/object:Gem::Requirement
|
85
76
|
none: false
|
86
77
|
requirements:
|
87
78
|
- - ~>
|
88
79
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
80
|
+
version: '2.6'
|
90
81
|
type: :development
|
91
82
|
prerelease: false
|
92
|
-
version_requirements: *
|
83
|
+
version_requirements: *70328307934840
|
93
84
|
- !ruby/object:Gem::Dependency
|
94
|
-
name:
|
95
|
-
requirement: &
|
85
|
+
name: simple_oauth
|
86
|
+
requirement: &70328307953240 !ruby/object:Gem::Requirement
|
96
87
|
none: false
|
97
88
|
requirements:
|
98
89
|
- - ~>
|
99
90
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.
|
91
|
+
version: '0.1'
|
101
92
|
type: :development
|
102
93
|
prerelease: false
|
103
|
-
version_requirements: *
|
94
|
+
version_requirements: *70328307953240
|
104
95
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
106
|
-
requirement: &
|
96
|
+
name: rack-cache
|
97
|
+
requirement: &70328307951820 !ruby/object:Gem::Requirement
|
107
98
|
none: false
|
108
99
|
requirements:
|
109
100
|
- - ~>
|
110
101
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
102
|
+
version: '1.1'
|
112
103
|
type: :development
|
113
104
|
prerelease: false
|
114
|
-
version_requirements: *
|
105
|
+
version_requirements: *70328307951820
|
115
106
|
description: Various middleware for Faraday
|
116
107
|
email:
|
117
108
|
- sferik@gmail.com
|
@@ -130,16 +121,27 @@ files:
|
|
130
121
|
- README.md
|
131
122
|
- Rakefile
|
132
123
|
- faraday_middleware.gemspec
|
133
|
-
- lib/faraday/request/oauth.rb
|
134
|
-
- lib/faraday/request/oauth2.rb
|
135
|
-
- lib/faraday/response/mashify.rb
|
136
|
-
- lib/faraday/response/parse_json.rb
|
137
|
-
- lib/faraday/response/parse_marshal.rb
|
138
|
-
- lib/faraday/response/parse_xml.rb
|
139
|
-
- lib/faraday/response/parse_yaml.rb
|
140
|
-
- lib/faraday/response/rashify.rb
|
141
124
|
- lib/faraday_middleware.rb
|
125
|
+
- lib/faraday_middleware/addressable_patch.rb
|
126
|
+
- lib/faraday_middleware/backwards_compatibility.rb
|
127
|
+
- lib/faraday_middleware/instrumentation.rb
|
128
|
+
- lib/faraday_middleware/rack_compatible.rb
|
129
|
+
- lib/faraday_middleware/request/encode_json.rb
|
130
|
+
- lib/faraday_middleware/request/oauth.rb
|
131
|
+
- lib/faraday_middleware/request/oauth2.rb
|
132
|
+
- lib/faraday_middleware/response/caching.rb
|
133
|
+
- lib/faraday_middleware/response/follow_redirects.rb
|
134
|
+
- lib/faraday_middleware/response/mashify.rb
|
135
|
+
- lib/faraday_middleware/response/parse_json.rb
|
136
|
+
- lib/faraday_middleware/response/parse_marshal.rb
|
137
|
+
- lib/faraday_middleware/response/parse_xml.rb
|
138
|
+
- lib/faraday_middleware/response/parse_yaml.rb
|
139
|
+
- lib/faraday_middleware/response/rashify.rb
|
140
|
+
- lib/faraday_middleware/response_middleware.rb
|
142
141
|
- lib/faraday_middleware/version.rb
|
142
|
+
- spec/caching_test.rb
|
143
|
+
- spec/encode_json_spec.rb
|
144
|
+
- spec/follow_redirects_spec.rb
|
143
145
|
- spec/helper.rb
|
144
146
|
- spec/mashify_spec.rb
|
145
147
|
- spec/oauth2_spec.rb
|
@@ -149,7 +151,6 @@ files:
|
|
149
151
|
- spec/parse_xml_spec.rb
|
150
152
|
- spec/parse_yaml_spec.rb
|
151
153
|
- spec/rashify_spec.rb
|
152
|
-
has_rdoc: true
|
153
154
|
homepage: https://github.com/pengwynn/faraday_middleware
|
154
155
|
licenses: []
|
155
156
|
post_install_message:
|
@@ -162,9 +163,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
163
|
- - ! '>='
|
163
164
|
- !ruby/object:Gem::Version
|
164
165
|
version: '0'
|
165
|
-
segments:
|
166
|
-
- 0
|
167
|
-
hash: 4358588271321679399
|
168
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
167
|
none: false
|
170
168
|
requirements:
|
@@ -173,11 +171,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
171
|
version: 1.3.6
|
174
172
|
requirements: []
|
175
173
|
rubyforge_project:
|
176
|
-
rubygems_version: 1.
|
174
|
+
rubygems_version: 1.8.12
|
177
175
|
signing_key:
|
178
176
|
specification_version: 3
|
179
177
|
summary: Various middleware for Faraday
|
180
178
|
test_files:
|
179
|
+
- spec/caching_test.rb
|
180
|
+
- spec/encode_json_spec.rb
|
181
|
+
- spec/follow_redirects_spec.rb
|
181
182
|
- spec/helper.rb
|
182
183
|
- spec/mashify_spec.rb
|
183
184
|
- spec/oauth2_spec.rb
|
@@ -187,3 +188,4 @@ test_files:
|
|
187
188
|
- spec/parse_xml_spec.rb
|
188
189
|
- spec/parse_yaml_spec.rb
|
189
190
|
- spec/rashify_spec.rb
|
191
|
+
has_rdoc:
|