gitcloudcli 1.0.6 → 1.0.7

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
  SHA256:
3
- metadata.gz: f768392834a2c10bc549964094fdec7185205f55e880a57085b4d114dd247267
4
- data.tar.gz: 459391d11ced66c7ba7308836e5fa1ff380695658b2dbacebce6b483e4051a30
3
+ metadata.gz: f2d4b246bb89a0f262e46b5f88de3415fa7a665f8e6eb83ba21effe9b17f2081
4
+ data.tar.gz: 8d726efe08efb9ab318715fb22bf118417f59ee4e47c8c16239b5f06107d595f
5
5
  SHA512:
6
- metadata.gz: b669302827991060d160d307dfa25efa24f9dd1a09984853d5dd989fa9627ce875fbee66d079dbf4b74f36c476949ef2d9cacb6b17e2b71caecae89076e7a138
7
- data.tar.gz: 862d2f000b3f31ae95b90de57d8d991358e3afdf5ab0bd7d38139b9b2be7412dc6896b8550c5dd2b5c2a1c6f580c4952622b42a08ac0c0a6de9f8ae04c7eee79
6
+ metadata.gz: ace6982ed7744e04aeb24fcd1eb58524f282deac5581863fab3d3439b4323e8f522d80c303d2b72a2306fd87b216c65558bc51afda6cb4c3c7bab63afeb5c160
7
+ data.tar.gz: f6b9d4137cf4d9fcabce420884c47336a61690cf9a4a503e50ae0cbe97cc051e2cc54ba066203b07449ea86919df39d9a15406f11f35d3b71d12df60e4dffde9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitcloudcli (1.0.5)
4
+ gitcloudcli (1.0.6)
5
5
  thor
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,43 +1,36 @@
1
1
  # Gitcloudcli
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gitcloudcli`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Use Gitcloudcli to operate files in git
6
4
 
7
5
  ## Installation
8
6
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'gitcloudcli'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
7
  $ gem install gitcloudcli
22
8
 
23
9
  ## Usage
24
10
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gitcloudcli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
11
+ First. Create access token for command line
12
+ ##### Github
13
+ [click here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
14
+ ##### Gitee(oschina)
15
+ gitcloudcli will support
16
+ in future
17
+ ##### Gitlab
18
+ gitcloudcli will support
19
+ in future
20
+
21
+ Second. Add token, repo and spacename to gitcloud
22
+ ```cassandraql
23
+ gitcloud space add Github *****.git ****c958
24
+ ```
42
25
 
43
- Everyone interacting in the Gitcloudcli project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/gitcloudcli/blob/master/CODE_OF_CONDUCT.md).
26
+ Third. Use gitcloud to use this tool
27
+ ```cassandraql
28
+ Commands:
29
+ gitcloud --version, -v # print the version
30
+ gitcloud delete PATH # 删除远端文件
31
+ gitcloud help [COMMAND] # Describe available commands or one specific command
32
+ gitcloud info PATH # 展示远端文件信息
33
+ gitcloud list # 展示远端根目录所有文件信息
34
+ gitcloud space [COMMAND] # 增加,删除,列出当前可操作的Git空间
35
+ gitcloud upload LOCALPATH # 上传本地文件
36
+ ```
data/gitcloudcli.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["zhangheng"]
10
10
  spec.email = ["onethousandpiece@126.com"]
11
11
 
12
- spec.summary = "Git场库文件操作"
13
- spec.description = "Git场库文件操作。增删改查操作"
12
+ spec.summary = "git repo's cli"
13
+ spec.description = "git repo's cli that can create, delete files and other operations"
14
14
  spec.homepage = "https://github.com/monkeyheng/GitCloudCLI"
15
15
  spec.license = "MIT"
16
16
 
data/lib/gitcloudcli.rb CHANGED
@@ -7,39 +7,39 @@ require "thor"
7
7
  module Gitcloudcli
8
8
  # 命令行入口
9
9
  class Cli < Thor
10
- desc "list", "展示远端根目录所有文件信息"
11
- option :space, :desc=>"需要查询的空间"
12
- option :dir, :desc=>"空间路径"
13
- option :infos, :desc=>"输出入的文件信息关键字", :type=>:array
10
+ desc "list", "show all files in the remote"
11
+ option :space, :desc=>"git space name"
12
+ option :dir, :desc=>"the dir of files that need show"
13
+ option :infos, :desc=>"the key of this file infos that printed", :type=>:array
14
14
  def list()
15
15
  Gitcloudcli.gitadapter(options[:space]) do |git|
16
16
  git.list(options[:dir], options[:infos])
17
17
  end
18
18
  end
19
19
 
20
- desc "info PATH", "展示远端文件信息"
21
- option :space, :desc=>"需要查询的空间"
22
- option :infos, :desc=>"输出入的文件信息关键字", :type=>:array
20
+ desc "info PATH", "get the remote file infos"
21
+ option :space, :desc=>"git space name"
22
+ option :infos, :desc=>"the key of this file infos that printed", :type=>:array
23
23
  def info(path)
24
24
  Gitcloudcli.gitadapter(options[:space]) do |git|
25
25
  git.info(path, options[:infos])
26
26
  end
27
27
  end
28
28
 
29
- desc "upload LOCALPATH", "上传本地文件"
30
- option :space, :desc=>"需要查询的空间"
31
- option :path, :desc=>"上传的远端路径 example:dirname/filename or filename"
32
- option :message, :desc=>"本次操作的commit信息"
33
- option :infos, :desc=>"输出入的文件信息关键字", :type=>:array
29
+ desc "upload LOCALPATH", "upload local file"
30
+ option :space, :desc=>"git space name"
31
+ option :path, :desc=>"upload path. example:dirname/filename or filename"
32
+ option :message, :desc=>"commit info for this operation"
33
+ option :infos, :desc=>"the key of this file infos that printed", :type=>:array
34
34
  def upload(local_path)
35
35
  Gitcloudcli.gitadapter(options[:space]) do |git|
36
36
  git.upload(local_path, options[:path], options[:message], options[:infos])
37
37
  end
38
38
  end
39
39
 
40
- desc "delete PATH", "删除远端文件"
41
- option :space, :desc=>"需要查询的空间"
42
- option :message, :desc=>"本次操作的commit信息"
40
+ desc "delete PATH", "delete file"
41
+ option :space, :desc=>"git space name"
42
+ option :message, :desc=>"commit info for this operation"
43
43
  def delete(path)
44
44
  Gitcloudcli.gitadapter(options[:space]) do |git|
45
45
  git.delete(path, options[:message])
@@ -52,7 +52,7 @@ module Gitcloudcli
52
52
  puts Gitcloudcli::VERSION
53
53
  end
54
54
 
55
- desc "space [COMMAND]", "增加,删除,列出当前可操作的Git空间"
55
+ desc "space [COMMAND]", "manage git space"
56
56
  subcommand "space", Gitcloudcli::CloudSpace
57
57
  end
58
58
  end
@@ -43,7 +43,7 @@ module Gitcloudcli
43
43
  break
44
44
  end
45
45
  else
46
- puts "space为空,默认使用#{key}"
46
+ puts "SPACE is null,use default #{key}"
47
47
  remote = value["remote"]
48
48
  token = value["token"]
49
49
  break
@@ -54,10 +54,10 @@ module Gitcloudcli
54
54
  if remote.to_s.include? "github.com"
55
55
  yield Gitcloudcli::Github.new(remote, token)
56
56
  else
57
- puts "#{space} #{remote} 不支持"
57
+ puts "#{space} #{remote} not supported"
58
58
  end
59
59
  else
60
- puts "未找到空间"
60
+ puts "git space is empty"
61
61
  end
62
62
  end
63
63
 
@@ -4,7 +4,7 @@ require "gitcloudcli/command/config"
4
4
  module Gitcloudcli
5
5
  # 空间操作
6
6
  class CloudSpace < Thor
7
- desc "list", "列出当前的Git空间"
7
+ desc "list", "show current git spaces"
8
8
  def list
9
9
  configs = Gitcloudcli.configHash
10
10
  configs.each do |key|
@@ -12,11 +12,11 @@ module Gitcloudcli
12
12
  end
13
13
  end
14
14
 
15
- desc "add NAME URL TOKEN", "添加Git空间"
15
+ desc "add NAME URL TOKEN", "add git space"
16
16
  def add(name, url, token)
17
17
  configs = Gitcloudcli.configHash
18
18
  if configs[name]
19
- puts "#{name} 已经存在"
19
+ puts "#{name} existed"
20
20
  return
21
21
  end
22
22
  configs[name] = {
@@ -26,11 +26,11 @@ module Gitcloudcli
26
26
  Gitcloudcli.configCover(configs)
27
27
  end
28
28
 
29
- desc "remove NAME", "删除Git空间"
29
+ desc "remove NAME", "delete git space"
30
30
  def remove(name)
31
31
  configs = Gitcloudcli.configHash
32
32
  if !configs[name]
33
- puts "#{name} 不存在"
33
+ puts "#{name} does not exist"
34
34
  return
35
35
  end
36
36
  configs.delete(name)
@@ -1,3 +1,3 @@
1
1
  module Gitcloudcli
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitcloudcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhangheng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-13 00:00:00.000000000 Z
11
+ date: 2018-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Git场库文件操作。增删改查操作
55
+ description: git repo's cli that can create, delete files and other operations
56
56
  email:
57
57
  - onethousandpiece@126.com
58
58
  executables:
@@ -102,5 +102,5 @@ rubyforge_project:
102
102
  rubygems_version: 2.7.8
103
103
  signing_key:
104
104
  specification_version: 4
105
- summary: Git场库文件操作
105
+ summary: git repo's cli
106
106
  test_files: []