bonsai_client 0.1.1 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cba822dab0323ad666691294efcea55e72cd543
4
- data.tar.gz: e44e02ab043734bd4f3d37c196d6934c580fc61a
3
+ metadata.gz: ba60f0ff716237fd1b240786160288914cb23b45
4
+ data.tar.gz: 9195ceeca2f246ac182439e8b042469247a6ad34
5
5
  SHA512:
6
- metadata.gz: cac296df7bad1cea1cc1b4ca950f2c255d8306f32b951088dc80b98b09ec874bc630e4744d2a6a1235e61f21942bfbd2b2b44bf672e956468bf4fa8b6570855d
7
- data.tar.gz: 14bcc818aa9c8d25836067355e42f5c569cb2f272c143ca61cf49ed58688574f188e950fde9c2eec3fa05230ccf5a5e7ebaec489c8d385d2f02e3d71207fe2c5
6
+ metadata.gz: dc3ba788b871a7df88ea09dd1940268d6bc49c5e511599f8116f5d6429217b5d37a7771a9e035cb98b32e310a50bb4247470bc81350473b96f1da20b8bc27afe
7
+ data.tar.gz: c9658d994a6925adffdd967b736d1852d9242e59c8b4a350581abc28c2c24198d87cf67b12cd968d242bf0a0ded6df5272e413cbe4d6af4677f03d3fdc36d4f0
@@ -1,11 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.5
5
4
  - 2.4
6
- - 2.3
7
- - 2.2
8
- - 2.1
9
5
  - 2.0
10
6
  branches:
11
7
  only: master
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  ## [Unreleased]
4
4
  * ...
5
5
 
6
+ ## [0.2.0] - 2019-03-03
7
+ * bonsai_client command.
8
+
6
9
  ## [0.1.1] - 2019-03-02
7
10
  * Upload a file.
8
11
  * Documentation.
data/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  # Bonsai Client
5
5
 
6
+ ![Logo of Bonsai](bonsai.png)
7
+
6
8
  ### NOTE
7
9
 
8
10
  This gem is at an early stage of development. Please do not use it already.
@@ -19,7 +21,7 @@ gem install bonsai_client
19
21
  Upload a file:
20
22
 
21
23
  ```bash
22
- bonsai_client upload --url="http://bonsai-server.com" --path="/path/to/file"
24
+ bonsai_client upload --url="http://bonsai-server.com" --path=/path/to/file --client-id=xxx
23
25
  ```
24
26
 
25
27
  ## Usage in ruby code
data/Rakefile CHANGED
@@ -98,6 +98,8 @@ task :release => :build do
98
98
  show_error_and_exit! "Aborting release"
99
99
  end
100
100
  puts ""
101
+ sh "yardoc"
102
+ puts ""
101
103
  sh "git commit --allow-empty -m 'Release #{version}'"
102
104
  sh "git tag v#{version}"
103
105
  puts ""
data/bin/bonsai_client ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
3
+
4
+ require 'bonsai_client'
5
+ require 'thor'
6
+
7
+ module BonsaiClient
8
+ class AppCmdLine < Thor
9
+ desc "upload", "Upload a file to Bonsai server"
10
+ option :url, type: :string, required: true
11
+ option :client_id, type: :string, required: true
12
+ option :path, type: :string, required: true
13
+ long_desc <<-LONGDESC
14
+
15
+ > $ bonsai_client upload --url=http://bonsai-server.com --path=/path/to/file --client_id=test
16
+
17
+ LONGDESC
18
+ def upload
19
+ bonsai = BonsaiClient.create(
20
+ url: options[:url],
21
+ client_id: options[:client_id],
22
+ )
23
+ response = bonsai.upload(path: options[:path])
24
+ puts response.to_json
25
+ end
26
+ end
27
+
28
+ AppCmdLine.start(ARGV)
29
+ end
30
+
data/bonsai.png ADDED
Binary file
@@ -7,20 +7,21 @@ Gem::Specification.new do |s|
7
7
 
8
8
  s.name = BonsaiClient::NAME
9
9
  s.version = BonsaiClient::VERSION
10
- s.authors = ["Manu"]
11
- s.email = ["galfus@gmail.com"]
10
+ s.authors = ['Manu']
11
+ s.email = ['galfus@gmail.com']
12
12
  s.date = Time.now.strftime('%Y-%m-%d')
13
- s.summary = %q{Client for a Bonsai server.}
13
+ s.summary = %q{Client for Bonsai server.}
14
14
  s.description = %q{This gem is at an early stage of development. Please do not use it already.}
15
15
  s.licenses = ['MIT']
16
- s.homepage = "https://gitlab.com/galfuslab/bonsai-client"
16
+ s.homepage = 'https://gitlab.com/galfuslab/bonsai-client'
17
17
  all_files = `git ls-files -z`.split("\x0")
18
18
  s.files = all_files
19
19
  .reject { |f| f.match(%r{^(test|spec|features|doc|tmp|pkg)/}) }
20
- s.executables = all_files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- s.bindir = "exe"
22
- s.require_paths = ["lib"]
20
+ s.executables << 'bonsai_client'
21
+ s.bindir = 'bin'
22
+ s.require_paths = ['lib']
23
23
  s.add_runtime_dependency 'rest-client', '~> 2.0'
24
+ s.add_runtime_dependency 'thor', '~> 0.19'
24
25
  s.add_development_dependency 'bundler', "~> 1.12"
25
26
  s.add_development_dependency "rake", "~> 10.0"
26
27
  s.add_development_dependency 'minitest', '~> 5.0'
@@ -1,4 +1,4 @@
1
1
  module BonsaiClient
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  NAME = 'bonsai_client'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonsai_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manu
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-02 00:00:00.000000000 Z
11
+ date: 2019-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.19'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.19'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -69,20 +83,23 @@ dependencies:
69
83
  description: This gem is at an early stage of development. Please do not use it already.
70
84
  email:
71
85
  - galfus@gmail.com
72
- executables: []
86
+ executables:
87
+ - bonsai_client
73
88
  extensions: []
74
89
  extra_rdoc_files: []
75
90
  files:
76
91
  - ".gitignore"
77
92
  - ".gitlab-ci.yml"
78
- - ".travis-template.yml"
93
+ - ".travis.yml"
79
94
  - ".yardopts"
80
95
  - CHANGELOG.md
81
96
  - Gemfile
82
97
  - README.md
83
98
  - Rakefile
99
+ - bin/bonsai_client
84
100
  - bin/console
85
101
  - bin/setup
102
+ - bonsai.png
86
103
  - bonsai_client.gemspec
87
104
  - lib/bonsai_client.rb
88
105
  - lib/bonsai_client/client.rb
@@ -112,5 +129,5 @@ rubyforge_project:
112
129
  rubygems_version: 2.6.11
113
130
  signing_key:
114
131
  specification_version: 4
115
- summary: Client for a Bonsai server.
132
+ summary: Client for Bonsai server.
116
133
  test_files: []