gritano 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ gem 'activerecord', ">= 3.2.8"
7
7
  gem 'sqlite3', ">= 1.3.6"
8
8
  gem 'grit', ">= 2.5.0"
9
9
  gem 'terminal-table', ">= 1.4.5"
10
+ gem "sshd_config"
10
11
 
11
12
  # Add dependencies to develop your gem here.
12
13
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -54,6 +54,7 @@ GEM
54
54
  simplecov-html (~> 0.7.1)
55
55
  simplecov-html (0.7.1)
56
56
  sqlite3 (1.3.7)
57
+ sshd_config (0.1.0)
57
58
  terminal-table (1.4.5)
58
59
  tzinfo (0.3.35)
59
60
 
@@ -71,4 +72,5 @@ DEPENDENCIES
71
72
  rspec (>= 2.11.0)
72
73
  simplecov (>= 0.6.4)
73
74
  sqlite3 (>= 1.3.6)
75
+ sshd_config
74
76
  terminal-table (>= 1.4.5)
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- = Gritano v0.7.2
1
+ = Gritano v0.8.0
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
 
data/TODO CHANGED
@@ -1,5 +1,4 @@
1
- v0.7.4
2
- - configuracoes via cmd (exec ssh set:port 2222) - OpenSSHConfig
1
+ v0.9.0
2
+ - email
3
+ - envio de pubkey via codigo/email
3
4
 
4
- v0.8.0 - WebService
5
- v0.9.0 - WebSite
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.8.0
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.7.2"
8
+ s.version = "0.8.0"
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-03-12"
12
+ s.date = "2013-03-13"
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"]
@@ -259,6 +259,7 @@ Gem::Specification.new do |s|
259
259
  s.add_runtime_dependency(%q<sqlite3>, [">= 1.3.6"])
260
260
  s.add_runtime_dependency(%q<grit>, [">= 2.5.0"])
261
261
  s.add_runtime_dependency(%q<terminal-table>, [">= 1.4.5"])
262
+ s.add_runtime_dependency(%q<sshd_config>, [">= 0"])
262
263
  s.add_development_dependency(%q<rspec>, [">= 2.11.0"])
263
264
  s.add_development_dependency(%q<rdoc>, [">= 3.12"])
264
265
  s.add_development_dependency(%q<cucumber>, [">= 1.2.1"])
@@ -271,6 +272,7 @@ Gem::Specification.new do |s|
271
272
  s.add_dependency(%q<sqlite3>, [">= 1.3.6"])
272
273
  s.add_dependency(%q<grit>, [">= 2.5.0"])
273
274
  s.add_dependency(%q<terminal-table>, [">= 1.4.5"])
275
+ s.add_dependency(%q<sshd_config>, [">= 0"])
274
276
  s.add_dependency(%q<rspec>, [">= 2.11.0"])
275
277
  s.add_dependency(%q<rdoc>, [">= 3.12"])
276
278
  s.add_dependency(%q<cucumber>, [">= 1.2.1"])
@@ -284,6 +286,7 @@ Gem::Specification.new do |s|
284
286
  s.add_dependency(%q<sqlite3>, [">= 1.3.6"])
285
287
  s.add_dependency(%q<grit>, [">= 2.5.0"])
286
288
  s.add_dependency(%q<terminal-table>, [">= 1.4.5"])
289
+ s.add_dependency(%q<sshd_config>, [">= 0"])
287
290
  s.add_dependency(%q<rspec>, [">= 2.11.0"])
288
291
  s.add_dependency(%q<rdoc>, [">= 3.12"])
289
292
  s.add_dependency(%q<cucumber>, [">= 1.2.1"])
@@ -1,3 +1,5 @@
1
+ require "sshd_config"
2
+
1
3
  module Gritano
2
4
  class Ssh < Plugin
3
5
 
@@ -70,5 +72,23 @@ module Gritano
70
72
  `kill -9 #{pid}`
71
73
  end
72
74
 
75
+ def method_missing(name, *args, &body)
76
+ case name.to_s
77
+ when /^get_/ then
78
+ begin
79
+ sshd_config = SshdConfig::SshdConfig.read(File.join("/usr", "local", "etc", "sshd_config"))
80
+ return sshd_config.send(name.to_s.gsub(/^get_/, ''))
81
+ rescue Exception => e
82
+ return "invalid property"
83
+ end
84
+ when /^set_/ then
85
+ sshd_config = SshdConfig::SshdConfig.read(File.join("/usr", "local", "etc", "sshd_config"))
86
+ sshd_config.send("#{name.to_s.gsub(/^set_/, '')}=", args[0])
87
+ sshd_config.save
88
+ return "property #{name.to_s.gsub(/^set_/, '')} updated"
89
+ end
90
+ raise NoMethodError
91
+ end
92
+
73
93
  end
74
94
  end
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.7.2
4
+ version: 0.8.0
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-03-12 00:00:00.000000000 Z
12
+ date: 2013-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -75,6 +75,22 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: 1.4.5
78
+ - !ruby/object:Gem::Dependency
79
+ name: sshd_config
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
78
94
  - !ruby/object:Gem::Dependency
79
95
  name: rspec
80
96
  requirement: !ruby/object:Gem::Requirement
@@ -441,7 +457,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
441
457
  version: '0'
442
458
  segments:
443
459
  - 0
444
- hash: 3108419969752387709
460
+ hash: 3600097453777822869
445
461
  required_rubygems_version: !ruby/object:Gem::Requirement
446
462
  none: false
447
463
  requirements: