dew 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -92,6 +92,13 @@ class EnvironmentsCommand < Clamp::Command
92
92
  end
93
93
 
94
94
  subcommand "scp", "ie. scp ENV_NAME:file1 file2 or scp file1 ENV_NAME:file2" do
95
+ option ['-C', '--compress'] , :flag , 'Compression enable. Passes the -C flag to ssh(1) to enable compression.', :default => false
96
+ option ['-p', '--preserve'] , :flag , 'Preserves modification times, access times, and modes from the original file.', :default => false
97
+ option ['-q', '--quiet'] , :flag , 'Quiet mode: disables the progress meter as well as warning and diagnostic messages from ssh(1).', :default => false
98
+ option ['-r', '--recursive'], :flag , 'Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal.', :default => false
99
+ option ['-v', '--verbose'] , :flag , 'Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems.', :default => false
100
+ option ['-l', '--limit'] , 'LIMIT' , 'Limits the used bandwidth, specified in Kbit/s.'
101
+ option ['-P', '--port'] , 'PORT' , "Specifies the port to connect to on the remote host."
95
102
  option ['-i', '--instance'], 'INSTANCE_NUMBER', "Which instance to SSH to", :default => 1 do |s|
96
103
  Integer(s)
97
104
  end
@@ -115,7 +122,15 @@ class EnvironmentsCommand < Clamp::Command
115
122
  if server.credentials
116
123
  args = server.credentials.split
117
124
  host = args.pop
118
- command = "scp #{args.join(' ')} #{direction == :to ? "#{[host, src_file].join(':')} #{dest_file}" : "#{[host, src_file].join(':')} #{dest_file}"}"
125
+ options = []
126
+ options << '-c' if compress?
127
+ options << '-p' if preserve?
128
+ optoins << '-q' if quiet?
129
+ options << '-r' if recursive?
130
+ options << '-v' if verbose?
131
+ options << "-l #{limit}" if limit
132
+ options << "-P#{port}" if port
133
+ command = "scp #{options.join(' ')} #{args.join(' ')} #{direction == :to ? "#{[host, src_file].join(':')} #{dest_file}" : "#{[host, src_file].join(':')} #{dest_file}"}"
119
134
  Inform.debug("Running %{command}", :command => command)
120
135
  system command
121
136
  end
@@ -1,3 +1,3 @@
1
1
  module Dew
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dew
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - PlayUp Devops
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-28 00:00:00 Z
13
+ date: 2011-08-31 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: inform