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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba60f0ff716237fd1b240786160288914cb23b45
4
- data.tar.gz: 9195ceeca2f246ac182439e8b042469247a6ad34
3
+ metadata.gz: d9668b5ab1fa6bb1942f0c385aa7134f6851dfb8
4
+ data.tar.gz: 56e7ee83b952650f9a2e5def23c60f46297b0138
5
5
  SHA512:
6
- metadata.gz: dc3ba788b871a7df88ea09dd1940268d6bc49c5e511599f8116f5d6429217b5d37a7771a9e035cb98b32e310a50bb4247470bc81350473b96f1da20b8bc27afe
7
- data.tar.gz: c9658d994a6925adffdd967b736d1852d9242e59c8b4a350581abc28c2c24198d87cf67b12cd968d242bf0a0ded6df5272e413cbe4d6af4677f03d3fdc36d4f0
6
+ metadata.gz: 99a0944c2083f5101e528ac631b6cbd34e5b8452cb90f7a988aa62d81d76a95071a1889403634f87dc467727d21b10dc1a523a3b3114ab061aed07a288b89d77
7
+ data.tar.gz: 0aef701bcaf2aca75d3f87fdff55d978674ffe1da23941cea71fd221ae6ff5f52c2d2a6680e12ac7b21f66d3d143d23558a18372d57db2409c798e136b083c90
data/CHANGELOG.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Changelog
2
2
 
3
3
  ## [Unreleased]
4
- * ...
4
+
5
+ ## [0.2.1] - 2019-03-03
6
+ * Fix bonsai_client command installation.
5
7
 
6
8
  ## [0.2.0] - 2019-03-03
7
9
  * bonsai_client command.
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
  ![Logo of Bonsai](bonsai.png)
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
@@ -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 = all_files
19
- .reject { |f| f.match(%r{^(test|spec|features|doc|tmp|pkg)/}) }
20
- s.executables << 'bonsai_client'
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"
@@ -1,4 +1,4 @@
1
1
  module BonsaiClient
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  NAME = 'bonsai_client'.freeze
4
4
  end
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.0
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
- - Gemfile
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
@@ -1,10 +0,0 @@
1
- image: "ruby:2.4"
2
-
3
- before_script:
4
- - ruby -v
5
- - gem install bundler --version "~> 1.12" --no-document
6
- - bundle install
7
-
8
- tests:
9
- script:
10
- - rake test
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4
5
- - 2.0
6
- branches:
7
- only: master
data/.yardopts DELETED
@@ -1,4 +0,0 @@
1
-
2
- --markup-provider=redcarpet
3
- --markup=markdown
4
-
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in gtemplate.gemspec
4
- gemspec
5
-
6
- group :test, :development do
7
- gem 'minitest-reporters'
8
- gem 'yard'
9
- gem 'redcarpet'
10
- gem 'github-markup'
11
- end
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