bsclient 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bsclient/cli.rb +28 -0
- data/lib/bsclient/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fba63b8b9264d8f8fa2cbcf48e9ec8a1c6a40287c415a8830c8adf328ab5c280
|
4
|
+
data.tar.gz: 0e18b44a05942300eebc44574d839b904d8afa3887d94b4d05cc56726a49dbe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec26af38a5a8a3c7a0f90bc02cc66f05605d6ab6b9b1c53544954ff004a4e4444dbfdea153bbb12aa21a5a5663f57117f374062418e9346ec0ef7f6a5e4c8651
|
7
|
+
data.tar.gz: 072f6dfd67cfe92377361d48347cb2e64ee58478e8e365ad01a941d8782004e08833ecb1309af58e1e0cf6b33da7c3780e76a5504ed49c612ac1ab7e2676ff21
|
data/Gemfile.lock
CHANGED
data/lib/bsclient/cli.rb
CHANGED
@@ -40,6 +40,34 @@ module BSClient
|
|
40
40
|
print app.download_user_image(params)
|
41
41
|
end
|
42
42
|
|
43
|
+
desc '', ''
|
44
|
+
def get(url, *raw_params)
|
45
|
+
params = raw_params.each_with_object({}) do |param, h|
|
46
|
+
k, v = param.split('=')
|
47
|
+
h[k.to_sym] = v
|
48
|
+
end
|
49
|
+
app = App.new(options, Config.create(options[:env]))
|
50
|
+
print app.get(url, params)
|
51
|
+
end
|
52
|
+
|
53
|
+
desc '', ''
|
54
|
+
def post(url, *args)
|
55
|
+
if not STDIN.isatty
|
56
|
+
params = JSON.parse(STDIN.read)
|
57
|
+
elsif File.exist?(args.first)
|
58
|
+
params = File.read(args.first)
|
59
|
+
else
|
60
|
+
params = args.each_with_object({}) do |param, h|
|
61
|
+
k, v = param.split('=')
|
62
|
+
value = v
|
63
|
+
value = JSON.parse(v[1..-1]) if v[0] == ':'
|
64
|
+
h[k.to_sym] = value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
app = App.new(options, Config.create(options[:env]))
|
68
|
+
print app.post_json(url, params)
|
69
|
+
end
|
70
|
+
|
43
71
|
# desc '', ''
|
44
72
|
# class_option :out, type: :string, aliases: ['-o'], desc: 'Specify output file'
|
45
73
|
# def sign(filename = nil)
|
data/lib/bsclient/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bsclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liu Xiang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|