vmc 0.5.0.beta.1 → 0.5.0.beta.2

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/lib/vmc/cli.rb CHANGED
@@ -266,7 +266,7 @@ module VMC
266
266
 
267
267
  def ensure_config_dir
268
268
  config = File.expand_path(VMC::CONFIG_DIR)
269
- Dir.mkdir(config) unless File.exist? config
269
+ FileUtils.mkdir_p(config) unless File.exist? config
270
270
  end
271
271
 
272
272
  def set_target(url)
@@ -14,7 +14,7 @@ module VMC::App
14
14
  input :path, :desc => "Path containing the bits", :default => "."
15
15
  input :url, :desc => "URL to bind to app"
16
16
  input :memory, :desc => "Memory limit"
17
- input :instances, :desc => "Number of instances to run"
17
+ input :instances, :desc => "Number of instances to run", :type => :integer
18
18
  input :framework, :desc => "Framework to use", :from_given => by_name(:framework)
19
19
  input :runtime, :desc => "Runtime to use", :from_given => by_name(:runtime)
20
20
  input :command, :desc => "Startup command for standalone app"
@@ -70,11 +70,13 @@ module VMC::App
70
70
  url = input[:url, app.name]
71
71
 
72
72
  mapped_url = false
73
- until !url || mapped_url
73
+ until url == "none" || !url || mapped_url
74
74
  begin
75
75
  invoke :map, :app => app, :url => url
76
76
  mapped_url = true
77
77
  rescue CFoundry::RouteHostTaken, CFoundry::UriAlreadyTaken => e
78
+ raise if force?
79
+
78
80
  line c(e.description, :bad)
79
81
  line
80
82
 
@@ -14,11 +14,7 @@ module VMC::App
14
14
 
15
15
  options[:default] = choices.first if choices.size == 1
16
16
 
17
- url = ask "URL", options
18
-
19
- unless url == "none"
20
- url
21
- end
17
+ ask "URL", options
22
18
  end
23
19
 
24
20
  def ask_memory(default)
data/lib/vmc/constants.rb CHANGED
@@ -1,12 +1,13 @@
1
1
  module VMC
2
- OLD_TARGET_FILE = "~/.vmc_target"
3
- OLD_TOKENS_FILE = "~/.vmc_token"
2
+ OLD_TARGET_FILE = "~/.vmc_target".freeze
3
+ OLD_TOKENS_FILE = "~/.vmc_token".freeze
4
4
 
5
- CONFIG_DIR = "~/.vmc"
6
- LOGS_DIR = "#{CONFIG_DIR}/logs"
7
- PLUGINS_FILE = "#{CONFIG_DIR}/plugins.yml"
8
- TARGET_FILE = "#{CONFIG_DIR}/target"
9
- TOKENS_FILE = "#{CONFIG_DIR}/tokens.yml"
10
- COLORS_FILE = "#{CONFIG_DIR}/colors.yml"
11
- CRASH_FILE = "#{CONFIG_DIR}/crash"
5
+ CONFIG_DIR = (defined?(SPEC_ROOT) ? "#{SPEC_ROOT}/tmp/.vmc" : "~/.vmc").freeze
6
+
7
+ LOGS_DIR = "#{CONFIG_DIR}/logs".freeze
8
+ PLUGINS_FILE = "#{CONFIG_DIR}/plugins.yml".freeze
9
+ TARGET_FILE = "#{CONFIG_DIR}/target".freeze
10
+ TOKENS_FILE = "#{CONFIG_DIR}/tokens.yml".freeze
11
+ COLORS_FILE = "#{CONFIG_DIR}/colors.yml".freeze
12
+ CRASH_FILE = "#{CONFIG_DIR}/crash".freeze
12
13
  end
data/lib/vmc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.5.0.beta.1".freeze
2
+ VERSION = "0.5.0.beta.2".freeze
3
3
  end
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "sinatra"
@@ -0,0 +1,6 @@
1
+ require "rubygems"
2
+ require "sinatra"
3
+
4
+ get "/" do
5
+ "Hello, world!"
6
+ end
@@ -0,0 +1,85 @@
1
+ require 'spec_helper'
2
+
3
+ if ENV['VMC_TEST_USER'] && ENV['VMC_TEST_PASSWORD'] && ENV['VMC_TEST_TARGET']
4
+ describe 'A new user tries to use VMC against v1 production' do
5
+ let(:target) { ENV['VMC_TEST_TARGET'] }
6
+ let(:username) { ENV['VMC_TEST_USER'] }
7
+ let(:password) { ENV['VMC_TEST_PASSWORD'] }
8
+ let(:output) { StringIO.new }
9
+ let(:out) { output.string.gsub(/\. \x08([\x08\. ]+)/, "... ") } # trim animated dots
10
+
11
+ let(:app) {
12
+ fuzz =
13
+ if defined? TRAVIS_BUILD_ID
14
+ TRAVIS_BUILD_ID
15
+ else
16
+ Time.new.to_f.to_s.gsub(".", "_")
17
+ end
18
+
19
+ "hello-sinatra-#{fuzz}"
20
+ }
21
+
22
+ before do
23
+ FileUtils.rm_rf VMC::CONFIG_DIR
24
+ stub(VMC::CLI).exit { |code| code }
25
+ WebMock.allow_net_connect!
26
+ end
27
+
28
+ after do
29
+ with_output_to { VMC::CLI.start %W(delete #{app} -f) }
30
+ end
31
+
32
+ it 'and pushes a simple sinatra app using defaults as much as possible' do
33
+ vmc_ok %W(target #{target}) do |out|
34
+ expect(out).to eq <<-OUT.strip_heredoc
35
+ Setting target to https://#{target}... OK
36
+ OUT
37
+ end
38
+
39
+ vmc_ok %W(login #{username} --password #{password}) do |out|
40
+ expect(out).to eq <<-OUT.strip_heredoc
41
+ target: https://#{target}
42
+
43
+ Authenticating... OK
44
+ OUT
45
+ end
46
+
47
+ vmc_fail %W(app #{app}) do |out|
48
+ expect(out).to eq <<-OUT.strip_heredoc
49
+ Unknown app '#{app}'.
50
+ OUT
51
+ end
52
+
53
+ Dir.chdir("#{SPEC_ROOT}/assets/hello-sinatra") do
54
+ vmc_ok %W(push #{app} --runtime ruby19 --url #{app}-vmc-test.cloudfoundry.com -f) do |out|
55
+ expect(out).to eq <<-OUT.strip_heredoc
56
+ Creating #{app}... OK
57
+
58
+ Updating #{app}... OK
59
+ Uploading #{app}... OK
60
+ Starting #{app}... OK
61
+ Checking #{app}... OK
62
+ OUT
63
+ end
64
+
65
+ vmc_ok %W(push #{app}) do |out|
66
+ expect(out).to eq <<-OUT.strip_heredoc
67
+ Uploading #{app}... OK
68
+ Stopping #{app}... OK
69
+
70
+ Starting #{app}... OK
71
+ Checking #{app}... OK
72
+ OUT
73
+ end
74
+ end
75
+
76
+ vmc_ok %W(delete #{app} -f) do |out|
77
+ expect(out).to eq <<-OUT.strip_heredoc
78
+ Deleting #{app}... OK
79
+ OUT
80
+ end
81
+ end
82
+ end
83
+ else
84
+ $stderr.puts 'Skipping integration specs; please provide $VMC_TEST_TARGET, $VMC_TEST_USER, and $VMC_TEST_PASSWORD'
85
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,27 +1,35 @@
1
- require "rspec"
1
+ SPEC_ROOT = File.dirname(__FILE__).freeze
2
2
 
3
+ require "rspec"
3
4
  require "cfoundry"
5
+ require "cfoundry/spec_helper"
4
6
  require "vmc"
5
- require 'factory_girl'
6
- require 'webmock/rspec'
7
7
 
8
8
  Dir[File.expand_path('../support/**/*.rb', __FILE__)].each do |file|
9
9
  require file
10
10
  end
11
11
 
12
- FactoryGirl.find_definitions
13
-
14
12
  RSpec.configure do |c|
15
13
  c.mock_with :rr
16
14
  end
17
15
 
16
+ class String
17
+ def strip_heredoc
18
+ min = scan(/^[ \t]*(?=\S)/).min
19
+ indent = min ? min.size : 0
20
+ gsub(/^[ \t]{#{indent}}/, '')
21
+ end
22
+ end
18
23
 
19
- def reassign_stdout_to(output)
24
+ def with_output_to(output = StringIO.new)
20
25
  old_out = $stdout
26
+ old_err = $stderr
21
27
  $stdout = output
22
- yield $stdout
28
+ $stderr = output
29
+ yield output
23
30
  ensure
24
31
  $stdout = old_out
32
+ $stderr = old_err
25
33
  end
26
34
 
27
35
  def name_list(xs)
@@ -30,4 +38,4 @@ def name_list(xs)
30
38
  else
31
39
  xs.collect(&:name).join(", ")
32
40
  end
33
- end
41
+ end
@@ -0,0 +1,19 @@
1
+ def vmc_ok(argv)
2
+ with_output_to do |out|
3
+ code = VMC::CLI.start(argv + ["--no-script"])
4
+ yield strip_progress_dots(out.string) if block_given?
5
+ expect(code).to eq 0
6
+ end
7
+ end
8
+
9
+ def vmc_fail(argv)
10
+ with_output_to do |out|
11
+ code = VMC::CLI.start(argv + ["--no-script"])
12
+ yield strip_progress_dots(out.string) if block_given?
13
+ expect(code).to eq 1
14
+ end
15
+ end
16
+
17
+ def strip_progress_dots(str)
18
+ str.gsub(/\. \x08([\x08\. ]+)/, "... ")
19
+ end
@@ -276,6 +276,16 @@ describe VMC::App::Create do
276
276
  subject
277
277
  end
278
278
 
279
+ context "when 'none' is given" do
280
+ it "does not perform any mapping" do
281
+ mock_ask('URL', anything) { "none" }
282
+
283
+ dont_allow(create).invoke(:map, anything)
284
+
285
+ subject
286
+ end
287
+ end
288
+
279
289
  context "when mapping fails" do
280
290
  before do
281
291
  mock_ask('URL', anything) { url_choices.first }
@@ -20,7 +20,7 @@ describe VMC::Organization::Orgs do
20
20
  end
21
21
 
22
22
  subject do
23
- reassign_stdout_to output do
23
+ with_output_to output do
24
24
  Mothership.new.invoke(:orgs, inputs, given, global)
25
25
  end
26
26
  end
@@ -21,7 +21,7 @@ describe VMC::Space::Spaces do
21
21
  end
22
22
 
23
23
  subject do
24
- reassign_stdout_to output do
24
+ with_output_to output do
25
25
  Mothership.new.invoke(:spaces, inputs, given, global)
26
26
  end
27
27
  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: 2835543005
4
+ hash: -2770117636
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
9
  - 0
10
10
  - beta
11
- - 1
12
- version: 0.5.0.beta.1
11
+ - 2
12
+ version: 0.5.0.beta.2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Alex Suraci
@@ -17,7 +17,8 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-12-12 00:00:00 Z
20
+ date: 2012-12-14 00:00:00 -08:00
21
+ default_executable:
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
23
24
  name: json_pure
@@ -27,18 +28,32 @@ dependencies:
27
28
  requirements:
28
29
  - - ~>
29
30
  - !ruby/object:Gem::Version
30
- hash: 5
31
+ hash: 3
31
32
  segments:
32
33
  - 1
33
34
  - 6
34
- - 5
35
- version: 1.6.5
35
+ version: "1.6"
36
36
  type: :runtime
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency
39
- name: interact
39
+ name: multi_json
40
40
  prerelease: false
41
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ hash: 9
47
+ segments:
48
+ - 1
49
+ - 3
50
+ version: "1.3"
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: interact
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
42
57
  none: false
43
58
  requirements:
44
59
  - - ~>
@@ -50,27 +65,27 @@ dependencies:
50
65
  - 0
51
66
  version: 0.5.0
52
67
  type: :runtime
53
- version_requirements: *id002
68
+ version_requirements: *id003
54
69
  - !ruby/object:Gem::Dependency
55
70
  name: cfoundry
56
71
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
72
+ requirement: &id004 !ruby/object:Gem::Requirement
58
73
  none: false
59
74
  requirements:
60
75
  - - ~>
61
76
  - !ruby/object:Gem::Version
62
- hash: 27
77
+ hash: 25
63
78
  segments:
64
79
  - 0
65
80
  - 4
66
- - 10
67
- version: 0.4.10
81
+ - 11
82
+ version: 0.4.11
68
83
  type: :runtime
69
- version_requirements: *id003
84
+ version_requirements: *id004
70
85
  - !ruby/object:Gem::Dependency
71
86
  name: clouseau
72
87
  prerelease: false
73
- requirement: &id004 !ruby/object:Gem::Requirement
88
+ requirement: &id005 !ruby/object:Gem::Requirement
74
89
  none: false
75
90
  requirements:
76
91
  - - ~>
@@ -82,11 +97,11 @@ dependencies:
82
97
  - 2
83
98
  version: 0.0.2
84
99
  type: :runtime
85
- version_requirements: *id004
100
+ version_requirements: *id005
86
101
  - !ruby/object:Gem::Dependency
87
102
  name: mothership
88
103
  prerelease: false
89
- requirement: &id005 !ruby/object:Gem::Requirement
104
+ requirement: &id006 !ruby/object:Gem::Requirement
90
105
  none: false
91
106
  requirements:
92
107
  - - ~>
@@ -98,27 +113,27 @@ dependencies:
98
113
  - 0
99
114
  version: 0.4.0
100
115
  type: :runtime
101
- version_requirements: *id005
116
+ version_requirements: *id006
102
117
  - !ruby/object:Gem::Dependency
103
118
  name: manifests-vmc-plugin
104
119
  prerelease: false
105
- requirement: &id006 !ruby/object:Gem::Requirement
120
+ requirement: &id007 !ruby/object:Gem::Requirement
106
121
  none: false
107
122
  requirements:
108
123
  - - ~>
109
124
  - !ruby/object:Gem::Version
110
- hash: 19
125
+ hash: 43
111
126
  segments:
112
127
  - 0
113
128
  - 4
114
- - 14
115
- version: 0.4.14
129
+ - 18
130
+ version: 0.4.18
116
131
  type: :runtime
117
- version_requirements: *id006
132
+ version_requirements: *id007
118
133
  - !ruby/object:Gem::Dependency
119
134
  name: tunnel-dummy-vmc-plugin
120
135
  prerelease: false
121
- requirement: &id007 !ruby/object:Gem::Requirement
136
+ requirement: &id008 !ruby/object:Gem::Requirement
122
137
  none: false
123
138
  requirements:
124
139
  - - ~>
@@ -130,22 +145,6 @@ dependencies:
130
145
  - 2
131
146
  version: 0.0.2
132
147
  type: :runtime
133
- version_requirements: *id007
134
- - !ruby/object:Gem::Dependency
135
- name: multi_json
136
- prerelease: false
137
- requirement: &id008 !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ~>
141
- - !ruby/object:Gem::Version
142
- hash: 7
143
- segments:
144
- - 1
145
- - 4
146
- - 0
147
- version: 1.4.0
148
- type: :runtime
149
148
  version_requirements: *id008
150
149
  - !ruby/object:Gem::Dependency
151
150
  name: rake
@@ -155,13 +154,11 @@ dependencies:
155
154
  requirements:
156
155
  - - ~>
157
156
  - !ruby/object:Gem::Version
158
- hash: 11
157
+ hash: 25
159
158
  segments:
160
159
  - 0
161
160
  - 9
162
- - 2
163
- - 2
164
- version: 0.9.2.2
161
+ version: "0.9"
165
162
  type: :development
166
163
  version_requirements: *id009
167
164
  - !ruby/object:Gem::Dependency
@@ -172,78 +169,58 @@ dependencies:
172
169
  requirements:
173
170
  - - ~>
174
171
  - !ruby/object:Gem::Version
175
- hash: 35
172
+ hash: 21
176
173
  segments:
177
174
  - 2
178
175
  - 11
179
- - 0
180
- version: 2.11.0
176
+ version: "2.11"
181
177
  type: :development
182
178
  version_requirements: *id010
183
- - !ruby/object:Gem::Dependency
184
- name: simplecov
185
- prerelease: false
186
- requirement: &id011 !ruby/object:Gem::Requirement
187
- none: false
188
- requirements:
189
- - - ~>
190
- - !ruby/object:Gem::Version
191
- hash: 15
192
- segments:
193
- - 0
194
- - 6
195
- - 4
196
- version: 0.6.4
197
- type: :development
198
- version_requirements: *id011
199
179
  - !ruby/object:Gem::Dependency
200
180
  name: webmock
201
181
  prerelease: false
202
- requirement: &id012 !ruby/object:Gem::Requirement
182
+ requirement: &id011 !ruby/object:Gem::Requirement
203
183
  none: false
204
184
  requirements:
205
185
  - - ~>
206
186
  - !ruby/object:Gem::Version
207
- hash: 51
187
+ hash: 29
208
188
  segments:
209
189
  - 1
210
190
  - 9
211
- - 0
212
- version: 1.9.0
191
+ version: "1.9"
213
192
  type: :development
214
- version_requirements: *id012
193
+ version_requirements: *id011
215
194
  - !ruby/object:Gem::Dependency
216
195
  name: rr
217
196
  prerelease: false
218
- requirement: &id013 !ruby/object:Gem::Requirement
197
+ requirement: &id012 !ruby/object:Gem::Requirement
219
198
  none: false
220
199
  requirements:
221
200
  - - ~>
222
201
  - !ruby/object:Gem::Version
223
- hash: 31
202
+ hash: 15
224
203
  segments:
225
204
  - 1
226
205
  - 0
227
- - 4
228
- version: 1.0.4
206
+ version: "1.0"
229
207
  type: :development
230
- version_requirements: *id013
208
+ version_requirements: *id012
231
209
  - !ruby/object:Gem::Dependency
232
210
  name: factory_girl
233
211
  prerelease: false
234
- requirement: &id014 !ruby/object:Gem::Requirement
212
+ requirement: &id013 !ruby/object:Gem::Requirement
235
213
  none: false
236
214
  requirements:
237
215
  - - ~>
238
216
  - !ruby/object:Gem::Version
239
- hash: 31
217
+ hash: 15
240
218
  segments:
241
219
  - 2
242
220
  - 6
243
- - 4
244
- version: 2.6.4
221
+ version: "2.6"
245
222
  type: :development
246
- version_requirements: *id014
223
+ version_requirements: *id013
247
224
  description:
248
225
  email:
249
226
  - asuraci@vmware.com
@@ -256,117 +233,109 @@ extra_rdoc_files: []
256
233
  files:
257
234
  - LICENSE
258
235
  - Rakefile
259
- - lib/vmc/cli/app/app.rb
260
- - lib/vmc/cli/app/apps.rb
261
- - lib/vmc/cli/app/base.rb
262
- - lib/vmc/cli/app/crashes.rb
263
- - lib/vmc/cli/app/delete.rb
264
- - lib/vmc/cli/app/deprecated.rb
265
- - lib/vmc/cli/app/env.rb
266
- - lib/vmc/cli/app/files.rb
236
+ - lib/vmc/version.rb
237
+ - lib/vmc/detect.rb
238
+ - lib/vmc/errors.rb
239
+ - lib/vmc/spacing.rb
240
+ - lib/vmc/spec_helper.rb
241
+ - lib/vmc/plugin.rb
242
+ - lib/vmc/constants.rb
243
+ - lib/vmc/cli.rb
244
+ - lib/vmc/cli/organization/create.rb
245
+ - lib/vmc/cli/organization/rename.rb
246
+ - lib/vmc/cli/organization/orgs.rb
247
+ - lib/vmc/cli/organization/base.rb
248
+ - lib/vmc/cli/organization/delete.rb
249
+ - lib/vmc/cli/organization/org.rb
250
+ - lib/vmc/cli/start/target_interactions.rb
251
+ - lib/vmc/cli/start/targets.rb
252
+ - lib/vmc/cli/start/register.rb
253
+ - lib/vmc/cli/start/colors.rb
254
+ - lib/vmc/cli/start/target.rb
255
+ - lib/vmc/cli/start/logout.rb
256
+ - lib/vmc/cli/start/base.rb
257
+ - lib/vmc/cli/start/info.rb
258
+ - lib/vmc/cli/start/login.rb
259
+ - lib/vmc/cli/route/create_route.rb
260
+ - lib/vmc/cli/route/routes.rb
261
+ - lib/vmc/cli/route/base.rb
262
+ - lib/vmc/cli/route/delete.rb
263
+ - lib/vmc/cli/app/scale.rb
267
264
  - lib/vmc/cli/app/health.rb
268
- - lib/vmc/cli/app/instances.rb
269
- - lib/vmc/cli/app/logs.rb
265
+ - lib/vmc/cli/app/files.rb
270
266
  - lib/vmc/cli/app/push/create.rb
271
267
  - lib/vmc/cli/app/push/interactions.rb
272
268
  - lib/vmc/cli/app/push/sync.rb
273
- - lib/vmc/cli/app/push.rb
274
269
  - lib/vmc/cli/app/rename.rb
275
- - lib/vmc/cli/app/restart.rb
276
270
  - lib/vmc/cli/app/routes.rb
277
- - lib/vmc/cli/app/scale.rb
271
+ - lib/vmc/cli/app/deprecated.rb
272
+ - lib/vmc/cli/app/logs.rb
273
+ - lib/vmc/cli/app/instances.rb
278
274
  - lib/vmc/cli/app/start.rb
279
- - lib/vmc/cli/app/stats.rb
275
+ - lib/vmc/cli/app/app.rb
280
276
  - lib/vmc/cli/app/stop.rb
281
- - lib/vmc/cli/domain/add_domain.rb
282
- - lib/vmc/cli/domain/base.rb
277
+ - lib/vmc/cli/app/env.rb
278
+ - lib/vmc/cli/app/base.rb
279
+ - lib/vmc/cli/app/stats.rb
280
+ - lib/vmc/cli/app/apps.rb
281
+ - lib/vmc/cli/app/restart.rb
282
+ - lib/vmc/cli/app/delete.rb
283
+ - lib/vmc/cli/app/push.rb
284
+ - lib/vmc/cli/app/crashes.rb
285
+ - lib/vmc/cli/interactive.rb
283
286
  - lib/vmc/cli/domain/create_domain.rb
284
- - lib/vmc/cli/domain/delete_domain.rb
285
287
  - lib/vmc/cli/domain/domains.rb
288
+ - lib/vmc/cli/domain/delete_domain.rb
289
+ - lib/vmc/cli/domain/base.rb
286
290
  - lib/vmc/cli/domain/remove_domain.rb
287
- - lib/vmc/cli/help.rb
288
- - lib/vmc/cli/interactive.rb
289
- - lib/vmc/cli/organization/base.rb
290
- - lib/vmc/cli/organization/create.rb
291
- - lib/vmc/cli/organization/delete.rb
292
- - lib/vmc/cli/organization/org.rb
293
- - lib/vmc/cli/organization/orgs.rb
294
- - lib/vmc/cli/organization/rename.rb
295
- - lib/vmc/cli/route/base.rb
296
- - lib/vmc/cli/route/create_route.rb
297
- - lib/vmc/cli/route/delete.rb
298
- - lib/vmc/cli/route/routes.rb
299
- - lib/vmc/cli/service/base.rb
291
+ - lib/vmc/cli/domain/add_domain.rb
292
+ - lib/vmc/cli/space/spaces.rb
293
+ - lib/vmc/cli/space/create.rb
294
+ - lib/vmc/cli/space/rename.rb
295
+ - lib/vmc/cli/space/space.rb
296
+ - lib/vmc/cli/space/take.rb
297
+ - lib/vmc/cli/space/base.rb
298
+ - lib/vmc/cli/space/delete.rb
299
+ - lib/vmc/cli/service/service.rb
300
300
  - lib/vmc/cli/service/bind.rb
301
301
  - lib/vmc/cli/service/create.rb
302
- - lib/vmc/cli/service/delete.rb
303
302
  - lib/vmc/cli/service/rename.rb
304
- - lib/vmc/cli/service/service.rb
305
303
  - lib/vmc/cli/service/services.rb
306
304
  - lib/vmc/cli/service/unbind.rb
307
- - lib/vmc/cli/space/base.rb
308
- - lib/vmc/cli/space/create.rb
309
- - lib/vmc/cli/space/delete.rb
310
- - lib/vmc/cli/space/rename.rb
311
- - lib/vmc/cli/space/space.rb
312
- - lib/vmc/cli/space/spaces.rb
313
- - lib/vmc/cli/space/take.rb
314
- - lib/vmc/cli/start/base.rb
315
- - lib/vmc/cli/start/colors.rb
316
- - lib/vmc/cli/start/info.rb
317
- - lib/vmc/cli/start/login.rb
318
- - lib/vmc/cli/start/logout.rb
319
- - lib/vmc/cli/start/register.rb
320
- - lib/vmc/cli/start/target.rb
321
- - lib/vmc/cli/start/target_interactions.rb
322
- - lib/vmc/cli/start/targets.rb
323
- - lib/vmc/cli/user/base.rb
305
+ - lib/vmc/cli/service/base.rb
306
+ - lib/vmc/cli/service/delete.rb
307
+ - lib/vmc/cli/user/passwd.rb
324
308
  - lib/vmc/cli/user/create.rb
309
+ - lib/vmc/cli/user/base.rb
325
310
  - lib/vmc/cli/user/delete.rb
326
- - lib/vmc/cli/user/passwd.rb
327
311
  - lib/vmc/cli/user/users.rb
328
- - lib/vmc/cli.rb
329
- - lib/vmc/constants.rb
330
- - lib/vmc/detect.rb
331
- - lib/vmc/errors.rb
332
- - lib/vmc/plugin.rb
333
- - lib/vmc/spacing.rb
334
- - lib/vmc/spec_helper.rb
335
- - lib/vmc/version.rb
312
+ - lib/vmc/cli/help.rb
336
313
  - lib/vmc.rb
337
- - spec/assets/hello-sinatra/Gemfile.lock
338
- - spec/factories/app_factory.rb
339
- - spec/factories/client_factory.rb
340
- - spec/factories/domain_factory.rb
341
- - spec/factories/factory.rb
342
- - spec/factories/framework_factory.rb
343
- - spec/factories/organization_factory.rb
344
- - spec/factories/route_factory.rb
345
- - spec/factories/runtime_factory.rb
346
- - spec/factories/service_binding_factory.rb
347
- - spec/factories/service_factory.rb
348
- - spec/factories/service_instance_factory.rb
349
- - spec/factories/service_plan_factory.rb
350
- - spec/factories/space_factory.rb
351
- - spec/spec_helper.rb
352
314
  - spec/support/interact_helpers.rb
353
- - spec/vmc/cli/app/push/create_spec.rb
354
- - spec/vmc/cli/app/push_spec.rb
355
- - spec/vmc/cli/app/rename_spec.rb
315
+ - spec/support/feature_helpers.rb
316
+ - spec/spec_helper.rb
317
+ - spec/vmc/detect_spec.rb
356
318
  - spec/vmc/cli/organization/orgs_spec.rb
357
319
  - spec/vmc/cli/organization/rename_spec.rb
320
+ - spec/vmc/cli/start/login_spec.rb
321
+ - spec/vmc/cli/start/info_spec.rb
358
322
  - spec/vmc/cli/route/delete_route_spec.rb
323
+ - spec/vmc/cli/app/push_spec.rb
324
+ - spec/vmc/cli/app/push/create_spec.rb
325
+ - spec/vmc/cli/app/rename_spec.rb
326
+ - spec/vmc/cli/space/spaces_spec.rb
327
+ - spec/vmc/cli/space/rename_spec.rb
328
+ - spec/vmc/cli/service/unbind_spec.rb
359
329
  - spec/vmc/cli/service/bind_spec.rb
360
330
  - spec/vmc/cli/service/delete_spec.rb
361
- - spec/vmc/cli/service/rename_spec.rb
362
331
  - spec/vmc/cli/service/service_spec.rb
363
- - spec/vmc/cli/service/unbind_spec.rb
364
- - spec/vmc/cli/space/rename_spec.rb
365
- - spec/vmc/cli/space/spaces_spec.rb
366
- - spec/vmc/cli/start/info_spec.rb
367
- - spec/vmc/cli/start/login_spec.rb
368
- - spec/vmc/detect_spec.rb
332
+ - spec/vmc/cli/service/rename_spec.rb
333
+ - spec/assets/hello-sinatra/Gemfile
334
+ - spec/assets/hello-sinatra/main.rb
335
+ - spec/assets/hello-sinatra/Gemfile.lock
336
+ - spec/features/new_user_flow_spec.rb
369
337
  - bin/vmc
338
+ has_rdoc: true
370
339
  homepage: http://cloudfoundry.com/
371
340
  licenses: []
372
341
 
@@ -398,40 +367,31 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
367
  requirements: []
399
368
 
400
369
  rubyforge_project: vmc
401
- rubygems_version: 1.8.24
370
+ rubygems_version: 1.6.2
402
371
  signing_key:
403
372
  specification_version: 3
404
373
  summary: Friendly command-line interface for Cloud Foundry.
405
374
  test_files:
406
- - spec/assets/hello-sinatra/Gemfile.lock
407
- - spec/factories/app_factory.rb
408
- - spec/factories/client_factory.rb
409
- - spec/factories/domain_factory.rb
410
- - spec/factories/factory.rb
411
- - spec/factories/framework_factory.rb
412
- - spec/factories/organization_factory.rb
413
- - spec/factories/route_factory.rb
414
- - spec/factories/runtime_factory.rb
415
- - spec/factories/service_binding_factory.rb
416
- - spec/factories/service_factory.rb
417
- - spec/factories/service_instance_factory.rb
418
- - spec/factories/service_plan_factory.rb
419
- - spec/factories/space_factory.rb
420
- - spec/spec_helper.rb
421
375
  - spec/support/interact_helpers.rb
422
- - spec/vmc/cli/app/push/create_spec.rb
423
- - spec/vmc/cli/app/push_spec.rb
424
- - spec/vmc/cli/app/rename_spec.rb
376
+ - spec/support/feature_helpers.rb
377
+ - spec/spec_helper.rb
378
+ - spec/vmc/detect_spec.rb
425
379
  - spec/vmc/cli/organization/orgs_spec.rb
426
380
  - spec/vmc/cli/organization/rename_spec.rb
381
+ - spec/vmc/cli/start/login_spec.rb
382
+ - spec/vmc/cli/start/info_spec.rb
427
383
  - spec/vmc/cli/route/delete_route_spec.rb
384
+ - spec/vmc/cli/app/push_spec.rb
385
+ - spec/vmc/cli/app/push/create_spec.rb
386
+ - spec/vmc/cli/app/rename_spec.rb
387
+ - spec/vmc/cli/space/spaces_spec.rb
388
+ - spec/vmc/cli/space/rename_spec.rb
389
+ - spec/vmc/cli/service/unbind_spec.rb
428
390
  - spec/vmc/cli/service/bind_spec.rb
429
391
  - spec/vmc/cli/service/delete_spec.rb
430
- - spec/vmc/cli/service/rename_spec.rb
431
392
  - spec/vmc/cli/service/service_spec.rb
432
- - spec/vmc/cli/service/unbind_spec.rb
433
- - spec/vmc/cli/space/rename_spec.rb
434
- - spec/vmc/cli/space/spaces_spec.rb
435
- - spec/vmc/cli/start/info_spec.rb
436
- - spec/vmc/cli/start/login_spec.rb
437
- - spec/vmc/detect_spec.rb
393
+ - spec/vmc/cli/service/rename_spec.rb
394
+ - spec/assets/hello-sinatra/Gemfile
395
+ - spec/assets/hello-sinatra/main.rb
396
+ - spec/assets/hello-sinatra/Gemfile.lock
397
+ - spec/features/new_user_flow_spec.rb
@@ -1,14 +0,0 @@
1
- FactoryGirl.define do
2
- factory :app, :class => CFoundry::V2::App do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
- memory 128
6
- total_instances 0
7
- production false
8
- state "STOPPED"
9
-
10
- initialize_with do
11
- CFoundry::V2::App.new(nil, nil)
12
- end
13
- end
14
- end
@@ -1,25 +0,0 @@
1
- FactoryGirl.define do
2
- factory :client, :class => CFoundry::V2::Client do
3
- ignore do
4
- routes []
5
- apps []
6
- frameworks []
7
- runtimes []
8
- service_instances []
9
- spaces []
10
- organizations []
11
- logged_in true
12
- end
13
-
14
- after_build do |client, evaluator|
15
- RR.stub(client).logged_in? { evaluator.logged_in }
16
- RR.stub(client).routes { evaluator.routes }
17
- RR.stub(client).apps { evaluator.apps }
18
- RR.stub(client).frameworks { evaluator.frameworks }
19
- RR.stub(client).runtimes { evaluator.runtimes }
20
- RR.stub(client).service_instances { evaluator.service_instances }
21
- RR.stub(client).spaces { evaluator.spaces }
22
- RR.stub(client).organizations { evaluator.organizations }
23
- end
24
- end
25
- end
@@ -1,10 +0,0 @@
1
- FactoryGirl.define do
2
- factory :domain, :class => CFoundry::V2::Domain do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
-
6
- initialize_with do
7
- CFoundry::V2::Domain.new(nil, nil)
8
- end
9
- end
10
- end
@@ -1,4 +0,0 @@
1
- FactoryGirl.define do
2
- sequence(:random_string) {|n| "random_#{n}_string" }
3
- sequence(:guid) {|n| "random_#{n}_guid" }
4
- end
@@ -1,10 +0,0 @@
1
- FactoryGirl.define do
2
- factory :framework, :class => CFoundry::V2::Framework do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
-
6
- initialize_with do
7
- CFoundry::V2::Framework.new(nil, nil)
8
- end
9
- end
10
- end
@@ -1,23 +0,0 @@
1
- FactoryGirl.define do
2
- factory :organization, :class => CFoundry::V2::Organization do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
-
6
- ignore do
7
- spaces []
8
- domains []
9
- end
10
-
11
- initialize_with do
12
- CFoundry::V2::Organization.new(nil, nil)
13
- end
14
-
15
- after_build do |org, evaluator|
16
- evaluator.spaces.each { |s| s.organization = org }
17
- evaluator.domains.each { |s| s.owning_organization = org }
18
-
19
- RR.stub(org).spaces { evaluator.spaces }
20
- RR.stub(org).domains { evaluator.domains }
21
- end
22
- end
23
- end
@@ -1,11 +0,0 @@
1
- FactoryGirl.define do
2
- factory :route, :class => CFoundry::V2::Route do
3
- guid { FactoryGirl.generate(:guid) }
4
- host { FactoryGirl.generate(:random_string) }
5
- association :domain, :factory => :domain, :strategy => :build
6
-
7
- initialize_with do
8
- CFoundry::V2::Route.new(nil, nil)
9
- end
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- FactoryGirl.define do
2
- factory :runtime, :class => CFoundry::V2::Runtime do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
-
6
- initialize_with do
7
- CFoundry::V2::Runtime.new(nil, nil)
8
- end
9
- end
10
- end
@@ -1,9 +0,0 @@
1
- FactoryGirl.define do
2
- factory :service_binding, :class => CFoundry::V2::ServiceBinding do
3
- guid { FactoryGirl.generate(:guid) }
4
-
5
- initialize_with do
6
- CFoundry::V2::ServiceBinding.new(nil, nil)
7
- end
8
- end
9
- end
@@ -1,17 +0,0 @@
1
- FactoryGirl.define do
2
- factory :service, :class => CFoundry::V2::Service do
3
- guid { FactoryGirl.generate(:guid) }
4
- label "redis"
5
- provider "core"
6
- url "http://example.com"
7
- description "small key-value store"
8
- version "2.8"
9
- info_url "http://cloudfoundry.com/redis"
10
- active true
11
-
12
- initialize_with do
13
- CFoundry::V2::Service.new(nil, nil)
14
- end
15
- end
16
- end
17
-
@@ -1,10 +0,0 @@
1
- FactoryGirl.define do
2
- factory :service_instance, :class => CFoundry::V2::ServiceInstance do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
-
6
- initialize_with do
7
- CFoundry::V2::ServiceInstance.new(nil, nil)
8
- end
9
- end
10
- end
@@ -1,11 +0,0 @@
1
- FactoryGirl.define do
2
- factory :service_plan, :class => CFoundry::V2::ServicePlan do
3
- guid { FactoryGirl.generate(:guid) }
4
- name "D100"
5
- description "Filibuster plan"
6
-
7
- initialize_with do
8
- CFoundry::V2::ServicePlan.new(nil, nil)
9
- end
10
- end
11
- end
@@ -1,25 +0,0 @@
1
- FactoryGirl.define do
2
- factory :space, :class => CFoundry::V2::Space do
3
- guid { FactoryGirl.generate(:guid) }
4
- name { FactoryGirl.generate(:random_string) }
5
-
6
- ignore do
7
- apps []
8
- service_instances []
9
- domains []
10
- end
11
-
12
- initialize_with do
13
- CFoundry::V2::Space.new(nil, nil)
14
- end
15
-
16
- after_build do |org, evaluator|
17
- evaluator.apps.each { |s| s.space = org }
18
- evaluator.service_instances.each { |s| s.space = org }
19
-
20
- RR.stub(org).apps { evaluator.apps }
21
- RR.stub(org).service_instances { evaluator.service_instances }
22
- RR.stub(org).domains { evaluator.domains }
23
- end
24
- end
25
- end