gritano 0.5.0 → 0.5.1
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.
- data/README.rdoc +3 -3
- data/Rakefile +1 -1
- data/TODO +2 -1
- data/VERSION +1 -1
- data/bin/gritano-check +1 -1
- data/features/cli.feature +3 -3
- data/features/data/help-check.txt +1 -1
- data/features/data/help-test.txt +1 -1
- data/features/data/help.txt +1 -1
- data/features/step_definitions/ssh_steps.rb +1 -1
- data/gritano.gemspec +4 -4
- data/lib/gritano/cli.rb +8 -14
- data/lib/gritano/console.rb +3 -3
- data/lib/gritano/console/{check.rb → remote.rb} +2 -2
- metadata +5 -5
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= Gritano v0.5.
|
1
|
+
= Gritano v0.5.1
|
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
|
|
@@ -85,9 +85,9 @@ Starting from Gritano 0.3.0, administrators can execute commands via ssh:
|
|
85
85
|
|
86
86
|
$ ssh git@hot.com admin:repo:list
|
87
87
|
|
88
|
-
For more
|
88
|
+
== For more Information
|
89
89
|
|
90
|
-
|
90
|
+
http://igorbonadio.com.br/gritano/
|
91
91
|
|
92
92
|
== Contributing to Gritano
|
93
93
|
|
data/Rakefile
CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
|
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "gritano"
|
18
|
-
gem.homepage = "http://
|
18
|
+
gem.homepage = "http://igorbonadio.com.br/gritano"
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Gritano is a tool to configure your git server over ssh}
|
21
21
|
gem.description = %Q{Gritano is the simplest way to configure your git server over ssh. You can create repositories and manage user access.}
|
data/TODO
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/bin/gritano-check
CHANGED
data/features/cli.feature
CHANGED
@@ -58,7 +58,7 @@ Feature: Console operations
|
|
58
58
|
Then CLI should return "<result>"
|
59
59
|
Examples:
|
60
60
|
| command | result |
|
61
|
-
| version | v0.
|
61
|
+
| version | v0.5.0 |
|
62
62
|
| user:add jose | User jose added. |
|
63
63
|
| user:key:add igorbonadio marvin | Key added successfully. |
|
64
64
|
| user:key:rm igorbonadio eva | Key removed successfully. |
|
@@ -99,7 +99,7 @@ Feature: Console operations
|
|
99
99
|
Then CLI should return "<result>"
|
100
100
|
Examples:
|
101
101
|
| command | result |
|
102
|
-
| version | v0.
|
102
|
+
| version | v0.5.0 |
|
103
103
|
| key:add keyname | Key added successfully. |
|
104
104
|
| key:rm eva | Key removed successfully. |
|
105
105
|
| key:rm keyname | error: Key could not be removed. |
|
@@ -143,7 +143,7 @@ Feature: Console operations
|
|
143
143
|
Then CLI should return "<result>"
|
144
144
|
Examples:
|
145
145
|
| command | result |
|
146
|
-
| version | v0.
|
146
|
+
| version | v0.5.0 |
|
147
147
|
| key:add keyname | Key added successfully. |
|
148
148
|
| key:rm hal | Key removed successfully. |
|
149
149
|
| key:rm keyname | error: Key could not be removed. |
|
data/features/data/help-test.txt
CHANGED
data/features/data/help.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Given /^I start the gritano\-check console with "(.*?)"$/ do |login|
|
2
2
|
stdin = double()
|
3
3
|
stdin.stub(:read).and_return("Your SSHKEY here...")
|
4
|
-
@console = Gritano::Console::
|
4
|
+
@console = Gritano::Console::Remote.new(stdin, '.', 'tmp')
|
5
5
|
@login = login
|
6
6
|
end
|
7
7
|
|
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.5.
|
8
|
+
s.version = "0.5.1"
|
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-12-
|
12
|
+
s.date = "2012-12-29"
|
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"]
|
@@ -63,10 +63,10 @@ Gem::Specification.new do |s|
|
|
63
63
|
"lib/gritano/cli.rb",
|
64
64
|
"lib/gritano/console.rb",
|
65
65
|
"lib/gritano/console/base.rb",
|
66
|
-
"lib/gritano/console/check.rb",
|
67
66
|
"lib/gritano/console/executor.rb",
|
68
67
|
"lib/gritano/console/gritano.rb",
|
69
68
|
"lib/gritano/console/installer.rb",
|
69
|
+
"lib/gritano/console/remote.rb",
|
70
70
|
"lib/gritano/models.rb",
|
71
71
|
"lib/gritano/models/key.rb",
|
72
72
|
"lib/gritano/models/permission.rb",
|
@@ -80,7 +80,7 @@ Gem::Specification.new do |s|
|
|
80
80
|
"spec/model_user_spec.rb",
|
81
81
|
"spec/spec_helper.rb"
|
82
82
|
]
|
83
|
-
s.homepage = "http://
|
83
|
+
s.homepage = "http://igorbonadio.com.br/gritano"
|
84
84
|
s.licenses = ["MIT"]
|
85
85
|
s.require_paths = ["lib"]
|
86
86
|
s.rubygems_version = "1.8.24"
|
data/lib/gritano/cli.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
module Gritano
|
2
2
|
module CLI
|
3
|
-
|
4
|
-
|
5
|
-
console = Gritano::Console::Gritano.new(stdin, home_dir, repo_dir)
|
3
|
+
|
4
|
+
def CLI._execute(cmd, console)
|
6
5
|
begin
|
7
6
|
output = console.execute(cmd)
|
8
7
|
if output[0]
|
@@ -15,19 +14,14 @@ module Gritano
|
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
17
|
+
def CLI.execute(cmd, stdin = STDIN, home_dir = Etc.getpwuid.dir, repo_dir = Etc.getpwuid.dir)
|
18
|
+
Gritano::Console.remote_console(false)
|
19
|
+
_execute(cmd, Gritano::Console::Gritano.new(stdin, home_dir, repo_dir))
|
20
|
+
end
|
21
|
+
|
18
22
|
def CLI.check(cmd, login, stdin = STDIN, home_dir = Etc.getpwuid.dir, repo_dir = Etc.getpwuid.dir)
|
19
23
|
Gritano::Console.remote_console(true)
|
20
|
-
|
21
|
-
begin
|
22
|
-
output = console.execute(cmd + [login])
|
23
|
-
if output[0]
|
24
|
-
output[1]
|
25
|
-
else
|
26
|
-
"error: #{output[1]}"
|
27
|
-
end
|
28
|
-
rescue
|
29
|
-
console.execute(["help"])[1]
|
30
|
-
end
|
24
|
+
_execute(cmd + [login], Gritano::Console::Remote.new(stdin, home_dir, repo_dir))
|
31
25
|
end
|
32
26
|
end
|
33
27
|
end
|
data/lib/gritano/console.rb
CHANGED
@@ -2,20 +2,20 @@ require File.join(ROOT_PATH, 'gritano/console/base')
|
|
2
2
|
require File.join(ROOT_PATH, 'gritano/console/executor')
|
3
3
|
require File.join(ROOT_PATH, 'gritano/console/installer')
|
4
4
|
require File.join(ROOT_PATH, 'gritano/console/gritano')
|
5
|
-
require File.join(ROOT_PATH, 'gritano/console/
|
5
|
+
require File.join(ROOT_PATH, 'gritano/console/remote')
|
6
6
|
|
7
7
|
module Gritano
|
8
8
|
module Console
|
9
9
|
def Console.remote_console(remote)
|
10
10
|
if remote
|
11
11
|
Base.bin_name = "ssh git@host.com admin:"
|
12
|
-
|
12
|
+
Remote.bin_name = "ssh git@host.com "
|
13
13
|
Executor.bin_name = "ssh git@host.com admin:"
|
14
14
|
Gritano.bin_name = "ssh git@host.com admin:"
|
15
15
|
Installer.bin_name = "ssh git@host.com admin:"
|
16
16
|
else
|
17
17
|
Base.bin_name = "gritano "
|
18
|
-
|
18
|
+
Remote.bin_name = "gritano "
|
19
19
|
Executor.bin_name = "gritano "
|
20
20
|
Gritano.bin_name = "gritano "
|
21
21
|
Installer.bin_name = "gritano "
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Gritano
|
2
2
|
module Console
|
3
|
-
class
|
3
|
+
class Remote < Base
|
4
4
|
|
5
5
|
def initialize(stdin = STDIN, home_dir = Etc.getpwuid.dir, repo_path = Etc.getpwuid.dir)
|
6
6
|
@stdin = stdin
|
@@ -24,7 +24,7 @@ module Gritano
|
|
24
24
|
end
|
25
25
|
|
26
26
|
add_command "help" do |args|
|
27
|
-
[true,
|
27
|
+
[true, Remote.help]
|
28
28
|
end
|
29
29
|
|
30
30
|
add_command "repo:list" do |args|
|
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.5.
|
4
|
+
version: 0.5.1
|
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-12-
|
12
|
+
date: 2012-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -243,10 +243,10 @@ files:
|
|
243
243
|
- lib/gritano/cli.rb
|
244
244
|
- lib/gritano/console.rb
|
245
245
|
- lib/gritano/console/base.rb
|
246
|
-
- lib/gritano/console/check.rb
|
247
246
|
- lib/gritano/console/executor.rb
|
248
247
|
- lib/gritano/console/gritano.rb
|
249
248
|
- lib/gritano/console/installer.rb
|
249
|
+
- lib/gritano/console/remote.rb
|
250
250
|
- lib/gritano/models.rb
|
251
251
|
- lib/gritano/models/key.rb
|
252
252
|
- lib/gritano/models/permission.rb
|
@@ -260,7 +260,7 @@ files:
|
|
260
260
|
- spec/model_user_spec.rb
|
261
261
|
- spec/spec_helper.rb
|
262
262
|
- TODO
|
263
|
-
homepage: http://
|
263
|
+
homepage: http://igorbonadio.com.br/gritano
|
264
264
|
licenses:
|
265
265
|
- MIT
|
266
266
|
post_install_message:
|
@@ -275,7 +275,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
275
275
|
version: '0'
|
276
276
|
segments:
|
277
277
|
- 0
|
278
|
-
hash:
|
278
|
+
hash: 3374500696150512185
|
279
279
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
280
|
none: false
|
281
281
|
requirements:
|