hubbard 0.0.11 → 0.0.12

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.
Files changed (6) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/bin/hubbard +38 -15
  4. data/hubbard.gemspec +3 -3
  5. metadata +2 -4
  6. data/commands/help.rb +0 -25
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  gem.add_development_dependency "rspec", ">= 1.2.9"
14
14
  gem.files << Dir['commands/*.rb'] + Dir['lib/**/*.rb']
15
15
  gem.bindir = 'bin'
16
- gem.executables << 'hubbard'
16
+ gem.executables = 'hubbard'
17
17
  end
18
18
  Jeweler::GemcutterTasks.new
19
19
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
1
+ 0.0.12
data/bin/hubbard CHANGED
@@ -9,6 +9,44 @@ require 'hubbard'
9
9
  FileUtils.mkdir_p(Hubbard::PROJECTS_PATH)
10
10
  FileUtils.mkdir_p(Hubbard::ACCOUNTS_PATH)
11
11
 
12
+ formats = [:text, :yaml]
13
+ defaults = { :format => formats.first }
14
+ options = {}
15
+ OptionParser.new do |opts|
16
+ opts.banner = <<BANNER
17
+ Usage: hubbard [options] <command>
18
+
19
+ Projects:
20
+ list-projects
21
+ create-project <project>
22
+ delete-project <project>
23
+
24
+ Repositories:
25
+ list-repositories <project>
26
+ create-repository <project> <repository>
27
+ delete-repository <project> <repository>
28
+ fork-repository <from-project> <from-repository> <to-project> <to-repository>
29
+ list-forks <project> <repository>
30
+
31
+ Permissions:
32
+ list-permissions <project>
33
+ add-permission <project> <username> read|write|admin
34
+ remove-permission <project> <username>
35
+
36
+ Options:
37
+ BANNER
38
+
39
+ opts.on("--private", "Create project with visibility set to private") do |o|
40
+ options[:private] = o
41
+ end
42
+ opts.on("-f", "--format [FORMAT]", formats,
43
+ "Output format (#{formats.join(', ')})") do |o|
44
+ options[:format] = o
45
+ end
46
+ end.parse!
47
+ OPTIONS = defaults.merge(options)
48
+ OPTIONS.freeze
49
+
12
50
  def next_arg(msg)
13
51
  if ARGV.length < 1
14
52
  $stderr.puts msg
@@ -61,21 +99,6 @@ if ENV['SSH_ORIGINAL_COMMAND']
61
99
  end
62
100
  end
63
101
 
64
- formats = [:text, :yaml]
65
- defaults = { :format => formats.first }
66
- options = {}
67
- OptionParser.new do |opts|
68
- opts.on("--private", "Create project with visibility set to private") do |o|
69
- options[:private] = o
70
- end
71
- opts.on("-f", "--format [FORMAT]", formats,
72
- "Select format (#{formats.join(', ')})") do |o|
73
- options[:format] = o
74
- end
75
- end.parse!
76
- OPTIONS = defaults.merge(options)
77
- OPTIONS.freeze
78
-
79
102
  command = next_arg "Please specify a command to run"
80
103
 
81
104
  if command == "run-as"
data/hubbard.gemspec CHANGED
@@ -5,14 +5,15 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hubbard}
8
- s.version = "0.0.11"
8
+ s.version = "0.0.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Foemmel"]
12
12
  s.date = %q{2010-02-06}
13
+ s.default_executable = %q{hubbard}
13
14
  s.description = %q{Hubbard is a command line tool for managing git repositories.}
14
15
  s.email = %q{git@foemmel.com}
15
- s.executables = ["hubbard", "hubbard"]
16
+ s.executables = ["hubbard"]
16
17
  s.extra_rdoc_files = [
17
18
  "LICENSE",
18
19
  "README.md"
@@ -33,7 +34,6 @@ Gem::Specification.new do |s|
33
34
  "commands/fork-repository.rb",
34
35
  "commands/git-receive-pack.rb",
35
36
  "commands/git-upload-pack.rb",
36
- "commands/help.rb",
37
37
  "commands/list-forks.rb",
38
38
  "commands/list-keys.rb",
39
39
  "commands/list-permissions.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubbard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Foemmel
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
 
12
12
  date: 2010-02-06 00:00:00 -06:00
13
- default_executable:
13
+ default_executable: hubbard
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -26,7 +26,6 @@ description: Hubbard is a command line tool for managing git repositories.
26
26
  email: git@foemmel.com
27
27
  executables:
28
28
  - hubbard
29
- - hubbard
30
29
  extensions: []
31
30
 
32
31
  extra_rdoc_files:
@@ -48,7 +47,6 @@ files:
48
47
  - commands/fork-repository.rb
49
48
  - commands/git-receive-pack.rb
50
49
  - commands/git-upload-pack.rb
51
- - commands/help.rb
52
50
  - commands/list-forks.rb
53
51
  - commands/list-keys.rb
54
52
  - commands/list-permissions.rb
data/commands/help.rb DELETED
@@ -1,25 +0,0 @@
1
- $stderr.puts <<-END
2
- Usage: hub <command>
3
-
4
- Projects:
5
-
6
- list-projects
7
- create-project <project>
8
- delete-project <project>
9
-
10
- Repositories:
11
-
12
- list-repositories <project>
13
- create-repository <project> <repository>
14
- delete-repository <project> <repository>
15
- fork-repository <from-project> <from-repository> <to-project> <to-repository>
16
- list-forks <project> <repository>
17
-
18
- Permissions:
19
-
20
- list-permissions <project>
21
- add-permission <project> <username> read|write|admin
22
- remove-permission <project> <username>
23
-
24
- END
25
- exit 0