net-scp 1.1.0 → 1.1.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.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,8 @@
1
1
 
2
+ === 1.1.1 / 13 May 2013
3
+
4
+ * Allow passing a shell to use when executing scp. [Arthur Schreiber]
5
+
2
6
  === 1.1.0 / 06 Feb 2013
3
7
 
4
8
  * Added public cert. All gem releases are now signed. See INSTALL in readme.
@@ -338,7 +338,14 @@ module Net
338
338
  # (See Net::SCP::Upload and Net::SCP::Download).
339
339
  def start_command(mode, local, remote, options={}, &callback)
340
340
  session.open_channel do |channel|
341
- command = "#{scp_command(mode, options)} #{shellescape remote}"
341
+
342
+ if options[:shell]
343
+ escaped_file = shellescape(remote).gsub(/'/) { |m| "'\\''" }
344
+ command = "#{options[:shell]} -c '#{scp_command(mode, options)} #{escaped_file}'"
345
+ else
346
+ command = "#{scp_command(mode, options)} #{shellescape remote}"
347
+ end
348
+
342
349
  channel.exec(command) do |ch, success|
343
350
  if success
344
351
  channel[:local ] = local
@@ -6,7 +6,7 @@ module Net; class SCP
6
6
  class Version < Net::SSH::Version
7
7
  MAJOR = 1
8
8
  MINOR = 1
9
- TINY = 0
9
+ TINY = 1
10
10
 
11
11
  # The current version, as a Version instance
12
12
  CURRENT = new(MAJOR, MINOR, TINY)
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "net-scp"
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jamis Buck", "Delano Mandelbaum"]
12
12
  s.cert_chain = ["gem-public_cert.pem"]
13
- s.date = "2013-02-06"
13
+ s.date = "2013-05-13"
14
14
  s.description = "A pure Ruby implementation of the SCP client protocol"
15
15
  s.email = "net-ssh@solutious.com"
16
16
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-scp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -38,7 +38,7 @@ cert_chain:
38
38
  MVhNUThCTTJKejBYb1BhblBlMzU0K2xXd2pwa1JLYkZvdy9aYlFIY0NMQ3Ey
39
39
  NCtONmI2ZwpkZ0tmTkR6d2lEcHFDQT09Ci0tLS0tRU5EIENFUlRJRklDQVRF
40
40
  LS0tLS0K
41
- date: 2013-02-06 00:00:00.000000000 Z
41
+ date: 2013-05-13 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: net-ssh
metadata.gz.sig CHANGED
Binary file