vmc 0.3.14 → 0.3.15.beta.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/config/clients.yml +1 -0
- data/lib/cli/commands/apps.rb +2 -1
- data/lib/cli/commands/user.rb +2 -2
- data/lib/cli/config.rb +6 -7
- data/lib/cli/tunnel_helper.rb +1 -1
- data/lib/cli/version.rb +1 -1
- data/lib/vmc/client.rb +2 -0
- metadata +4 -4
data/config/clients.yml
CHANGED
@@ -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}
|
data/lib/cli/commands/apps.rb
CHANGED
@@ -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 !
|
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}'"
|
data/lib/cli/commands/user.rb
CHANGED
@@ -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
|
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
|
|
data/lib/cli/config.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/cli/tunnel_helper.rb
CHANGED
data/lib/cli/version.rb
CHANGED
data/lib/vmc/client.rb
CHANGED
@@ -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.
|
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:
|
176
|
+
version: 1.3.1
|
177
177
|
requirements: []
|
178
178
|
|
179
179
|
rubyforge_project:
|