gitlab-cli 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24d2d44551422b61b38e4cdbad093fe8c07efc18
4
- data.tar.gz: e161ba64f99b85140349f15f5955474c108029a2
3
+ metadata.gz: 601aa796529431ad49e8d5c1f66db5455ef6afa4
4
+ data.tar.gz: 26d4f9309f1f02acc9261510ca844ec06f06cddc
5
5
  SHA512:
6
- metadata.gz: 6c72ee0cbff4340a08cd90085597b3ba2343ef33002824262ea75197671d71a355dfaacec97fda32bd46f939436b07e3a8b0088a7f950489ba916a4defec996d
7
- data.tar.gz: dc4633e3f6aff492e367729111df79da9ff9c244063f9534136c5dc9debcd4bb08084aa9e5d20ab30749fffb9f8a898457f3901d464a146605f1912bdb9ce1c9
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 lab
7
+ $ gem install gitlab-cli
8
8
 
9
9
  ## Usage
10
10
 
11
11
  $ lab
12
12
 
13
- # Create a new repsository
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
@@ -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
@@ -19,6 +19,9 @@ module Lab
19
19
 
20
20
  desc "repository COMMAND", "Manage repositories"
21
21
  subcommand "repository", Subcommands::Repository
22
+
23
+ desc "user COMMAND", "Manage users"
24
+ subcommand "user", Subcommands::User
22
25
  end
23
26
 
24
27
  end
@@ -1,3 +1,4 @@
1
1
  module Subcommands
2
2
  require "lab/subcommands/repository"
3
+ require "lab/subcommands/user"
3
4
  end
@@ -4,15 +4,15 @@ module Lab
4
4
 
5
5
  class Repository < Thor
6
6
 
7
- desc "repository list", "List repositories"
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 "repository create NAME", "Create a new repository"
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
@@ -1,3 +1,3 @@
1
1
  module Lab
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-09 00:00:00.000000000 Z
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: