faraday_middleware 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +24 -24
- data/CHANGELOG.md +9 -9
- data/Gemfile.lock +5 -5
- data/Rakefile +14 -14
- data/faraday_middleware.gemspec +1 -1
- data/lib/faraday/parse.rb +1 -1
- data/lib/faraday_middleware/version.rb +1 -1
- metadata +7 -7
data/.gitignore
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
## MAC OS
|
2
|
-
.DS_Store
|
3
|
-
|
4
|
-
## TEXTMATE
|
5
|
-
*.tmproj
|
6
|
-
tmtags
|
7
|
-
|
8
|
-
## EMACS
|
9
|
-
*~
|
10
|
-
\#*
|
11
|
-
.\#*
|
12
|
-
|
13
|
-
## VIM
|
14
|
-
*.swp
|
15
|
-
|
16
|
-
## PROJECT::GENERAL
|
17
|
-
coverage
|
18
|
-
rdoc
|
19
|
-
pkg
|
20
|
-
*.gem
|
21
|
-
.yardopts
|
22
|
-
.yardoc
|
23
|
-
|
24
|
-
## PROJECT::SPECIFIC
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
|
16
|
+
## PROJECT::GENERAL
|
17
|
+
coverage
|
18
|
+
rdoc
|
19
|
+
pkg
|
20
|
+
*.gem
|
21
|
+
.yardopts
|
22
|
+
.yardoc
|
23
|
+
|
24
|
+
## PROJECT::SPECIFIC
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
### 0.0.2 September 25, 2010
|
4
|
-
|
5
|
-
* Mashify now handles arrays of non-hashes
|
6
|
-
|
7
|
-
### 0.0.1 June 27, 2010
|
8
|
-
|
9
|
-
* MultiJSON
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
### 0.0.2 September 25, 2010
|
4
|
+
|
5
|
+
* Mashify now handles arrays of non-hashes
|
6
|
+
|
7
|
+
### 0.0.1 June 27, 2010
|
8
|
+
|
9
|
+
* MultiJSON
|
10
10
|
* Mashify
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
faraday_middleware (0.2.
|
5
|
-
faraday (~> 0.5.
|
4
|
+
faraday_middleware (0.2.2)
|
5
|
+
faraday (~> 0.5.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
10
|
addressable (2.2.2)
|
11
|
-
faraday (0.5.
|
11
|
+
faraday (0.5.2)
|
12
12
|
addressable (~> 2.2.2)
|
13
13
|
multipart-post (~> 1.0.1)
|
14
|
-
rack (
|
14
|
+
rack (>= 1.1.0, < 2)
|
15
15
|
hashie (0.4.0)
|
16
16
|
json (1.4.6)
|
17
17
|
multi_json (0.0.4)
|
@@ -29,7 +29,7 @@ PLATFORMS
|
|
29
29
|
ruby
|
30
30
|
|
31
31
|
DEPENDENCIES
|
32
|
-
faraday (~> 0.5.
|
32
|
+
faraday (~> 0.5.2)
|
33
33
|
faraday_middleware!
|
34
34
|
hashie (~> 0.4)
|
35
35
|
json (~> 1.4)
|
data/Rakefile
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/testtask'
|
4
|
-
require 'bundler'
|
5
|
-
|
6
|
-
Bundler::GemHelper.install_tasks
|
7
|
-
|
8
|
-
Rake::TestTask.new(:test) do |test|
|
9
|
-
test.ruby_opts = ["-rubygems"] if defined? Gem
|
10
|
-
test.libs << "lib" << "test"
|
11
|
-
test.pattern = "test/**/*_test.rb"
|
12
|
-
end
|
13
|
-
|
14
|
-
task :default => :test
|
1
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/testtask'
|
4
|
+
require 'bundler'
|
5
|
+
|
6
|
+
Bundler::GemHelper.install_tasks
|
7
|
+
|
8
|
+
Rake::TestTask.new(:test) do |test|
|
9
|
+
test.ruby_opts = ["-rubygems"] if defined? Gem
|
10
|
+
test.libs << "lib" << "test"
|
11
|
+
test.pattern = "test/**/*_test.rb"
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => :test
|
data/faraday_middleware.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.add_development_dependency('rake', '~> 0.8')
|
10
10
|
s.add_development_dependency('shoulda', '~> 2.11')
|
11
11
|
s.add_development_dependency('test-unit', '~> 2.1')
|
12
|
-
s.add_runtime_dependency('faraday', '~> 0.5.
|
12
|
+
s.add_runtime_dependency('faraday', '~> 0.5.2')
|
13
13
|
s.authors = ["Wynn Netherland"]
|
14
14
|
s.description = %q{Various middleware for Faraday}
|
15
15
|
s.email = ['wynn.netherland@gmail.com']
|
data/lib/faraday/parse.rb
CHANGED
@@ -10,7 +10,7 @@ module Faraday
|
|
10
10
|
def self.register_on_complete(env)
|
11
11
|
env[:response].on_complete do |response|
|
12
12
|
response[:body] = begin
|
13
|
-
case response[:response_headers]
|
13
|
+
case response[:response_headers].values_at('content-type', 'Content-Type').first
|
14
14
|
when /application\/json/
|
15
15
|
parse_json(response[:body])
|
16
16
|
when /application\/xml/
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday_middleware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wynn Netherland
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-29 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -146,12 +146,12 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - ~>
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
hash:
|
149
|
+
hash: 15
|
150
150
|
segments:
|
151
151
|
- 0
|
152
152
|
- 5
|
153
|
-
-
|
154
|
-
version: 0.5.
|
153
|
+
- 2
|
154
|
+
version: 0.5.2
|
155
155
|
type: :runtime
|
156
156
|
version_requirements: *id009
|
157
157
|
description: Various middleware for Faraday
|