vmc 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ require 'digest/sha1'
2
2
  require 'fileutils'
3
3
  require 'tempfile'
4
4
  require 'tmpdir'
5
+ require 'set'
5
6
 
6
7
  module VMC::Cli::Command
7
8
 
@@ -34,6 +35,8 @@ module VMC::Cli::Command
34
35
  HEALTH_TICKS = 5/SLEEP_TIME
35
36
  TAIL_TICKS = 25/SLEEP_TIME
36
37
  GIVEUP_TICKS = 120/SLEEP_TIME
38
+ YES_SET = Set.new(["y", "Y", "yes", "YES"])
39
+
37
40
 
38
41
  def start(appname, push = false)
39
42
  app = client.app_info(appname)
@@ -362,7 +365,17 @@ module VMC::Cli::Command
362
365
  err "Application '#{appname}' already exists, use update or delete." if app_exists?(appname)
363
366
  end
364
367
 
365
- url = ask("Application Deployed URL: '#{appname}.#{VMC::Cli::Config.suggest_url}'? ") unless no_prompt || url
368
+ unless no_prompt || url
369
+ url = ask("Application Deployed URL: '#{appname}.#{VMC::Cli::Config.suggest_url}'? ")
370
+
371
+ # common error case is for prompted users to answer y or Y or yes or YES to this ask() resulting in an
372
+ # unintended URL of y. Special case this common error
373
+ if YES_SET.member?(url)
374
+ #silently revert to the stock url
375
+ url = "#{appname}.#{VMC::Cli::Config.suggest_url}"
376
+ end
377
+ end
378
+
366
379
  url = "#{appname}.#{VMC::Cli::Config.suggest_url}" if url.nil? || url.empty?
367
380
 
368
381
  # Detect the appropriate framework.
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.6'
5
+ VERSION = '0.3.7'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 29
4
5
  prerelease:
5
- version: 0.3.6
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 7
10
+ version: 0.3.7
6
11
  platform: ruby
7
12
  authors:
8
13
  - VMware
@@ -10,7 +15,7 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-04-07 00:00:00 -05:00
18
+ date: 2011-04-07 00:00:00 -07:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
@@ -21,6 +26,11 @@ dependencies:
21
26
  requirements:
22
27
  - - ~>
23
28
  - !ruby/object:Gem::Version
29
+ hash: 1
30
+ segments:
31
+ - 1
32
+ - 5
33
+ - 1
24
34
  version: 1.5.1
25
35
  type: :runtime
26
36
  version_requirements: *id001
@@ -32,6 +42,11 @@ dependencies:
32
42
  requirements:
33
43
  - - ~>
34
44
  - !ruby/object:Gem::Version
45
+ hash: 13
46
+ segments:
47
+ - 2
48
+ - 0
49
+ - 1
35
50
  version: 2.0.1
36
51
  type: :runtime
37
52
  version_requirements: *id002
@@ -43,6 +58,11 @@ dependencies:
43
58
  requirements:
44
59
  - - ~>
45
60
  - !ruby/object:Gem::Version
61
+ hash: 13
62
+ segments:
63
+ - 1
64
+ - 6
65
+ - 1
46
66
  version: 1.6.1
47
67
  type: :runtime
48
68
  version_requirements: *id003
@@ -54,9 +74,19 @@ dependencies:
54
74
  requirements:
55
75
  - - ">="
56
76
  - !ruby/object:Gem::Version
77
+ hash: 13
78
+ segments:
79
+ - 1
80
+ - 6
81
+ - 1
57
82
  version: 1.6.1
58
83
  - - <
59
84
  - !ruby/object:Gem::Version
85
+ hash: 11
86
+ segments:
87
+ - 1
88
+ - 7
89
+ - 0
60
90
  version: 1.7.0
61
91
  type: :runtime
62
92
  version_requirements: *id004
@@ -68,6 +98,11 @@ dependencies:
68
98
  requirements:
69
99
  - - ~>
70
100
  - !ruby/object:Gem::Version
101
+ hash: 3
102
+ segments:
103
+ - 1
104
+ - 4
105
+ - 2
71
106
  version: 1.4.2
72
107
  type: :runtime
73
108
  version_requirements: *id005
@@ -79,6 +114,9 @@ dependencies:
79
114
  requirements:
80
115
  - - ">="
81
116
  - !ruby/object:Gem::Version
117
+ hash: 3
118
+ segments:
119
+ - 0
82
120
  version: "0"
83
121
  type: :development
84
122
  version_requirements: *id006
@@ -90,6 +128,11 @@ dependencies:
90
128
  requirements:
91
129
  - - ~>
92
130
  - !ruby/object:Gem::Version
131
+ hash: 27
132
+ segments:
133
+ - 1
134
+ - 3
135
+ - 0
93
136
  version: 1.3.0
94
137
  type: :development
95
138
  version_requirements: *id007
@@ -101,6 +144,11 @@ dependencies:
101
144
  requirements:
102
145
  - - ~>
103
146
  - !ruby/object:Gem::Version
147
+ hash: 3
148
+ segments:
149
+ - 1
150
+ - 5
151
+ - 0
104
152
  version: 1.5.0
105
153
  type: :development
106
154
  version_requirements: *id008
@@ -117,45 +165,45 @@ files:
117
165
  - LICENSE
118
166
  - README.md
119
167
  - Rakefile
120
- - lib/cli.rb
121
- - lib/vmc.rb
122
- - lib/vmc/const.rb
123
- - lib/vmc/client.rb
124
- - lib/cli/frameworks.rb
125
- - lib/cli/commands/misc.rb
126
- - lib/cli/commands/base.rb
168
+ - lib/cli/config.rb
169
+ - lib/cli/services_helper.rb
127
170
  - lib/cli/commands/admin.rb
128
- - lib/cli/commands/user.rb
129
171
  - lib/cli/commands/services.rb
172
+ - lib/cli/commands/misc.rb
130
173
  - lib/cli/commands/apps.rb
174
+ - lib/cli/commands/user.rb
175
+ - lib/cli/commands/base.rb
176
+ - lib/cli/usage.rb
177
+ - lib/cli/frameworks.rb
178
+ - lib/cli/errors.rb
131
179
  - lib/cli/version.rb
132
- - lib/cli/core_ext.rb
133
180
  - lib/cli/zip_util.rb
134
- - lib/cli/errors.rb
135
- - lib/cli/usage.rb
136
- - lib/cli/services_helper.rb
137
- - lib/cli/config.rb
181
+ - lib/cli/core_ext.rb
138
182
  - lib/cli/runner.rb
139
- - spec/unit/cli_opts_spec.rb
183
+ - lib/vmc/client.rb
184
+ - lib/vmc/const.rb
185
+ - lib/cli.rb
186
+ - lib/vmc.rb
140
187
  - spec/unit/client_spec.rb
188
+ - spec/unit/cli_opts_spec.rb
141
189
  - spec/spec_helper.rb
142
- - spec/assets/service_already_exists.txt
143
- - spec/assets/login_success.txt
144
- - spec/assets/good_create_app.txt
145
190
  - spec/assets/info_return_bad.txt
146
- - spec/assets/info_authenticated.txt
191
+ - spec/assets/info_return.txt
192
+ - spec/assets/service_listings.txt
193
+ - spec/assets/delete_app.txt
194
+ - spec/assets/user_info.txt
195
+ - spec/assets/good_create_app.txt
196
+ - spec/assets/service_already_exists.txt
147
197
  - spec/assets/login_fail.txt
148
- - spec/assets/app_listings.txt
149
- - spec/assets/good_create_service.txt
150
- - spec/assets/service_not_found.txt
151
198
  - spec/assets/app_info.txt
152
- - spec/assets/bad_create_app.txt
153
- - spec/assets/delete_app.txt
199
+ - spec/assets/login_success.txt
200
+ - spec/assets/app_listings.txt
154
201
  - spec/assets/global_service_listings.txt
202
+ - spec/assets/bad_create_app.txt
155
203
  - spec/assets/sample_token.txt
156
- - spec/assets/user_info.txt
157
- - spec/assets/info_return.txt
158
- - spec/assets/service_listings.txt
204
+ - spec/assets/service_not_found.txt
205
+ - spec/assets/info_authenticated.txt
206
+ - spec/assets/good_create_service.txt
159
207
  - bin/vmc
160
208
  has_rdoc: true
161
209
  homepage: http://vmware.com
@@ -171,12 +219,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
219
  requirements:
172
220
  - - ">="
173
221
  - !ruby/object:Gem::Version
222
+ hash: 3
223
+ segments:
224
+ - 0
174
225
  version: "0"
175
226
  required_rubygems_version: !ruby/object:Gem::Requirement
176
227
  none: false
177
228
  requirements:
178
229
  - - ">="
179
230
  - !ruby/object:Gem::Version
231
+ hash: 3
232
+ segments:
233
+ - 0
180
234
  version: "0"
181
235
  requirements: []
182
236