scutil 0.3.0 → 0.3.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/{CHANGELOG.md → CHANGELOG.rdoc} +5 -0
- data/README.rdoc +3 -3
- data/{THANKS → THANKS.rdoc} +0 -0
- data/lib/scutil.rb +1 -1
- data/lib/scutil/exec.rb +12 -0
- data/scutil.gemspec +5 -5
- metadata +35 -39
data/README.rdoc
CHANGED
@@ -43,7 +43,7 @@ see Scutil.
|
|
43
43
|
require 'scutil'
|
44
44
|
|
45
45
|
# Class method executed immediately:
|
46
|
-
Scutil.exec_command('servername1', 'username', 'pwd',
|
46
|
+
Scutil.exec_command('servername1', 'username', 'pwd', nil,
|
47
47
|
{
|
48
48
|
:keys => '~mas/.ssh/id_rsa',
|
49
49
|
:scutil_verbose => true
|
@@ -51,8 +51,8 @@ see Scutil.
|
|
51
51
|
|
52
52
|
|
53
53
|
# Object to be used and reused:
|
54
|
-
exec = Scutil::Exec.new('servername2', 'mas',
|
55
|
-
{ :
|
54
|
+
exec = Scutil::Exec.new('servername2', 'mas',
|
55
|
+
{ :password => 'myPassw0rd' })
|
56
56
|
exec.exec_command("ls -l /")
|
57
57
|
|
58
58
|
return_value = exec.exec_command("grep -q ...")
|
data/{THANKS → THANKS.rdoc}
RENAMED
File without changes
|
data/lib/scutil.rb
CHANGED
@@ -30,7 +30,7 @@ require 'scutil/connection_cache'
|
|
30
30
|
require 'scutil/system_connection'
|
31
31
|
|
32
32
|
module Scutil
|
33
|
-
SCUTIL_VERSION = '0.3.
|
33
|
+
SCUTIL_VERSION = '0.3.1'
|
34
34
|
# By default, buffer 10M of data before writing.
|
35
35
|
DEFAULT_OUTPUT_BUFFER_SIZE = 0xA00000
|
36
36
|
# Checks for a command starting with _sudo_ by default.
|
data/lib/scutil/exec.rb
CHANGED
@@ -38,5 +38,17 @@ module Scutil
|
|
38
38
|
# Local map has precedence.
|
39
39
|
@options.merge!(options)
|
40
40
|
end
|
41
|
+
|
42
|
+
def conn(pty_needed=false)
|
43
|
+
conn = nil
|
44
|
+
if Scutil.connection_cache.exists? @hostname
|
45
|
+
sys_conn = Scutil.connection_cache.fetch @hostname
|
46
|
+
conn = sys_conn.get_connection @hostname, @username, pty_needed, @options
|
47
|
+
else
|
48
|
+
sys_conn = SystemConnection.new @hostname
|
49
|
+
conn = sys_conn.get_connection @hostname, @username, pty_needed, @options
|
50
|
+
end
|
51
|
+
conn
|
52
|
+
end
|
41
53
|
end
|
42
54
|
end
|
data/scutil.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'scutil'
|
4
|
-
s.version = '0.3.
|
5
|
-
s.date = '2011-10-
|
4
|
+
s.version = '0.3.1'
|
5
|
+
s.date = '2011-10-26'
|
6
6
|
s.summary = 'SSH Command UTILity'
|
7
7
|
s.description = <<-EOF
|
8
8
|
Scutil is a library for conveniently executing commands
|
@@ -13,7 +13,7 @@ EOF
|
|
13
13
|
s.license = 'MIT'
|
14
14
|
s.homepage = 'http://marcantonio.github.com/scutil'
|
15
15
|
s.rdoc_options << '--title' << 'SSH Command UTILity' << '--main' << 'README.rdoc'
|
16
|
-
s.extra_rdoc_files = ['README.rdoc', 'THANKS', 'CHANGELOG.
|
16
|
+
s.extra_rdoc_files = ['README.rdoc', 'THANKS.rdoc', 'CHANGELOG.rdoc']
|
17
17
|
s.add_runtime_dependency 'net-ssh', '>= 2.1.0'
|
18
18
|
s.files = %w(
|
19
19
|
lib/scutil.rb
|
@@ -23,8 +23,8 @@ lib/scutil/exec.rb
|
|
23
23
|
lib/scutil/system_connection.rb
|
24
24
|
scutil.gemspec
|
25
25
|
README.rdoc
|
26
|
-
CHANGELOG.
|
27
|
-
THANKS
|
26
|
+
CHANGELOG.rdoc
|
27
|
+
THANKS.rdoc
|
28
28
|
test/test_scutil.rb
|
29
29
|
)
|
30
30
|
end
|
metadata
CHANGED
@@ -1,39 +1,37 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: scutil
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
4
5
|
prerelease:
|
5
|
-
version: 0.3.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Marc Soda
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-10-26 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: net-ssh
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &19449700 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
23
21
|
version: 2.1.0
|
24
22
|
type: :runtime
|
25
|
-
|
26
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *19449700
|
25
|
+
description: ! " Scutil is a library for conveniently executing commands \n remotely
|
26
|
+
via SSH.\n"
|
27
27
|
email: marcantoniosr@gmail.com
|
28
28
|
executables: []
|
29
|
-
|
30
29
|
extensions: []
|
31
|
-
|
32
|
-
extra_rdoc_files:
|
30
|
+
extra_rdoc_files:
|
33
31
|
- README.rdoc
|
34
|
-
- THANKS
|
35
|
-
- CHANGELOG.
|
36
|
-
files:
|
32
|
+
- THANKS.rdoc
|
33
|
+
- CHANGELOG.rdoc
|
34
|
+
files:
|
37
35
|
- lib/scutil.rb
|
38
36
|
- lib/scutil/connection_cache.rb
|
39
37
|
- lib/scutil/error.rb
|
@@ -41,38 +39,36 @@ files:
|
|
41
39
|
- lib/scutil/system_connection.rb
|
42
40
|
- scutil.gemspec
|
43
41
|
- README.rdoc
|
44
|
-
- CHANGELOG.
|
45
|
-
- THANKS
|
42
|
+
- CHANGELOG.rdoc
|
43
|
+
- THANKS.rdoc
|
46
44
|
- test/test_scutil.rb
|
47
45
|
homepage: http://marcantonio.github.com/scutil
|
48
|
-
licenses:
|
46
|
+
licenses:
|
49
47
|
- MIT
|
50
48
|
post_install_message:
|
51
|
-
rdoc_options:
|
49
|
+
rdoc_options:
|
52
50
|
- --title
|
53
51
|
- SSH Command UTILity
|
54
52
|
- --main
|
55
53
|
- README.rdoc
|
56
|
-
require_paths:
|
54
|
+
require_paths:
|
57
55
|
- lib
|
58
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
57
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version:
|
64
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
63
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version:
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
70
68
|
requirements: []
|
71
|
-
|
72
69
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.8.
|
70
|
+
rubygems_version: 1.8.11
|
74
71
|
signing_key:
|
75
72
|
specification_version: 3
|
76
73
|
summary: SSH Command UTILity
|
77
74
|
test_files: []
|
78
|
-
|