faraday-cookie_jar 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a8195f07090b241910a6e10b5507219a4e1b0bb0
4
- data.tar.gz: cfdbddb3fd497aa3e1afc96b9d0987e0817d2459
2
+ SHA256:
3
+ metadata.gz: 6518c4004a5c37f4781930223b709a9331c28f09d78926a99caf6d6d2d7a7231
4
+ data.tar.gz: e07f34c4acfd740cad6668390a22b5a02fcae9ce70b15d7498b66a11ab1425ea
5
5
  SHA512:
6
- metadata.gz: b97438bab250cb4ce8a6f3d03f0df750adfa3bd5b82ced61bf50dd52d995967c875e9eec207d50826833d4f5a6c218e86b8b72b0d159acb819f0ee2c24c66bf4
7
- data.tar.gz: 93c1ee9c3fa64a9491a442028ee2ce1f12921722419613b43bd4481b61920bdab81e19087f591e67afea1ed74c5a80ab5a3f823f8d3c4584aa3b2ef378d6a140
6
+ metadata.gz: 6397a74a2f902fbcaaffa2637aa14950f228d9154a6fc0fcdcdd6a843f39b285dec03cb2ab479d348b92ffe50c36bf101261725c0ed196f22425aa6eeec336f4
7
+ data.tar.gz: 5f81657bcc13538f3686041e90f77571a38f66a4d8893f630422bbd3d0c90c838673277ccd575bb371f1e0c5b0a4f14e82ca4ca0afdb448492241720121a5377
@@ -1,3 +1,8 @@
1
+ ## 0.0.7 Tue Sep 1 20:25:00 PDT 2020
2
+
3
+ - Avoid loading Faraday by assuming Faraday registry API (chesterbr)
4
+ - To support change above, require Faraday 0.8 as a minimum (chesterbr)
5
+
1
6
  ## 0.0.6 Tue Jan 21 16:34:35 PST 2014
2
7
 
3
8
  - Support Faraday 0.9 registry API (cameron-martin)
@@ -23,4 +28,4 @@
23
28
 
24
29
  ## 0.0.1
25
30
 
26
- - Initial release
31
+ - Initial release
data/README.md CHANGED
@@ -27,6 +27,7 @@ require 'faraday-cookie_jar'
27
27
 
28
28
  conn = Faraday.new(:url => "http://example.com") do |builder|
29
29
  builder.use :cookie_jar
30
+ builder.adapter Faraday.default_adapter
30
31
  end
31
32
 
32
33
  conn.get "/foo" # gets cookie
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "faraday", ">= 0.7.4"
21
+ spec.add_dependency "faraday", ">= 0.8.0"
22
22
  spec.add_dependency "http-cookie", "~> 1.0.0"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake"
26
- spec.add_development_dependency "rspec"
26
+ spec.add_development_dependency "rspec", "~> 3.2"
27
27
  spec.add_development_dependency "sinatra"
28
28
  spec.add_development_dependency "sham_rack"
29
29
  end
@@ -13,7 +13,9 @@ module Faraday
13
13
  unless cookies.empty?
14
14
  cookie_value = HTTP::Cookie.cookie_value(cookies)
15
15
  if env[:request_headers]["Cookie"]
16
- env[:request_headers]["Cookie"] = cookie_value + ';' + env[:request_headers]["Cookie"]
16
+ unless env[:request_headers]["Cookie"] == cookie_value
17
+ env[:request_headers]["Cookie"] = cookie_value + ';' + env[:request_headers]["Cookie"]
18
+ end
17
19
  else
18
20
  env[:request_headers]["Cookie"] = cookie_value
19
21
  end
@@ -30,8 +32,6 @@ module Faraday
30
32
  end
31
33
  end
32
34
 
33
- if Faraday.respond_to? :register_middleware
34
- Faraday.register_middleware :cookie_jar => lambda { Faraday::CookieJar }
35
- elsif Faraday::Middleware.respond_to? :register_middleware
35
+ if Faraday::Middleware.respond_to? :register_middleware
36
36
  Faraday::Middleware.register_middleware :cookie_jar => Faraday::CookieJar
37
- end
37
+ end
@@ -1,5 +1,5 @@
1
1
  module Faraday
2
2
  module CookieJarVersion
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -35,7 +35,7 @@ describe Faraday::CookieJar do
35
35
 
36
36
  conn_with_jar.get('/default')
37
37
 
38
- expect(cookie_jar.empty?).to be_false
38
+ expect(cookie_jar.empty?).to be false
39
39
 
40
40
  end
41
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-cookie_jar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuhiko Miyagawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2020-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.4
19
+ version: 0.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.4
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: http-cookie
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '3.2'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '3.2'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sinatra
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -147,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubyforge_project:
151
- rubygems_version: 2.1.11
150
+ rubygems_version: 3.0.3
152
151
  signing_key:
153
152
  specification_version: 4
154
153
  summary: Manages client-side cookie jar for Faraday HTTP client