vmc 0.4.0.beta.72 → 0.4.0.beta.73

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.
@@ -26,7 +26,7 @@ module VMC::Cli::Command
26
26
  err "Need a password" unless password
27
27
  login_and_save_token(email, password)
28
28
  say "Successfully logged into [#{target_url}]".green
29
- rescue VMC::Client::TargetError
29
+ rescue CFoundry::Denied
30
30
  display "Problem with login, invalid account or password when attempting to login to '#{target_url}'".red
31
31
  retry if (tries += 1) < 3 && prompt_ok && !@options[:password]
32
32
  exit 1
@@ -59,6 +59,7 @@ module VMC::Cli::Command
59
59
 
60
60
  def login_and_save_token(email, password)
61
61
  cfoundry = CFoundry::Client.new(client.target)
62
+ cfoundry.trace = @client.trace
62
63
  token = cfoundry.login(:username => email, :password => password)
63
64
  VMC::Cli::Config.store_token(token, @options[:token_file])
64
65
  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.21'
5
+ VERSION = '0.3.23'
6
6
  end
7
7
  end
@@ -76,12 +76,16 @@ module VMC::Micro
76
76
  path = VMC::Micro.escape_path(VMC::Micro.config_file('offline.conf'))
77
77
  run('CopyFileFromHostToGuest', "#{path} /etc/dnsmasq.d/offline.conf")
78
78
  run('runProgramInGuest', '/usr/bin/touch /var/vcap/micro/offline')
79
+ run('runProgramInGuest',
80
+ "/bin/sed -i -e 's/^[^#]/# &/g' /etc/dnsmasq.d/server || true")
79
81
  restart_dnsmasq
80
82
  end
81
83
 
82
84
  def online!
83
85
  run('runProgramInGuest', '/bin/rm -f /etc/dnsmasq.d/offline.conf')
84
86
  run('runProgramInGuest', '/bin/rm -f /var/vcap/micro/offline')
87
+ run('runProgramInGuest',
88
+ "/bin/sed -i -e 's/^# //g' /etc/dnsmasq.d/server || true")
85
89
  restart_dnsmasq
86
90
  end
87
91
 
@@ -133,7 +137,13 @@ module VMC::Micro
133
137
  vms.map! { |x| x.downcase }
134
138
  vms.include?(@vmx.downcase)
135
139
  else
136
- vms.include?(@vmx)
140
+ # Handle vmx being in a symlinked dir.
141
+ real_path = nil
142
+ begin
143
+ real_path = File.realpath(@vmx)
144
+ rescue
145
+ end
146
+ vms.include?(@vmx) || (real_path && vms.include?(real_path))
137
147
  end
138
148
  end
139
149
 
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.72"
2
+ VERSION = "0.4.0.beta.73"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3315453082
4
+ hash: 1596901731
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 72
12
- version: 0.4.0.beta.72
11
+ - 73
12
+ version: 0.4.0.beta.73
13
13
  platform: ruby
14
14
  authors:
15
15
  - VMware
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-10-19 00:00:00 Z
20
+ date: 2012-10-22 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: json_pure
@@ -171,12 +171,12 @@ dependencies:
171
171
  requirements:
172
172
  - - ~>
173
173
  - !ruby/object:Gem::Version
174
- hash: 37
174
+ hash: 115
175
175
  segments:
176
176
  - 0
177
177
  - 3
178
- - 27
179
- version: 0.3.27
178
+ - 48
179
+ version: 0.3.48
180
180
  type: :runtime
181
181
  version_requirements: *id009
182
182
  - !ruby/object:Gem::Dependency
@@ -265,12 +265,12 @@ dependencies:
265
265
  requirements:
266
266
  - - ~>
267
267
  - !ruby/object:Gem::Version
268
- hash: 77
268
+ hash: 115
269
269
  segments:
270
270
  - 0
271
271
  - 3
272
- - 47
273
- version: 0.3.47
272
+ - 48
273
+ version: 0.3.48
274
274
  type: :runtime
275
275
  version_requirements: *id015
276
276
  - !ruby/object:Gem::Dependency