faraday-stack 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ require 'rake/testtask'
2
+
3
+ task :default => :test
4
+
5
+ Rake::TestTask.new(:test) do |test|
6
+ test.libs << 'lib' << 'test'
7
+ test.pattern = 'test/**/*_test.rb'
8
+ test.verbose = true
9
+ end
@@ -42,7 +42,7 @@ module FaradayStack
42
42
  yield builder if block_given?
43
43
  builder.use ResponseXML, :content_type => /[+\/]xml$/
44
44
  builder.use ResponseHTML, :content_type => 'text/html'
45
- builder.use ResponseJSON, :content_type => /(application|text)\/json/
45
+ builder.use ResponseJSON, :content_type => /[+\/]json$/
46
46
  builder.use ResponseJSON::MimeTypeFix, :content_type => /text\/(plain|javascript)/
47
47
  builder.use FollowRedirects
48
48
  builder.response :raise_error
@@ -52,7 +52,7 @@ module FaradayStack
52
52
  env.each do |name, value|
53
53
  next unless String === name
54
54
  if NonPrefixedHeaders.include? name or name.index('HTTP_') == 0
55
- name = name.sub(/^HTTP_/).downcase.tr('_', '-')
55
+ name = name.sub(/^HTTP_/, '').downcase.tr('_', '-')
56
56
  headers[name] = value
57
57
  end
58
58
  end
@@ -104,8 +104,8 @@ class HttpCachingTest < Test::Unit::TestCase
104
104
  def_delegators :@conn, :get, :post
105
105
 
106
106
  def test_cache_get
107
- assert_equal 'request:1', get('/').body
108
- response = get('/')
107
+ assert_equal 'request:1', get('/', :user_agent => 'test').body
108
+ response = get('/', :user_agent => 'test')
109
109
  assert_equal 'request:1', response.body
110
110
  assert_equal 'text/plain', response['content-type']
111
111
 
metadata CHANGED
@@ -1,37 +1,37 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: faraday-stack
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
4
5
  prerelease:
5
- version: 0.1.3
6
6
  platform: ruby
7
- authors:
8
- - "Mislav Marohni\xC4\x87"
7
+ authors:
8
+ - Mislav Marohnić
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-08 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: faraday
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70099135547180 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "0.6"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0.6'
22
+ - - <
23
+ - !ruby/object:Gem::Version
24
+ version: '0.8'
24
25
  type: :runtime
25
- version_requirements: *id001
26
+ prerelease: false
27
+ version_requirements: *70099135547180
26
28
  description:
27
29
  email: mislav.marohnic@gmail.com
28
30
  executables: []
29
-
30
31
  extensions: []
31
-
32
32
  extra_rdoc_files: []
33
-
34
- files:
33
+ files:
34
+ - Rakefile
35
35
  - lib/faraday-stack.rb
36
36
  - lib/faraday_stack/addressable_patch.rb
37
37
  - lib/faraday_stack/caching.rb
@@ -51,30 +51,27 @@ files:
51
51
  - README.md
52
52
  homepage: https://github.com/mislav/faraday-stack
53
53
  licenses: []
54
-
55
54
  post_install_message:
56
55
  rdoc_options: []
57
-
58
- require_paths:
56
+ require_paths:
59
57
  - lib
60
- required_ruby_version: !ruby/object:Gem::Requirement
58
+ required_ruby_version: !ruby/object:Gem::Requirement
61
59
  none: false
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: "0"
66
- required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
65
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
72
70
  requirements: []
73
-
74
71
  rubyforge_project:
75
- rubygems_version: 1.8.5
72
+ rubygems_version: 1.8.12
76
73
  signing_key:
77
74
  specification_version: 3
78
75
  summary: Great Faraday stack for consuming all kinds of APIs
79
76
  test_files: []
80
-
77
+ has_rdoc: