gritano 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/features/data/local_commands/plugin_exec_ssh_help.txt +2 -0
- data/features/data/local_commands/plugin_exec_ssh_helps.txt +2 -0
- data/features/data/remote_commands/admin_plugin_exec_ssh_help_igorbonadio.txt +2 -0
- data/features/data/remote_commands/admin_plugin_exec_ssh_helps_igorbonadio.txt +2 -0
- data/features/data/remote_commands/help_igorbonadio.txt +1 -0
- data/features/data/remote_commands/help_jessicaeto.txt +1 -0
- data/features/data/remote_commands/invalid_command_igorbonadio.txt +1 -0
- data/features/data/remote_commands/invalid_command_jessicaeto.txt +1 -0
- data/features/data/remote_help.txt +1 -0
- data/features/data/ssh_help.txt +2 -0
- data/gritano.gemspec +2 -2
- data/lib/gritano/console.rb +6 -6
- data/lib/gritano/console/executor.rb +1 -1
- data/lib/gritano/console/remote.rb +5 -0
- data/lib/gritano/plugin/http.rb +6 -5
- data/lib/gritano/plugin/ssh.rb +24 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.3
|
@@ -5,6 +5,8 @@
|
|
5
5
|
ssh git@host.com admin:plugin:exec ssh install gritano_path
|
6
6
|
ssh git@host.com admin:plugin:exec ssh start
|
7
7
|
ssh git@host.com admin:plugin:exec ssh stop
|
8
|
+
ssh git@host.com admin:plugin:exec ssh servername:get
|
9
|
+
ssh git@host.com admin:plugin:exec ssh servername:set servername
|
8
10
|
|
9
11
|
--
|
10
12
|
v{{VERSION}}
|
@@ -5,6 +5,8 @@
|
|
5
5
|
ssh git@host.com admin:plugin:exec ssh install gritano_path
|
6
6
|
ssh git@host.com admin:plugin:exec ssh start
|
7
7
|
ssh git@host.com admin:plugin:exec ssh stop
|
8
|
+
ssh git@host.com admin:plugin:exec ssh servername:get
|
9
|
+
ssh git@host.com admin:plugin:exec ssh servername:set servername
|
8
10
|
|
9
11
|
--
|
10
12
|
v{{VERSION}}
|
data/features/data/ssh_help.txt
CHANGED
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.10.
|
8
|
+
s.version = "0.10.3"
|
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-05-
|
12
|
+
s.date = "2013-05-07"
|
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"]
|
data/lib/gritano/console.rb
CHANGED
@@ -8,12 +8,12 @@ module Gritano
|
|
8
8
|
module Console
|
9
9
|
def Console.remote_console(remote)
|
10
10
|
if remote
|
11
|
-
Base.bin_name = "ssh
|
12
|
-
Remote.bin_name = "ssh
|
13
|
-
Executor.bin_name = "ssh
|
14
|
-
Gritano.bin_name = "ssh
|
15
|
-
Installer.bin_name = "ssh
|
16
|
-
Plugin.bin_name = "ssh
|
11
|
+
Base.bin_name = "ssh #{::Gritano::Ssh.servername} admin:"
|
12
|
+
Remote.bin_name = "ssh #{::Gritano::Ssh.servername} "
|
13
|
+
Executor.bin_name = "ssh #{::Gritano::Ssh.servername} admin:"
|
14
|
+
Gritano.bin_name = "ssh #{::Gritano::Ssh.servername} admin:"
|
15
|
+
Installer.bin_name = "ssh #{::Gritano::Ssh.servername} admin:"
|
16
|
+
Plugin.bin_name = "ssh #{::Gritano::Ssh.servername} admin:"
|
17
17
|
else
|
18
18
|
Base.bin_name = "gritano "
|
19
19
|
Remote.bin_name = "gritano "
|
@@ -325,7 +325,7 @@ module Gritano
|
|
325
325
|
repo = Repository.find_by_name(repo_name)
|
326
326
|
if repo
|
327
327
|
msg = Terminal::Table.new do |t|
|
328
|
-
t << ['ssh', "
|
328
|
+
t << ['ssh', "#{Ssh.servername}:#{repo_name}"]
|
329
329
|
if ::Gritano::Http.check_install
|
330
330
|
t << :separator
|
331
331
|
t << ['http', "#{Http.servername}/#{repo_name}"]
|
@@ -36,6 +36,11 @@ module Gritano
|
|
36
36
|
login, = args
|
37
37
|
@executor.execute(["user:repo:list"] + [login])
|
38
38
|
end
|
39
|
+
|
40
|
+
add_command "repo:info", "reponame" do |args|
|
41
|
+
reponame, login = args
|
42
|
+
@executor.execute(["repo:info"] + [reponame])
|
43
|
+
end
|
39
44
|
|
40
45
|
add_command "key:list" do |args|
|
41
46
|
login, = args
|
data/lib/gritano/plugin/http.rb
CHANGED
@@ -33,12 +33,13 @@ module Gritano
|
|
33
33
|
|
34
34
|
def self.servername
|
35
35
|
home = Etc.getpwuid.dir
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
if File.exist?(File.join(home, '.gritano', 'config.yml'))
|
37
|
+
config = Config.new(File.join(home, '.gritano', 'config.yml'))
|
38
|
+
if config.http_servername
|
39
|
+
return config.http_servername
|
40
|
+
end
|
41
41
|
end
|
42
|
+
return "http://git.server.com"
|
42
43
|
end
|
43
44
|
|
44
45
|
add_command "help" do |params|
|
data/lib/gritano/plugin/ssh.rb
CHANGED
@@ -37,6 +37,17 @@ module Gritano
|
|
37
37
|
return false
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
def self.servername
|
42
|
+
home = Etc.getpwuid.dir
|
43
|
+
if File.exist?(File.join(home, '.gritano', 'config.yml'))
|
44
|
+
config = Config.new(File.join(home, '.gritano', 'config.yml'))
|
45
|
+
if config.ssh_servername
|
46
|
+
return config.ssh_servername
|
47
|
+
end
|
48
|
+
end
|
49
|
+
return "git@host.com"
|
50
|
+
end
|
40
51
|
|
41
52
|
add_command "help" do |params|
|
42
53
|
Ssh.help
|
@@ -74,6 +85,19 @@ module Gritano
|
|
74
85
|
pid = `ps aux | grep -e /usr/local/sbin/sshd | grep -v grep | tr -s \" \" | cut -d \" \" -f2`
|
75
86
|
`kill -9 #{pid}`
|
76
87
|
end
|
88
|
+
|
89
|
+
add_command "servername:get" do |params|
|
90
|
+
return Ssh.servername
|
91
|
+
end
|
92
|
+
|
93
|
+
add_command "servername:set", "servername" do |params|
|
94
|
+
servername, = params
|
95
|
+
home = Etc.getpwuid.dir
|
96
|
+
config = Config.new(File.join(home, '.gritano', 'config.yml'))
|
97
|
+
config.ssh_servername = servername
|
98
|
+
config.save
|
99
|
+
return "done!"
|
100
|
+
end
|
77
101
|
|
78
102
|
def method_missing(name, *args, &body)
|
79
103
|
case name.to_s
|
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.10.
|
4
|
+
version: 0.10.3
|
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-05-
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -497,7 +497,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
497
497
|
version: '0'
|
498
498
|
segments:
|
499
499
|
- 0
|
500
|
-
hash:
|
500
|
+
hash: -1400646238535156968
|
501
501
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
502
502
|
none: false
|
503
503
|
requirements:
|