vmc 0.3.14 → 0.3.15.beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ redis:
3
3
 
4
4
  mysql:
5
5
  mysql: mysql --protocol=TCP --host=${host} --port=${port} --user=${user} --password=${password} ${name}
6
+ mysqldump: mysqldump --protocol=TCP --host=${host} --port=${port} --user=${user} --password=${password} ${name} > ${Output file}
6
7
 
7
8
  mongodb:
8
9
  mongo: mongo --host ${host} --port ${port} -u ${user} -p ${password} ${name}
@@ -1,5 +1,6 @@
1
1
  require 'digest/sha1'
2
2
  require 'fileutils'
3
+ require 'pathname'
3
4
  require 'tempfile'
4
5
  require 'tmpdir'
5
6
  require 'set'
@@ -577,7 +578,7 @@ module VMC::Cli::Command
577
578
  path = Dir.pwd
578
579
  files = Dir.glob("#{path}/**/*", File::FNM_DOTMATCH)
579
580
  unreachable_paths = files.select { |f|
580
- File.symlink? f and !File.expand_path(File.readlink(f)).include? path
581
+ File.symlink? f and !Pathname.new(f).realpath.to_s.include? path
581
582
  } if files
582
583
  if unreachable_paths.length > 0
583
584
  err "Can't deploy application containing links '#{unreachable_paths}' that reach outside its root '#{path}'"
@@ -25,11 +25,11 @@ module VMC::Cli::Command
25
25
  login_and_save_token(email, password)
26
26
  say "Successfully logged into [#{target_url}]".green
27
27
  rescue VMC::Client::TargetError
28
- display "Problem with login, invalid account or password.".red
28
+ display "Problem with login, invalid account or password when attempting to login to '#{target_url}'".red
29
29
  retry if (tries += 1) < 3 && prompt_ok && !@options[:password]
30
30
  exit 1
31
31
  rescue => e
32
- display "Problem with login, #{e}, try again or register for an account.".red
32
+ display "Problem with login to '#{target_url}', #{e}, try again or register for an account.".red
33
33
  exit 1
34
34
  end
35
35
 
@@ -28,14 +28,9 @@ module VMC::Cli
28
28
  return @target_url if @target_url
29
29
  target_file = File.expand_path(TARGET_FILE)
30
30
  if File.exists? target_file
31
- @target_url = lock_and_read(target_file).strip!
32
- ha = @target_url.split('.')
33
- ha.shift
34
- @suggest_url = ha.join('.')
35
- @suggest_url = DEFAULT_SUGGEST if @suggest_url.empty?
31
+ @target_url = lock_and_read(target_file).strip
36
32
  else
37
33
  @target_url = DEFAULT_TARGET
38
- @suggest_url = DEFAULT_SUGGEST
39
34
  end
40
35
  @target_url = "http://#{@target_url}" unless /^https?/ =~ @target_url
41
36
  @target_url = @target_url.gsub(/\/+$/, '')
@@ -43,7 +38,11 @@ module VMC::Cli
43
38
  end
44
39
 
45
40
  def suggest_url
46
- target_url
41
+ return @suggest_url if @suggest_url
42
+ ha = target_url.split('.')
43
+ ha.shift
44
+ @suggest_url = ha.join('.')
45
+ @suggest_url = DEFAULT_SUGGEST if @suggest_url.empty?
47
46
  @suggest_url
48
47
  end
49
48
 
@@ -242,7 +242,7 @@ module VMC::Cli
242
242
  when "user", "username"
243
243
  info["username"]
244
244
  else
245
- info[$1] || err("Unknown symbol '#{$1}'")
245
+ info[$1] || ask($1)
246
246
  end
247
247
  end
248
248
  end
@@ -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.14'
5
+ VERSION = '0.3.15.beta.1'
6
6
  end
7
7
  end
@@ -104,6 +104,8 @@ class VMC::Client
104
104
  end
105
105
  upload_data[:resources] = resource_manifest.to_json if resource_manifest
106
106
  http_post("#{VMC::APPS_PATH}/#{name}/application", upload_data)
107
+ rescue RestClient::ServerBrokeConnection
108
+ retry
107
109
  end
108
110
 
109
111
  def delete_app(name)
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.3.14
4
+ prerelease: 7
5
+ version: 0.3.15.beta.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - VMware
@@ -171,9 +171,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
- - - ">="
174
+ - - ">"
175
175
  - !ruby/object:Gem::Version
176
- version: "0"
176
+ version: 1.3.1
177
177
  requirements: []
178
178
 
179
179
  rubyforge_project: