gritano 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/README.rdoc +2 -2
- data/TODO +9 -1
- data/VERSION +1 -1
- data/gritano.gemspec +2 -2
- data/lib/gritano/console/executor.rb +1 -1
- data/spec/console_executor_spec.rb +15 -0
- metadata +3 -3
data/.rspec
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
= Gritano
|
1
|
+
= Gritano
|
2
2
|
|
3
|
-
{<img src="https://travis-ci.org/igorbonadio/gritano.png" />}[https://travis-ci.org/igorbonadio/gritano]
|
3
|
+
{<img src="https://badge.fury.io/rb/gritano.png" alt="Gem Version" />}[http://badge.fury.io/rb/gritano] {<img src="https://travis-ci.org/igorbonadio/gritano.png" />}[https://travis-ci.org/igorbonadio/gritano]
|
4
4
|
|
5
5
|
Gritano is the simplest way to configure a git server over ssh. You can create repositories and manage user access using this practical tool.
|
6
6
|
|
data/TODO
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.4
|
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.9.
|
8
|
+
s.version = "0.9.4"
|
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 = "2013-04-
|
12
|
+
s.date = "2013-04-18"
|
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-pub-key", "gritano-remote"]
|
@@ -127,7 +127,7 @@ module Gritano
|
|
127
127
|
user = User.find_by_login(login)
|
128
128
|
if user
|
129
129
|
begin
|
130
|
-
key_str = "#{@stdin.read.scan(/^ssh-(?:dss|rsa) [
|
130
|
+
key_str = "#{@stdin.read.scan(/^ssh-(?:dss|rsa) .* /)[0][0..-2]}"
|
131
131
|
rescue
|
132
132
|
return [false, "Key could not be added."]
|
133
133
|
end
|
@@ -52,6 +52,21 @@ module Gritano
|
|
52
52
|
User.should_receive(:find_by_login).with("login").and_return(user)
|
53
53
|
create_executor('.', 'tmp').execute(["user:key:add", "login", "keyname"])
|
54
54
|
end
|
55
|
+
|
56
|
+
it "should add users' keys" do
|
57
|
+
user = double()
|
58
|
+
keys = double()
|
59
|
+
key = double()
|
60
|
+
|
61
|
+
key.should_receive(:valid?).and_return(true)
|
62
|
+
keys.should_receive(:create).with(name: "keyname", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UnnlDwmvid+WRAyIhVzFhIjUUxA3Wul7LN8mk18dHZDv5HSVADmM4EoqbVSbpeVIyTIchqS3y3XF1rh8dfM41f/W3lcTcFihHM6RDx45Q3Lz9hfyrT8tttlWRA7prvlXu6bUOqMmNtvFFow+bJEo/HgCZHshvoDHcnlHfziU7bDCo+p50SdafFwZRe3AWp/f4TsxiP7jpBnluQM0Dl9Om8jfW8IYAJ+WxlKBsKLMkRH/HWSuigs4AQBD4ADiQfOm2RO4yeSiVFNwGFmgG7NmEq1sNALLAQw+ijN9vyiD99ybr0pqoJX3vhyRBWvCrgQdHjh8ucaoMXI89LxyYts==").and_return(key)
|
63
|
+
user.should_receive(:keys).and_return(keys)
|
64
|
+
User.should_receive(:find_by_login).with("login").and_return(user)
|
65
|
+
|
66
|
+
stdin = double()
|
67
|
+
stdin.stub(:read).and_return("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UnnlDwmvid+WRAyIhVzFhIjUUxA3Wul7LN8mk18dHZDv5HSVADmM4EoqbVSbpeVIyTIchqS3y3XF1rh8dfM41f/W3lcTcFihHM6RDx45Q3Lz9hfyrT8tttlWRA7prvlXu6bUOqMmNtvFFow+bJEo/HgCZHshvoDHcnlHfziU7bDCo+p50SdafFwZRe3AWp/f4TsxiP7jpBnluQM0Dl9Om8jfW8IYAJ+WxlKBsKLMkRH/HWSuigs4AQBD4ADiQfOm2RO4yeSiVFNwGFmgG7NmEq1sNALLAQw+ijN9vyiD99ybr0pqoJX3vhyRBWvCrgQdHjh8ucaoMXI89LxyYts== igorbonadio@marvin.local")
|
68
|
+
Executor.new(stdin, '.', 'tmp').execute(["user:key:add", "login", "keyname"])
|
69
|
+
end
|
55
70
|
|
56
71
|
it "should remove users' keys" do
|
57
72
|
keys = double()
|
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.9.
|
4
|
+
version: 0.9.4
|
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: 2013-04-
|
12
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -479,7 +479,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
479
479
|
version: '0'
|
480
480
|
segments:
|
481
481
|
- 0
|
482
|
-
hash:
|
482
|
+
hash: -3505922859375147179
|
483
483
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
484
484
|
none: false
|
485
485
|
requirements:
|