bonsai_client 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{.travis-template.yml → .travis.yml} +0 -4
- data/CHANGELOG.md +3 -0
- data/README.md +3 -1
- data/Rakefile +2 -0
- data/bin/bonsai_client +30 -0
- data/bonsai.png +0 -0
- data/bonsai_client.gemspec +8 -7
- data/lib/bonsai_client/version.rb +1 -1
- metadata +23 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba60f0ff716237fd1b240786160288914cb23b45
|
4
|
+
data.tar.gz: 9195ceeca2f246ac182439e8b042469247a6ad34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3ba788b871a7df88ea09dd1940268d6bc49c5e511599f8116f5d6429217b5d37a7771a9e035cb98b32e310a50bb4247470bc81350473b96f1da20b8bc27afe
|
7
|
+
data.tar.gz: c9658d994a6925adffdd967b736d1852d9242e59c8b4a350581abc28c2c24198d87cf67b12cd968d242bf0a0ded6df5272e413cbe4d6af4677f03d3fdc36d4f0
|
data/CHANGELOG.md
CHANGED
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
|
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
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
|
data/bonsai_client.gemspec
CHANGED
@@ -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 = [
|
11
|
-
s.email = [
|
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
|
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 =
|
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
|
21
|
-
s.bindir
|
22
|
-
s.require_paths = [
|
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'
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manu
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
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
|
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
|
132
|
+
summary: Client for Bonsai server.
|
116
133
|
test_files: []
|