gritano 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- = Gritano v0.2.1
1
+ = Gritano v0.2.2
2
2
 
3
3
  Gritano is the simplest way to configure a git server over ssh. You can create repositories and manage user access using this practical tool.
4
4
 
@@ -43,9 +43,9 @@ Gritano 0.2.0 introduced a new feature that enables users to execute some simple
43
43
 
44
44
  $ ssh git@host.com keys
45
45
 
46
- $ ssh git@host.com key add mykey < id_rsa.pub
46
+ $ ssh git@host.com addkey mykey < id_rsa.pub
47
47
 
48
- $ ssh git@host.com key rm mykey
48
+ $ ssh git@host.com rmkey mykey
49
49
 
50
50
  == Contributing to Gritano
51
51
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/bin/gritano-check CHANGED
@@ -11,8 +11,8 @@ def help
11
11
  Examples:
12
12
  ssh git@host.com repos
13
13
  ssh git@host.com keys
14
- ssh git@host.com key add keyname < key.pub
15
- ssh git@host.com key rm keyname
14
+ ssh git@host.com addkey keyname < key.pub
15
+ ssh git@host.com rmkey keyname
16
16
 
17
17
  --
18
18
  v#{File.open(File.join(File.dirname(__FILE__), '..', 'VERSION')).readlines.join}"
@@ -34,7 +34,7 @@ begin
34
34
  end
35
35
  when :user_cmd
36
36
  cmd = command[:command]
37
- if cmd.start_with? "+key" or cmd.start_with? "-key"
37
+ if cmd.start_with? "addkey" or cmd.start_with? "rmkey"
38
38
  tmp = cmd.split(" ")
39
39
  tmp = tmp[0..-2] + [login] + tmp[-1..-1]
40
40
  cmd = tmp.join(" ")
@@ -12,5 +12,5 @@ Feature: Command
12
12
  | git-upload-pack proj.git | read | git-upload-pack | proj.git |
13
13
  | repos | user_cmd | repos | |
14
14
  | keys | user_cmd | keys | |
15
- | key add keyname | user_cmd | +key keyname | |
16
- | key rm keyname | user_cmd | -key keyname | |
15
+ | addkey keyname | user_cmd | addkey keyname | |
16
+ | rmkey keyname | user_cmd | rmkey keyname | |
data/gritano.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gritano"
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Igor Bonadio"]
12
- s.date = "2012-11-16"
12
+ s.date = "2012-11-22"
13
13
  s.description = "Gritano is the simplest way to configure your git server over ssh. You can create repositories and manage user access."
14
14
  s.email = "igorbonadio@gmail.com"
15
15
  s.executables = ["gritano", "gritano-check"]
@@ -6,12 +6,8 @@ module Gritano
6
6
  return {access: :write, command: "git-receive-pack", repo: self.repo(cmd)}
7
7
  when /^git-upload-pack/ then
8
8
  return {access: :read, command: "git-upload-pack", repo: self.repo(cmd)}
9
- when /^repos/, /^keys/ then
9
+ when /^repos/, /^keys/, /^addkey/, /^rmkey/ then
10
10
  return {access: :user_cmd, command: cmd}
11
- when /^key add/ then
12
- return {access: :user_cmd, command: '+' + cmd.sub(' add', '')}
13
- when /^key rm/ then
14
- return {access: :user_cmd, command: '-' + cmd.sub(' rm', '')}
15
11
  end
16
12
  end
17
13
 
data/spec/command_spec.rb CHANGED
@@ -27,15 +27,15 @@ describe Gritano::Command do
27
27
  command[:command].should be == "keys"
28
28
  end
29
29
 
30
- it 'should interpret key add keyname' do
31
- command = Gritano::Command.eval("key add keyname")
30
+ it 'should interpret addkey keyname' do
31
+ command = Gritano::Command.eval("addkey keyname")
32
32
  command[:access].to_s.should be == "user_cmd"
33
- command[:command].should be == "+key keyname"
33
+ command[:command].should be == "addkey keyname"
34
34
  end
35
35
 
36
- it 'should interpret -key keyname' do
37
- command = Gritano::Command.eval("key rm keyname")
36
+ it 'should interpret rmkey keyname' do
37
+ command = Gritano::Command.eval("rmkey keyname")
38
38
  command[:access].to_s.should be == "user_cmd"
39
- command[:command].should be == "-key keyname"
39
+ command[:command].should be == "rmkey keyname"
40
40
  end
41
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gritano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-16 00:00:00.000000000 Z
12
+ date: 2012-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -245,7 +245,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  segments:
247
247
  - 0
248
- hash: 192850333012962786
248
+ hash: 1441150842107261050
249
249
  required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  none: false
251
251
  requirements: