net-ssh-simple 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  Net::SSH::Simple is a simple wrapper around Net::SSH and Net::SCP.
4
4
 
5
+ == Features
6
+
7
+ * Friendly, flexible API for SSH and SCP (synchronous and asynchronous)
8
+ * All results are returned as {Net::SSH::Simple::Result}[http://rubydoc.info/gems/net-ssh-simple/Net/SSH/Simple/Result]
9
+ * All errors are raised as {Net::SSH::Simple::Error}[http://rubydoc.info/gems/net-ssh-simple/Net/SSH/Simple/Error]
10
+ * Efficient by default; re-uses transport connections where possible
11
+ * Lots of documentation
12
+ * 100% test coverage
13
+
5
14
  == Installation
6
15
 
7
16
  gem install net-ssh-simple
@@ -9,6 +18,7 @@ Net::SSH::Simple is a simple wrapper around Net::SSH and Net::SCP.
9
18
  == Examples
10
19
 
11
20
  === Block Syntax (synchronous)
21
+
12
22
  Net::SSH::Simple.sync do
13
23
  r = ssh 'example1.com', 'echo "Hello World."'
14
24
  puts r.stdout #=> "Hello World."
@@ -18,6 +28,7 @@ Net::SSH::Simple is a simple wrapper around Net::SSH and Net::SCP.
18
28
  end
19
29
 
20
30
  === Block Syntax (asynchronous)
31
+
21
32
  a = Net::SSH::Simple.async do
22
33
  ssh 'example1.com', 'echo "Hello World."'
23
34
  scp_ul 'example2.com', '/tmp/local_foo', '/tmp/remote_bar'
@@ -42,3 +53,25 @@ Net::SSH::Simple is a simple wrapper around Net::SSH and Net::SCP.
42
53
 
43
54
  See {Net::SSH::Simple}[http://rubydoc.info/gems/net-ssh-simple/Net/SSH/Simple] for more examples and full API.
44
55
 
56
+ == License (MIT)
57
+
58
+ Copyright (C) 2011 by moe@busyloop.net
59
+
60
+ Permission is hereby granted, free of charge, to any person obtaining a copy
61
+ of this software and associated documentation files (the "Software"), to deal
62
+ in the Software without restriction, including without limitation the rights
63
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64
+ copies of the Software, and to permit persons to whom the Software is
65
+ furnished to do so, subject to the following conditions:
66
+
67
+ The above copyright notice and this permission notice shall be included in
68
+ all copies or substantial portions of the Software.
69
+
70
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
76
+ THE SOFTWARE.
77
+
@@ -139,7 +139,7 @@ module Net
139
139
  include Blockenspiel::DSL
140
140
 
141
141
  #
142
- # Result of a Net::SSH::Simple::Operation.
142
+ # Result of the current Net::SSH::Simple::Operation.
143
143
  #
144
144
  # @return [Net::SSH::Simple::Result] Result of the current operation
145
145
  attr_reader :result
@@ -205,6 +205,7 @@ module Net
205
205
  # @param (see Net::SSH::Simple#scp_dl)
206
206
  # @raise [Net::SSH::Simple::Error]
207
207
  # @return [Net::SSH::Simple::Result] Result
208
+ #
208
209
  def self.scp_dl(*args, &block)
209
210
  s = self.new
210
211
  r = s.scp_dl(*args, &block)
@@ -469,8 +470,7 @@ module Net
469
470
  end
470
471
 
471
472
  #
472
- # Encapsulates any Errors that may occur
473
- # during a Net::SSH::Simple operation.
473
+ # Error that occured during a Net::SSH::Simple operation.
474
474
  #
475
475
  class Error < RuntimeError
476
476
  # Reference to the underlying Net::SSH Exception
@@ -492,8 +492,18 @@ module Net
492
492
  #
493
493
  # Result of a Net::SSH::Simple operation.
494
494
  #
495
- # This Mash contains various information that may
496
- # be relevant to your interests.
495
+ # @attr [String] host Hostname/IP address
496
+ # @attr [String] cmd Shell command (SSH only)
497
+ # @attr [Time] start_at Operation start timestamp
498
+ # @attr [Time] finish_at Operation finish timestamp
499
+ # @attr [String] stdout Output to stdout (SSH only)
500
+ # @attr [String] stderr Output to stderr (SSH only)
501
+ # @attr [boolean] success
502
+ # @attr [String] exit_code UNIX exit code of the remote command (SSH only)
503
+ # @attr [Integer] total Size of requested file (in bytes, SCP only)
504
+ # @attr [Integer] sent Number of bytes transferred (SCP only)
505
+ # @attr [String] exit_signal
506
+ # Only present if the remote command terminates due to a signal (SSH only)
497
507
  #
498
508
  class Result < Hashie::Mash; end
499
509
  end
@@ -1,7 +1,7 @@
1
1
  module Net
2
2
  module SSH
3
3
  class Simple
4
- VERSION = "0.9.0"
4
+ VERSION = "1.0.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -3,10 +3,10 @@ name: net-ssh-simple
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
+ - 1
6
7
  - 0
7
- - 9
8
8
  - 0
9
- version: 0.9.0
9
+ version: 1.0.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Moe
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-10-22 00:00:00 +02:00
17
+ date: 2011-10-23 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -149,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- hash: 1030525555759223160
152
+ hash: -2521828447030537518
153
153
  segments:
154
154
  - 0
155
155
  version: "0"
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- hash: 1030525555759223160
161
+ hash: -2521828447030537518
162
162
  segments:
163
163
  - 0
164
164
  version: "0"