faraday_curl 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/faraday-curl.gemspec +3 -3
- data/lib/faraday/curl/middleware.rb +1 -1
- data/lib/faraday/curl/version.rb +1 -1
- data/spec/curl_spec.rb +7 -3
- data/spec/spec_helper.rb +0 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dd96cd8a7f038748310e83a6f0f8069e70966b1
|
4
|
+
data.tar.gz: 491e397400dcf971e73d71ad5f5a117184588905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d51d9e66a8b1e14fc2f84d435c1a2bf10c5d9c1fe97fda6ca342978729899385ba47814116f7bc8f7619fc9b96d6ccfdc36d5ebc65f0f1ff60e1066afc97459
|
7
|
+
data.tar.gz: e7aff552646371e4db4b3c00741443d373e100f53ced5188a5ea5d26c66995df23e958f23b3f6e25dbc967d499d9f10118e4eb2197cd2cf13dbf1bb425ad54a7
|
data/faraday-curl.gemspec
CHANGED
@@ -18,10 +18,10 @@ 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.
|
21
|
+
spec.add_dependency "faraday", ">= 0.9.0"
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler", "~> 1.
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
spec.add_development_dependency 'rspec'
|
26
|
-
spec.add_development_dependency 'faraday_middleware'
|
26
|
+
spec.add_development_dependency 'faraday_middleware', ">= 0.9.0"
|
27
27
|
end
|
data/lib/faraday/curl/version.rb
CHANGED
data/spec/curl_spec.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require '
|
2
|
+
require 'faraday'
|
3
3
|
require 'faraday_middleware'
|
4
|
+
require 'faraday_curl'
|
5
|
+
require 'faraday/request/url_encoded'
|
6
|
+
|
7
|
+
Faraday::Request.register_middleware( :url_encoded => Faraday::Request::UrlEncoded )
|
4
8
|
|
5
9
|
describe Faraday::Curl::Middleware do
|
6
10
|
|
7
|
-
let(:version) { "-H 'User-Agent: Faraday v0.
|
11
|
+
let(:version) { "-H 'User-Agent: Faraday v0.9.0'" }
|
8
12
|
|
9
13
|
def create_connection( *request_middlewares )
|
10
14
|
Faraday.new( :url => 'http://example.com' ) do |b|
|
@@ -42,7 +46,7 @@ describe Faraday::Curl::Middleware do
|
|
42
46
|
it 'should render the URL encoded params for the POST request' do
|
43
47
|
connection = create_connection :url_encoded
|
44
48
|
response = connection.put( "/echo", :name => ['john', 'doe'], :age => 50 )
|
45
|
-
match_command(response, "PUT", "-H 'Content-Type: application/x-www-form-urlencoded'", "-d 'name%5B%5D=john&name%5B%5D=doe
|
49
|
+
match_command(response, "PUT", "-H 'Content-Type: application/x-www-form-urlencoded'", "-d 'age=50&name%5B%5D=john&name%5B%5D=doe'", '"http://example.com/echo"')
|
46
50
|
end
|
47
51
|
|
48
52
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
RSpec.configure do |config|
|
8
8
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
9
9
|
config.run_all_when_everything_filtered = true
|
10
|
-
config.filter_run :focus
|
11
10
|
|
12
11
|
# Run specs in random order to surface order dependencies. If you find an
|
13
12
|
# order dependency and want to debug it, you can fix the order by providing
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday_curl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maurício Linhares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.9.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.
|
26
|
+
version: 0.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.6'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.9.0
|
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:
|
82
|
+
version: 0.9.0
|
83
83
|
description: Prints CURL compatible commands for the HTTP requests you're making
|
84
84
|
email:
|
85
85
|
- mauricio.linhares@gmail.com
|