bsclient 0.1.3 → 0.1.4

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
2
  SHA256:
3
- metadata.gz: fba63b8b9264d8f8fa2cbcf48e9ec8a1c6a40287c415a8830c8adf328ab5c280
4
- data.tar.gz: 0e18b44a05942300eebc44574d839b904d8afa3887d94b4d05cc56726a49dbe5
3
+ metadata.gz: 86ccb61eae2eeb27309f4d744b61673b26d00e51ec4b97646087fb5c87e6b5ff
4
+ data.tar.gz: '0821e30aa4868cb4f6e27f89fbd92fddd9dbb4d0fe0e1999622c7a1988de41c0'
5
5
  SHA512:
6
- metadata.gz: ec26af38a5a8a3c7a0f90bc02cc66f05605d6ab6b9b1c53544954ff004a4e4444dbfdea153bbb12aa21a5a5663f57117f374062418e9346ec0ef7f6a5e4c8651
7
- data.tar.gz: 072f6dfd67cfe92377361d48347cb2e64ee58478e8e365ad01a941d8782004e08833ecb1309af58e1e0cf6b33da7c3780e76a5504ed49c612ac1ab7e2676ff21
6
+ metadata.gz: b8fe5a1c0f08ab0f79fc305e2cc97c917b25e28fd560bcde9e08b729f93e106d07018566ab294effef3abc44e28e9175dfcdbd406f0748ebcc2dbc10c6b25eb6
7
+ data.tar.gz: 67d9a7c51694c60557c5a5a17f0f82e575c15c8a8c80cc103d3054d7d229002e82d61bca91ed11f4cbd6faddff9d34a716c0e638b8f86f3523c6197b5b4b8ef0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bsclient (0.1.3)
4
+ bsclient (0.1.4)
5
5
  faraday
6
6
  pry (~> 0.13.1)
7
7
  pry-byebug (~> 3.9.0)
@@ -12,10 +12,13 @@ GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  byebug (11.1.3)
15
- coderay (1.1.2)
15
+ coderay (1.1.3)
16
16
  diff-lcs (1.3)
17
- faraday (1.0.1)
17
+ faraday (1.3.0)
18
+ faraday-net_http (~> 1.0)
18
19
  multipart-post (>= 1.2, < 3)
20
+ ruby2_keywords
21
+ faraday-net_http (1.0.0)
19
22
  method_source (1.0.0)
20
23
  multipart-post (2.1.1)
21
24
  pry (0.13.1)
@@ -41,8 +44,9 @@ GEM
41
44
  diff-lcs (>= 1.2.0, < 2.0)
42
45
  rspec-support (~> 3.9.0)
43
46
  rspec-support (3.9.3)
47
+ ruby2_keywords (0.0.2)
44
48
  thor (0.20.3)
45
- yard (0.9.25)
49
+ yard (0.9.26)
46
50
 
47
51
  PLATFORMS
48
52
  ruby
@@ -53,4 +57,4 @@ DEPENDENCIES
53
57
  rspec (~> 3.0)
54
58
 
55
59
  BUNDLED WITH
56
- 2.1.2
60
+ 2.2.3
data/lib/bsclient/cli.rb CHANGED
@@ -8,7 +8,7 @@ module BSClient
8
8
  class_option :conf, type: :string, aliases: ['-c'], desc: 'Specify config file'
9
9
  class_option :verbose, type: :boolean, aliases: ['-v'], desc: 'Verbose printing'
10
10
 
11
- desc '', ''
11
+ desc 'register_account(filename = nil)', 'nil means STDIN'
12
12
  def register_account(filename = nil)
13
13
  req_content = if filename
14
14
  IO.read(filename)
@@ -20,27 +20,27 @@ module BSClient
20
20
  print app.register_account(req_content)
21
21
  end
22
22
 
23
- desc '', ''
23
+ desc 'query_registration(task_id, account)', ''
24
24
  def query_registration(task_id, account)
25
25
  app = App.new(options, Config.create(options[:env]))
26
26
  print app.query_registration(task_id, account)
27
27
  end
28
28
 
29
- desc '', ''
29
+ desc 'create_user_image(account, text, size="30", color="red")', ''
30
30
  def create_user_image(account, text, size="30", color="red")
31
31
  req_content = {account: account, text: text, fontSize: size, fontColor: color}.to_json
32
32
  app = App.new(options, Config.create(options[:env]))
33
33
  print app.create_user_image(req_content)
34
34
  end
35
35
 
36
- desc '', ''
36
+ desc 'download_user_image(account)', ''
37
37
  def download_user_image(account)
38
38
  params = {account: account, imageName: ''}
39
39
  app = App.new(options, Config.create(options[:env]))
40
40
  print app.download_user_image(params)
41
41
  end
42
42
 
43
- desc '', ''
43
+ desc 'get(url, *raw_params)', 'bsclient get <url> name=Jack age=10'
44
44
  def get(url, *raw_params)
45
45
  params = raw_params.each_with_object({}) do |param, h|
46
46
  k, v = param.split('=')
@@ -50,7 +50,7 @@ module BSClient
50
50
  print app.get(url, params)
51
51
  end
52
52
 
53
- desc '', ''
53
+ desc 'post(url, *args)', 'bsclient post <url> name=Jack age=10; bsclient post <url> myfile.json; cat myfile.json | bsclient post <url>'
54
54
  def post(url, *args)
55
55
  if not STDIN.isatty
56
56
  params = JSON.parse(STDIN.read)
@@ -9,6 +9,7 @@ module BSClient
9
9
  file ||= File.expand_path('~/.bsclient.yml')
10
10
  yaml = YAML.load(File.read(file)) || {}
11
11
  conf = yaml[env] || {}
12
+ require 'pry'; binding.pry;
12
13
  new(OpenStruct.new(conf))
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module BSClient
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
4
+ version: 0.1.4
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-09-15 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.1.2
132
+ rubygems_version: 3.2.3
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Register bs account