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 CHANGED
@@ -1 +1,2 @@
1
1
  --color
2
+ --format documentation
@@ -1,6 +1,6 @@
1
- = Gritano v0.9.2
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
@@ -1,2 +1,10 @@
1
1
  v0.10.0:
2
- recuperar e adicionar pub.keys
2
+ permitir/barrar acesso remoto ao terminal do administrador
3
+
4
+ v0.11.0:
5
+ ☐ novos tipos de permissão
6
+
7
+ futuro:
8
+ ☐ divulgar
9
+ ☐ interface gráfica via web
10
+ ☐ git via https
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.3
1
+ 0.9.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gritano"
8
- s.version = "0.9.3"
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-02"
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) [A-Za-z0-9+\/]+/)[0]}"
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.3
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-02 00:00:00.000000000 Z
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: 2612279300761584941
482
+ hash: -3505922859375147179
483
483
  required_rubygems_version: !ruby/object:Gem::Requirement
484
484
  none: false
485
485
  requirements: