vmc 0.3.16.beta.1 → 0.3.16.beta.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -336,11 +336,21 @@ module VMC::Cli::Command
336
336
 
337
337
  def check_unreachable_links(path)
338
338
  files = Dir.glob("#{path}/**/*", File::FNM_DOTMATCH)
339
- unreachable_paths = files.select { |f|
340
- File.symlink? f and !Pathname.new(f).realpath.to_s.include? path
341
- } if files
342
- if unreachable_paths.length > 0
343
- err "Can't deploy application containing links '#{unreachable_paths}' that reach outside its root '#{path}'"
339
+
340
+ pwd = Pathname.pwd
341
+
342
+ abspath = File.expand_path(path)
343
+ unreachable = []
344
+ files.each do |f|
345
+ file = Pathname.new(f)
346
+ if file.symlink? && !file.realpath.to_s.start_with?(abspath)
347
+ unreachable << file.relative_path_from(pwd)
348
+ end
349
+ end
350
+
351
+ unless unreachable.empty?
352
+ root = Pathname.new(path).relative_path_from(pwd)
353
+ err "Can't deploy application containing links '#{unreachable}' that reach outside its root '#{root}'"
344
354
  end
345
355
  end
346
356
 
@@ -38,7 +38,7 @@ module VMC::Cli
38
38
  if File.exists?(File.join(where, MANIFEST))
39
39
  @manifest_file = File.join(where, MANIFEST)
40
40
  break
41
- elsif where == "/"
41
+ elsif File.basename(where) == "/"
42
42
  @manifest_file = nil
43
43
  break
44
44
  else
@@ -194,7 +194,7 @@ module VMC::Cli
194
194
  :dst_host => conn_info['hostname'],
195
195
  :dst_port => conn_info['port'],
196
196
  :log_file => STDOUT,
197
- :log_level => "ERROR",
197
+ :log_level => ENV["VMC_TUNNEL_DEBUG"] || "ERROR",
198
198
  :auth_token => auth,
199
199
  :quiet => true
200
200
  })
data/lib/cli/version.rb CHANGED
@@ -2,6 +2,6 @@ module VMC
2
2
  module Cli
3
3
  # This version number is used as the RubyGem release version.
4
4
  # The internal VMC version number is VMC::VERSION.
5
- VERSION = '0.3.16.beta.1'
5
+ VERSION = '0.3.16.beta.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 7
5
- version: 0.3.16.beta.1
5
+ version: 0.3.16.beta.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - VMware
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-09 00:00:00 -08:00
13
+ date: 2012-01-17 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency