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 CHANGED
@@ -1 +1 @@
1
- 0.10.2
1
+ 0.10.3
@@ -5,6 +5,8 @@
5
5
  gritano plugin:exec ssh install gritano_path
6
6
  gritano plugin:exec ssh start
7
7
  gritano plugin:exec ssh stop
8
+ gritano plugin:exec ssh servername:get
9
+ gritano plugin:exec ssh servername:set servername
8
10
 
9
11
  --
10
12
  v{{VERSION}}
@@ -5,6 +5,8 @@
5
5
  gritano plugin:exec ssh install gritano_path
6
6
  gritano plugin:exec ssh start
7
7
  gritano plugin:exec ssh stop
8
+ gritano plugin:exec ssh servername:get
9
+ gritano 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}}
@@ -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,7 @@
5
5
  ssh git@host.com help
6
6
  ssh git@host.com username
7
7
  ssh git@host.com repo:list
8
+ ssh git@host.com repo:info reponame
8
9
  ssh git@host.com key:list
9
10
  ssh git@host.com key:add keyname < key.pub
10
11
  ssh git@host.com key:rm keyname
@@ -5,6 +5,7 @@
5
5
  ssh git@host.com help
6
6
  ssh git@host.com username
7
7
  ssh git@host.com repo:list
8
+ ssh git@host.com repo:info reponame
8
9
  ssh git@host.com key:list
9
10
  ssh git@host.com key:add keyname < key.pub
10
11
  ssh git@host.com key:rm keyname
@@ -5,6 +5,7 @@
5
5
  ssh git@host.com help
6
6
  ssh git@host.com username
7
7
  ssh git@host.com repo:list
8
+ ssh git@host.com repo:info reponame
8
9
  ssh git@host.com key:list
9
10
  ssh git@host.com key:add keyname < key.pub
10
11
  ssh git@host.com key:rm keyname
@@ -5,6 +5,7 @@
5
5
  ssh git@host.com help
6
6
  ssh git@host.com username
7
7
  ssh git@host.com repo:list
8
+ ssh git@host.com repo:info reponame
8
9
  ssh git@host.com key:list
9
10
  ssh git@host.com key:add keyname < key.pub
10
11
  ssh git@host.com key:rm keyname
@@ -5,6 +5,7 @@
5
5
  gritano help
6
6
  gritano username
7
7
  gritano repo:list
8
+ gritano repo:info reponame
8
9
  gritano key:list
9
10
  gritano key:add keyname < key.pub
10
11
  gritano key:rm keyname
@@ -5,6 +5,8 @@
5
5
  gritano plugin:exec ssh install gritano_path
6
6
  gritano plugin:exec ssh start
7
7
  gritano plugin:exec ssh stop
8
+ gritano plugin:exec ssh servername:get
9
+ gritano plugin:exec ssh servername:set servername
8
10
 
9
11
  --
10
12
  v{{VERSION}}
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gritano"
8
- s.version = "0.10.2"
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-06"
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"]
@@ -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 git@host.com admin:"
12
- Remote.bin_name = "ssh git@host.com "
13
- Executor.bin_name = "ssh git@host.com admin:"
14
- Gritano.bin_name = "ssh git@host.com admin:"
15
- Installer.bin_name = "ssh git@host.com admin:"
16
- Plugin.bin_name = "ssh git@host.com admin:"
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', "git@server.com:#{repo_name}"]
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
@@ -33,12 +33,13 @@ module Gritano
33
33
 
34
34
  def self.servername
35
35
  home = Etc.getpwuid.dir
36
- config = Config.new(File.join(home, '.gritano', 'config.yml'))
37
- if config.http_servername
38
- return config.http_servername
39
- else
40
- return "http://git.server.com"
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|
@@ -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.2
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-06 00:00:00.000000000 Z
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: 2308429539270069393
500
+ hash: -1400646238535156968
501
501
  required_rubygems_version: !ruby/object:Gem::Requirement
502
502
  none: false
503
503
  requirements: