bonsai_client 0.2.0 → 0.2.1
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/CHANGELOG.md +3 -1
- data/NOTES.local.md +19 -0
- data/README.md +16 -1
- data/bonsai_client.gemspec +3 -5
- data/lib/bonsai_client/version.rb +1 -1
- metadata +2 -10
- data/.gitignore +0 -60
- data/.gitlab-ci.yml +0 -10
- data/.travis.yml +0 -7
- data/.yardopts +0 -4
- data/Gemfile +0 -11
- data/Rakefile +0 -137
- data/bonsai.png +0 -0
- data/test-data/.keep +0 -0
- data/test-data/sample.jpg +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9668b5ab1fa6bb1942f0c385aa7134f6851dfb8
|
|
4
|
+
data.tar.gz: 56e7ee83b952650f9a2e5def23c60f46297b0138
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99a0944c2083f5101e528ac631b6cbd34e5b8452cb90f7a988aa62d81d76a95071a1889403634f87dc467727d21b10dc1a523a3b3114ab061aed07a288b89d77
|
|
7
|
+
data.tar.gz: 0aef701bcaf2aca75d3f87fdff55d978674ffe1da23941cea71fd221ae6ff5f52c2d2a6680e12ac7b21f66d3d143d23558a18372d57db2409c798e136b083c90
|
data/CHANGELOG.md
CHANGED
data/NOTES.local.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Notes (local)
|
|
2
|
+
|
|
3
|
+
https://bonsai-dev.sm-editorial.net/
|
|
4
|
+
|
|
5
|
+
/api/client/test/upload
|
|
6
|
+
|
|
7
|
+
http://bonsai-dev.sm-editorial.net
|
|
8
|
+
|
|
9
|
+
/api/thumbnail/checksum/4a20763f7203408c6c0c42d1ab47fd1bae754746
|
|
10
|
+
|
|
11
|
+
file:
|
|
12
|
+
|
|
13
|
+
bonsai_client upload --url=https://bonsai-dev.sm-editorial.net --path=test-data/sample.jpg --client-id=test
|
|
14
|
+
|
|
15
|
+
## Reunión
|
|
16
|
+
|
|
17
|
+
- BonsaiClient
|
|
18
|
+
- Repasar API
|
|
19
|
+
- ¿Qué pasa cuando se envía un fichero dos veces?
|
data/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|

|
|
7
7
|
|
|
8
|
+
Client for Bonsai server.
|
|
9
|
+
|
|
8
10
|
### NOTE
|
|
9
11
|
|
|
10
12
|
This gem is at an early stage of development. Please do not use it already.
|
|
@@ -16,6 +18,13 @@ This gem is at an early stage of development. Please do not use it already.
|
|
|
16
18
|
gem install bonsai_client
|
|
17
19
|
```
|
|
18
20
|
|
|
21
|
+
Note: If you're using `rbenv` and there is no bonsai_client command after installing the gem try:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
rm /Users/user-name/.rbenv/shims/.rbenv-shim
|
|
25
|
+
rbenv rehash
|
|
26
|
+
```
|
|
27
|
+
|
|
19
28
|
## Usage in shell
|
|
20
29
|
|
|
21
30
|
Upload a file:
|
|
@@ -59,12 +68,18 @@ Create a new version:
|
|
|
59
68
|
rake release
|
|
60
69
|
```
|
|
61
70
|
|
|
62
|
-
Push commits to git repositories (GitLab and GitHub)
|
|
71
|
+
Push commits to git repositories (GitLab and GitHub):
|
|
63
72
|
|
|
64
73
|
```bash
|
|
65
74
|
rake push
|
|
66
75
|
```
|
|
67
76
|
|
|
77
|
+
Build gem file into pkg folder:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
rake build
|
|
81
|
+
```
|
|
82
|
+
|
|
68
83
|
Publish the current gem version to Rubygems:
|
|
69
84
|
|
|
70
85
|
```bash
|
data/bonsai_client.gemspec
CHANGED
|
@@ -15,11 +15,9 @@ Gem::Specification.new do |s|
|
|
|
15
15
|
s.licenses = ['MIT']
|
|
16
16
|
s.homepage = 'https://gitlab.com/galfuslab/bonsai-client'
|
|
17
17
|
all_files = `git ls-files -z`.split("\x0")
|
|
18
|
-
s.files =
|
|
19
|
-
|
|
20
|
-
s.
|
|
21
|
-
s.bindir = 'bin'
|
|
22
|
-
s.require_paths = ['lib']
|
|
18
|
+
s.files = %w(bonsai_client.gemspec) + Dir["*.md", "bin/*", "lib/**/*.rb"]
|
|
19
|
+
s.executables = %w(bonsai_client)
|
|
20
|
+
s.require_paths = %w(lib)
|
|
23
21
|
s.add_runtime_dependency 'rest-client', '~> 2.0'
|
|
24
22
|
s.add_runtime_dependency 'thor', '~> 0.19'
|
|
25
23
|
s.add_development_dependency 'bundler', "~> 1.12"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bonsai_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Manu
|
|
@@ -88,24 +88,16 @@ executables:
|
|
|
88
88
|
extensions: []
|
|
89
89
|
extra_rdoc_files: []
|
|
90
90
|
files:
|
|
91
|
-
- ".gitignore"
|
|
92
|
-
- ".gitlab-ci.yml"
|
|
93
|
-
- ".travis.yml"
|
|
94
|
-
- ".yardopts"
|
|
95
91
|
- CHANGELOG.md
|
|
96
|
-
-
|
|
92
|
+
- NOTES.local.md
|
|
97
93
|
- README.md
|
|
98
|
-
- Rakefile
|
|
99
94
|
- bin/bonsai_client
|
|
100
95
|
- bin/console
|
|
101
96
|
- bin/setup
|
|
102
|
-
- bonsai.png
|
|
103
97
|
- bonsai_client.gemspec
|
|
104
98
|
- lib/bonsai_client.rb
|
|
105
99
|
- lib/bonsai_client/client.rb
|
|
106
100
|
- lib/bonsai_client/version.rb
|
|
107
|
-
- test-data/.keep
|
|
108
|
-
- test-data/sample.jpg
|
|
109
101
|
homepage: https://gitlab.com/galfuslab/bonsai-client
|
|
110
102
|
licenses:
|
|
111
103
|
- MIT
|
data/.gitignore
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Local files
|
|
3
|
-
NOTES.local.md
|
|
4
|
-
|
|
5
|
-
# Specific environment configuration
|
|
6
|
-
/config/environments/*
|
|
7
|
-
!/config/environments/.keep
|
|
8
|
-
|
|
9
|
-
# Custom
|
|
10
|
-
*.gem
|
|
11
|
-
|
|
12
|
-
# Ensure empty folders
|
|
13
|
-
/doc/*
|
|
14
|
-
!/doc/.keep
|
|
15
|
-
|
|
16
|
-
/pkg/*
|
|
17
|
-
!/pkg/.keep
|
|
18
|
-
|
|
19
|
-
/tmp/*
|
|
20
|
-
!/tmp/.keep
|
|
21
|
-
|
|
22
|
-
# Generated by gem bundle
|
|
23
|
-
/.bundle/
|
|
24
|
-
/.yardoc
|
|
25
|
-
/Gemfile.lock
|
|
26
|
-
/_yardoc/
|
|
27
|
-
/coverage/
|
|
28
|
-
# /doc
|
|
29
|
-
# /pkg
|
|
30
|
-
# /tmp
|
|
31
|
-
/spec/reports/
|
|
32
|
-
|
|
33
|
-
# Assets generators
|
|
34
|
-
.sass-cache
|
|
35
|
-
|
|
36
|
-
# Mac finder artifacts
|
|
37
|
-
.com.apple.timemachine.supported
|
|
38
|
-
.DS_Store
|
|
39
|
-
.DS_Store?
|
|
40
|
-
._*
|
|
41
|
-
.Spotlight-V100
|
|
42
|
-
.Trashes
|
|
43
|
-
ehthumbs.db
|
|
44
|
-
Thumbs.db
|
|
45
|
-
|
|
46
|
-
# Linux artifacts
|
|
47
|
-
*~
|
|
48
|
-
|
|
49
|
-
# Netbeans project directory
|
|
50
|
-
/nbproject/
|
|
51
|
-
|
|
52
|
-
# Intellij files
|
|
53
|
-
.idea
|
|
54
|
-
|
|
55
|
-
# Textmate project files
|
|
56
|
-
/*.tmproj
|
|
57
|
-
|
|
58
|
-
# vim artifacts
|
|
59
|
-
**.swp
|
|
60
|
-
|
data/.gitlab-ci.yml
DELETED
data/.travis.yml
DELETED
data/.yardopts
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
require "rake/testtask"
|
|
2
|
-
require_relative "lib/bonsai_client/version"
|
|
3
|
-
|
|
4
|
-
def name
|
|
5
|
-
BonsaiClient::NAME
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def version
|
|
9
|
-
BonsaiClient::VERSION
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def gemspec_file
|
|
13
|
-
"#{name}.gemspec"
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def gem_file
|
|
17
|
-
"#{name}-#{version}.gem"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def show_text(text)
|
|
21
|
-
puts ''
|
|
22
|
-
puts '================================================='
|
|
23
|
-
puts text
|
|
24
|
-
puts '================================================='
|
|
25
|
-
puts ''
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def show_error_and_exit!(text)
|
|
29
|
-
show_text("ERROR: #{text}.")
|
|
30
|
-
exit!
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def show_release
|
|
34
|
-
show_text("#{gem_file} released.")
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def read_changelog
|
|
38
|
-
`head -20 CHANGELOG.md`.to_s
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def current_branch
|
|
42
|
-
r = `git branch`.to_s.strip
|
|
43
|
-
if r.include? "master"
|
|
44
|
-
'master'
|
|
45
|
-
else
|
|
46
|
-
'other'
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def git_status
|
|
51
|
-
r = `git status`.to_s
|
|
52
|
-
if r.include? "nothing to commit"
|
|
53
|
-
'clean'
|
|
54
|
-
else
|
|
55
|
-
'not_clean'
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def ask_for_confirmation
|
|
60
|
-
puts "Are you sure you want to release version #{version}? [yN]"
|
|
61
|
-
STDIN.gets.chomp.upcase
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
Rake::TestTask.new do |t|
|
|
65
|
-
t.libs << 'test'
|
|
66
|
-
t.pattern = 'test/**/*_test.rb'
|
|
67
|
-
t.warning = false
|
|
68
|
-
t.verbose = false
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
task :default => :test
|
|
72
|
-
|
|
73
|
-
desc "Push code to the remote respositories"
|
|
74
|
-
task :push do
|
|
75
|
-
show_text ">> Pushing code to GitLab y GitHub"
|
|
76
|
-
puts ""
|
|
77
|
-
sh "git push origin master"
|
|
78
|
-
puts ""
|
|
79
|
-
sh "git push github master"
|
|
80
|
-
puts ""
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
desc "Release #{gem_file} (only repository, not RubyGems)"
|
|
84
|
-
task :release => :build do
|
|
85
|
-
show_text ">> Releasing #{gem_file}"
|
|
86
|
-
if current_branch != 'master'
|
|
87
|
-
msg = "You must be on the master branch to release!"
|
|
88
|
-
show_error_and_exit! msg
|
|
89
|
-
end
|
|
90
|
-
if git_status != 'clean'
|
|
91
|
-
msg = "There are still files left to commit"
|
|
92
|
-
show_error_and_exit! msg
|
|
93
|
-
end
|
|
94
|
-
show_text ">> Changelog file"
|
|
95
|
-
puts read_changelog
|
|
96
|
-
show_text ">> Confirmation"
|
|
97
|
-
if ask_for_confirmation != 'Y'
|
|
98
|
-
show_error_and_exit! "Aborting release"
|
|
99
|
-
end
|
|
100
|
-
puts ""
|
|
101
|
-
sh "yardoc"
|
|
102
|
-
puts ""
|
|
103
|
-
sh "git commit --allow-empty -m 'Release #{version}'"
|
|
104
|
-
sh "git tag v#{version}"
|
|
105
|
-
puts ""
|
|
106
|
-
sh "git push origin master"
|
|
107
|
-
puts ""
|
|
108
|
-
sh "git push github master"
|
|
109
|
-
show_release
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
desc "Build #{gem_file} into pkg folder"
|
|
113
|
-
task :build do
|
|
114
|
-
show_text ">> Creating #{gem_file}"
|
|
115
|
-
mkdir_p "pkg"
|
|
116
|
-
sh "gem build #{gemspec_file}"
|
|
117
|
-
sh "mv #{gem_file} pkg"
|
|
118
|
-
puts ""
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
desc "Publish #{gem_file} in RubyGems"
|
|
122
|
-
task :publish do
|
|
123
|
-
show_text ">> Publishing #{gem_file}"
|
|
124
|
-
puts ""
|
|
125
|
-
sh "gem push pkg/#{gem_file}"
|
|
126
|
-
puts ""
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
desc "Show current #{name} version"
|
|
130
|
-
task :version do
|
|
131
|
-
show_text("Version #{version}")
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
data/bonsai.png
DELETED
|
Binary file
|
data/test-data/.keep
DELETED
|
File without changes
|
data/test-data/sample.jpg
DELETED
|
Binary file
|