faraday-cli 0.7.2 → 0.7.3
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.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/VERSION +1 -1
- data/lib/faraday/cli/option/parser.rb +14 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10f23b45623e436e3fd3f1d259dacb9febe5db0e
|
4
|
+
data.tar.gz: 84c772819e2ceb4350bf4b9e450a8d8f364415a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38a73c9a321ac886c0da6e75c9fb40c4178ae7f61f618e47793133e770ecfecdd0f6bce71ac2dc03319e4a673f0a47b32126e4abccc52d66ddb109664e435340
|
7
|
+
data.tar.gz: 8f4baaac0c925b221b3259224e0a019448e196105f6827983f36d7d17e11737ad25ea40fabd24bac4ef1652444b7fd5f1f4e49ad305cd94795088c51e460447b
|
data/README.md
CHANGED
@@ -34,10 +34,13 @@ Usage: faraday-cli [options] <url>
|
|
34
34
|
Pass File upload io in the request pointing to the given file
|
35
35
|
-A, --user-agent STRING Send User-Agent STRING to server (H)
|
36
36
|
-o, --output FILE_PATH Write to FILE instead of stdout
|
37
|
+
-v, --verbose Make the operation more talkative
|
38
|
+
--super-verbose Make the operation even more talkative
|
37
39
|
-s, --silent Silent mode (don't output anything)
|
38
|
-
-
|
40
|
+
-K, --config FILE_PATH File path to the .faraday.rb if you want use other than default
|
39
41
|
-M, --middlewares Show current middleware stack
|
40
|
-
|
42
|
+
-W, --without_middlewares Make request without consuming middleware file(s)
|
43
|
+
|
41
44
|
faraday-cli http://www.google.com -q q=foo
|
42
45
|
faraday-cli http://example.org -d "payload string"
|
43
46
|
```
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.3
|
@@ -19,7 +19,13 @@ class Faraday::CLI::Option::Parser
|
|
19
19
|
end
|
20
20
|
|
21
21
|
o.on('-q', '--query key=value', 'Pass Query key values to use in the request') do |raw_query_pair|
|
22
|
-
|
22
|
+
separator = '='
|
23
|
+
|
24
|
+
parts = raw_query_pair.split(separator)
|
25
|
+
query_key = parts.shift
|
26
|
+
query_value = parts.join(separator)
|
27
|
+
|
28
|
+
options[:params].push([query_key,query_value])
|
23
29
|
end
|
24
30
|
|
25
31
|
o.on('-d', '--data PAYLOAD_STRING', 'HTTP POST data (H)') { |payload| options[:body]= payload }
|
@@ -94,12 +100,13 @@ class Faraday::CLI::Option::Parser
|
|
94
100
|
|
95
101
|
protected
|
96
102
|
|
97
|
-
def merge_defaults(
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
+
def merge_defaults(hash)
|
104
|
+
hash[:flags]= []
|
105
|
+
hash[:params]= []
|
106
|
+
hash[:http_method]= 'get'
|
107
|
+
hash[:http_headers]= []
|
108
|
+
hash[:config_file_paths]= []
|
109
|
+
hash
|
103
110
|
end
|
104
111
|
|
105
112
|
end
|