faraday_yaml 0.0.1 → 0.0.2
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/CHANGELOG.md +9 -0
- data/Gemfile.lock +32 -0
- data/faraday_yaml.gemspec +1 -1
- data/lib/faraday_yaml/request/yaml.rb +7 -1
- data/lib/faraday_yaml/version.rb +1 -1
- metadata +7 -21
data/CHANGELOG.md
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
faraday_yaml (0.0.2)
|
5
|
+
faraday (~> 0.5.5)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.2.4)
|
11
|
+
diff-lcs (1.1.2)
|
12
|
+
faraday (0.5.5)
|
13
|
+
addressable (~> 2.2.4)
|
14
|
+
multipart-post (~> 1.1.0)
|
15
|
+
rack (>= 1.1.0, < 2)
|
16
|
+
multipart-post (1.1.0)
|
17
|
+
rack (1.2.1)
|
18
|
+
rspec (2.4.0)
|
19
|
+
rspec-core (~> 2.4.0)
|
20
|
+
rspec-expectations (~> 2.4.0)
|
21
|
+
rspec-mocks (~> 2.4.0)
|
22
|
+
rspec-core (2.4.0)
|
23
|
+
rspec-expectations (2.4.0)
|
24
|
+
diff-lcs (~> 1.1.2)
|
25
|
+
rspec-mocks (2.4.0)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
faraday_yaml!
|
32
|
+
rspec (~> 2.4.0)
|
data/faraday_yaml.gemspec
CHANGED
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
s.add_development_dependency "rspec", "~> 2.4.0"
|
22
|
-
s.add_runtime_dependency "faraday", "~> 0.5.
|
22
|
+
s.add_runtime_dependency "faraday", "~> 0.5.5"
|
23
23
|
end
|
@@ -9,7 +9,13 @@ module Faraday
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def call(env)
|
12
|
-
|
12
|
+
# Only set the request's Content-Type when actually needed. (Some APIs
|
13
|
+
# break when you send a Content-Type header and an empty body on GET
|
14
|
+
# requests.)
|
15
|
+
if [:put, :post].include?(env[:method])
|
16
|
+
env[:request_headers]['Content-Type'] = 'application/x-yaml'
|
17
|
+
end
|
18
|
+
|
13
19
|
if env[:body] && !env[:body].respond_to?(:to_str)
|
14
20
|
env[:body] = env[:body].to_yaml
|
15
21
|
end
|
data/lib/faraday_yaml/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday_yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.2
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Dylan Markow
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-02-
|
13
|
+
date: 2011-02-09 00:00:00 -08:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -25,10 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ~>
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 2
|
30
|
-
- 4
|
31
|
-
- 0
|
32
24
|
version: 2.4.0
|
33
25
|
type: :development
|
34
26
|
version_requirements: *id001
|
@@ -40,11 +32,7 @@ dependencies:
|
|
40
32
|
requirements:
|
41
33
|
- - ~>
|
42
34
|
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
- 0
|
45
|
-
- 5
|
46
|
-
- 4
|
47
|
-
version: 0.5.4
|
35
|
+
version: 0.5.5
|
48
36
|
type: :runtime
|
49
37
|
version_requirements: *id002
|
50
38
|
description: YAML Response/Request Middleware for Faraday
|
@@ -58,7 +46,9 @@ extra_rdoc_files: []
|
|
58
46
|
|
59
47
|
files:
|
60
48
|
- .gitignore
|
49
|
+
- CHANGELOG.md
|
61
50
|
- Gemfile
|
51
|
+
- Gemfile.lock
|
62
52
|
- README.md
|
63
53
|
- Rakefile
|
64
54
|
- faraday_yaml.gemspec
|
@@ -82,21 +72,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
72
|
requirements:
|
83
73
|
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
|
-
segments:
|
86
|
-
- 0
|
87
75
|
version: "0"
|
88
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
77
|
none: false
|
90
78
|
requirements:
|
91
79
|
- - ">="
|
92
80
|
- !ruby/object:Gem::Version
|
93
|
-
segments:
|
94
|
-
- 0
|
95
81
|
version: "0"
|
96
82
|
requirements: []
|
97
83
|
|
98
84
|
rubyforge_project: faraday_yaml
|
99
|
-
rubygems_version: 1.
|
85
|
+
rubygems_version: 1.5.0
|
100
86
|
signing_key:
|
101
87
|
specification_version: 3
|
102
88
|
summary: YAML Response/Request Middleware for Faraday
|