gitlab-cli 0.0.1 → 0.0.2
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/README.md +10 -2
- data/completion/lab.zsh +32 -0
- data/lib/lab/cli.rb +3 -0
- data/lib/lab/subcommands.rb +1 -0
- data/lib/lab/subcommands/repository.rb +3 -3
- data/lib/lab/subcommands/user.rb +33 -0
- data/lib/lab/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 601aa796529431ad49e8d5c1f66db5455ef6afa4
|
4
|
+
data.tar.gz: 26d4f9309f1f02acc9261510ca844ec06f06cddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5921f6bbb54f1387275310df9ef5f04b03febf9ea4d12864317050a32a5c336f42b16cb15a1605b0f205118b77639d2adef6c2f54b513eaa629d54f130cbd65b
|
7
|
+
data.tar.gz: 7c0e71a937b61285a4294a05f1c1723ca130fa53eeb43288d22b457aa9fd0a66838e0d4b737f9f4dc93677140e70fbc21a320e81f6fd0b6f6592d3995c811bbc
|
data/README.md
CHANGED
@@ -4,18 +4,26 @@ Command-line client for GitLab.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
$ gem install
|
7
|
+
$ gem install gitlab-cli
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
11
11
|
$ lab
|
12
12
|
|
13
|
-
# Create a new
|
13
|
+
# Create a new repository
|
14
14
|
$ lab repository create hello-world
|
15
15
|
|
16
16
|
# List repositores
|
17
17
|
$ lab repository list
|
18
18
|
|
19
|
+
# List users
|
20
|
+
$ lab user list
|
21
|
+
|
22
|
+
## Completion
|
23
|
+
|
24
|
+
Lab comes with autocompletion for your favorite shell (as long as your favorite shell
|
25
|
+
is zsh). To install it, copy `completion/lab.zsh` onto your `$FPATH`.
|
26
|
+
|
19
27
|
## Contributing
|
20
28
|
|
21
29
|
1. Fork it
|
data/completion/lab.zsh
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#compdef lab
|
2
|
+
|
3
|
+
local state line cmds
|
4
|
+
|
5
|
+
_arguments -C '1: :->commands' '2: :->subcommands'
|
6
|
+
|
7
|
+
case $state in
|
8
|
+
commands)
|
9
|
+
cmds=(
|
10
|
+
'repository:Manage repositores'
|
11
|
+
'user:Manage users'
|
12
|
+
)
|
13
|
+
_describe -t commands 'lab commands' cmds
|
14
|
+
;;
|
15
|
+
subcommands)
|
16
|
+
case $line[1] in
|
17
|
+
repository)
|
18
|
+
cmds=(
|
19
|
+
'create:Create a new repository'
|
20
|
+
'list:List repositories'
|
21
|
+
)
|
22
|
+
_describe -t commands 'repository commands' cmds
|
23
|
+
;;
|
24
|
+
user)
|
25
|
+
cmds=(
|
26
|
+
'list:List users'
|
27
|
+
)
|
28
|
+
_describe -t commands 'user commands' cmds
|
29
|
+
;;
|
30
|
+
esac
|
31
|
+
;;
|
32
|
+
esac
|
data/lib/lab/cli.rb
CHANGED
data/lib/lab/subcommands.rb
CHANGED
@@ -4,15 +4,15 @@ module Lab
|
|
4
4
|
|
5
5
|
class Repository < Thor
|
6
6
|
|
7
|
-
desc "
|
7
|
+
desc "list", "List repositories"
|
8
8
|
def list
|
9
9
|
Gitlab.projects.each do |project|
|
10
10
|
puts project.name
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
desc "
|
15
|
-
def create
|
14
|
+
desc "create NAME", "Create a new repository"
|
15
|
+
def create name
|
16
16
|
Gitlab.create_project name
|
17
17
|
end
|
18
18
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Lab
|
2
|
+
|
3
|
+
module Subcommands
|
4
|
+
|
5
|
+
class User < Thor
|
6
|
+
|
7
|
+
desc "list", "List users"
|
8
|
+
def list
|
9
|
+
Gitlab.users.each do |user|
|
10
|
+
puts user.name
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# TODO: The Gitlab API client is not compatible with
|
15
|
+
# creating new users in the latest version of the API.
|
16
|
+
#
|
17
|
+
# We should fix that.
|
18
|
+
#
|
19
|
+
#desc "create EMAIL PASSWORD", "Create a new user"
|
20
|
+
#method_option :name
|
21
|
+
#method_option :skype
|
22
|
+
#method_option :linkedin
|
23
|
+
#method_option :twitter
|
24
|
+
#method_option :projects_limit
|
25
|
+
#def create email, password
|
26
|
+
#
|
27
|
+
#end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
data/lib/lab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Gorset
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -80,11 +80,13 @@ files:
|
|
80
80
|
- README.md
|
81
81
|
- Rakefile
|
82
82
|
- bin/lab
|
83
|
+
- completion/lab.zsh
|
83
84
|
- lab.gemspec
|
84
85
|
- lib/lab.rb
|
85
86
|
- lib/lab/cli.rb
|
86
87
|
- lib/lab/subcommands.rb
|
87
88
|
- lib/lab/subcommands/repository.rb
|
89
|
+
- lib/lab/subcommands/user.rb
|
88
90
|
- lib/lab/version.rb
|
89
91
|
homepage: http://github.com/jgorset/lab
|
90
92
|
licenses:
|