cf 1.1.4 → 2.0.0
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/cf/cli/start/login.rb +3 -0
- data/lib/cf/version.rb +1 -1
- data/spec/cf/cli/app/base_spec.rb +2 -2
- data/spec/cf/cli/app/delete_spec.rb +150 -129
- data/spec/cf/cli/app/instances_spec.rb +56 -51
- data/spec/cf/cli/app/push/create_spec.rb +72 -70
- data/spec/cf/cli/app/push_spec.rb +46 -43
- data/spec/cf/cli/app/rename_spec.rb +13 -6
- data/spec/cf/cli/app/scale_spec.rb +9 -4
- data/spec/cf/cli/app/start_spec.rb +28 -23
- data/spec/cf/cli/app/stats_spec.rb +9 -10
- data/spec/cf/cli/domain/map_spec.rb +13 -10
- data/spec/cf/cli/domain/unmap_spec.rb +11 -11
- data/spec/cf/cli/organization/delete_spec.rb +10 -4
- data/spec/cf/cli/organization/orgs_spec.rb +15 -4
- data/spec/cf/cli/organization/rename_spec.rb +7 -5
- data/spec/cf/cli/populators/organization_spec.rb +40 -29
- data/spec/cf/cli/populators/space_spec.rb +51 -40
- data/spec/cf/cli/populators/target_spec.rb +4 -2
- data/spec/cf/cli/route/delete_spec.rb +6 -4
- data/spec/cf/cli/route/map_spec.rb +54 -35
- data/spec/cf/cli/route/unmap_spec.rb +21 -15
- data/spec/cf/cli/service/create_spec.rb +17 -12
- data/spec/cf/cli/service/rename_spec.rb +8 -6
- data/spec/cf/cli/service/services_spec.rb +15 -8
- data/spec/cf/cli/space/create_spec.rb +5 -9
- data/spec/cf/cli/space/delete_spec.rb +9 -8
- data/spec/cf/cli/space/rename_spec.rb +15 -8
- data/spec/cf/cli/space/space_spec.rb +10 -10
- data/spec/cf/cli/space/spaces_spec.rb +11 -5
- data/spec/cf/cli/space/switch_space_spec.rb +7 -7
- data/spec/cf/cli/start/info_spec.rb +3 -1
- data/spec/cf/cli/start/login_spec.rb +1 -1
- data/spec/cf/cli/start/logout_spec.rb +1 -1
- data/spec/cf/cli/start/target_spec.rb +7 -6
- data/spec/cf/cli/user/create_spec.rb +3 -4
- data/spec/cf/cli/user/passwd_spec.rb +2 -4
- data/spec/cf/cli/user/register_spec.rb +4 -4
- data/spec/cf/cli_spec.rb +1 -3
- data/spec/factories/cfoundry/v2/apps_factory.rb +12 -0
- data/spec/factories/cfoundry/v2/clients_factory.rb +4 -0
- data/spec/factories/cfoundry/v2/{domain_factory.rb → domains_factory.rb} +0 -0
- data/spec/factories/cfoundry/v2/organizations_factory.rb +12 -0
- data/spec/factories/cfoundry/v2/{route_factory.rb → routes_factory.rb} +0 -0
- data/spec/factories/cfoundry/v2/service_bindings_factory.rb +11 -0
- data/spec/factories/cfoundry/v2/service_instances_factory.rb +12 -0
- data/spec/factories/cfoundry/v2/service_plans_factory.rb +13 -0
- data/spec/factories/cfoundry/v2/services_factory.rb +14 -0
- data/spec/factories/cfoundry/v2/spaces_factory.rb +12 -0
- data/spec/factories/cfoundry/v2/stacks_factory.rb +11 -0
- data/spec/factories/cfoundry/v2/{user_factory.rb → users_factory.rb} +0 -0
- data/spec/features/push_flow_spec.rb +8 -8
- data/spec/manifests/manifests_spec.rb +34 -51
- data/spec/manifests/plugin_spec.rb +17 -6
- data/spec/spec_helper.rb +0 -1
- data/spec/support/interact_helper.rb +1 -1
- data/spec/tunnel/tunnel_spec.rb +5 -5
- metadata +37 -13
@@ -10,7 +10,7 @@ describe ManifestsPlugin do
|
|
10
10
|
let(:inputs) { Mothership::Inputs.new(Mothership.commands[:push], nil, inputs_hash, given_hash, global_hash) }
|
11
11
|
let(:plugin) { ManifestsPlugin.new(command, inputs) }
|
12
12
|
|
13
|
-
let(:client) {
|
13
|
+
let(:client) { build(:client) }
|
14
14
|
|
15
15
|
before do
|
16
16
|
plugin.stub(:manifest) { manifest }
|
@@ -199,10 +199,14 @@ describe ManifestsPlugin do
|
|
199
199
|
context "and a name is given" do
|
200
200
|
context "and the name is present in the manifest" do
|
201
201
|
let(:given_hash) { { :name => "a" } }
|
202
|
+
let(:app) { build :app, :name => "a" }
|
203
|
+
|
204
|
+
before do
|
205
|
+
client.stub(:apps => [app])
|
206
|
+
client.stub(:app_by_name).with("a").and_return(app)
|
207
|
+
end
|
202
208
|
|
203
209
|
context "and the app exists" do
|
204
|
-
let(:app) { fake :app, :name => "a" }
|
205
|
-
let(:client) { fake_client :apps => [app] }
|
206
210
|
|
207
211
|
context "and --reset was given" do
|
208
212
|
let(:inputs_hash) { { :reset => true } }
|
@@ -220,6 +224,8 @@ describe ManifestsPlugin do
|
|
220
224
|
end
|
221
225
|
|
222
226
|
context "and the app does NOT exist" do
|
227
|
+
let(:app) { nil }
|
228
|
+
|
223
229
|
it "pushes a new app with the inputs from the manifest" do
|
224
230
|
wrapped.should_receive(:call).with(anything) do |inputs|
|
225
231
|
expect(inputs.given).to eq(
|
@@ -243,6 +249,11 @@ describe ManifestsPlugin do
|
|
243
249
|
# cf push ./abc
|
244
250
|
context "and a path is given" do
|
245
251
|
context "and there are apps matching that path in the manifest" do
|
252
|
+
before do
|
253
|
+
client.stub(:apps => [build(:app), build(:app)])
|
254
|
+
client.stub(:app_by_name)
|
255
|
+
end
|
256
|
+
|
246
257
|
let(:manifest) do
|
247
258
|
{ :applications => [
|
248
259
|
{ :name => "a",
|
@@ -288,7 +299,7 @@ describe ManifestsPlugin do
|
|
288
299
|
let(:manifest) { nil }
|
289
300
|
|
290
301
|
it "asks to save the manifest when uploading the application" do
|
291
|
-
|
302
|
+
should_ask("Save configuration?", :default => false)
|
292
303
|
wrapped.stub(:call) { plugin.filter(:push_app, app) }
|
293
304
|
subject
|
294
305
|
end
|
@@ -300,11 +311,11 @@ describe ManifestsPlugin do
|
|
300
311
|
before do
|
301
312
|
plugin.stub(:from_manifest) { "PATH" }
|
302
313
|
app.changes.clear
|
314
|
+
client.stub(:apps => [app])
|
303
315
|
end
|
304
316
|
|
305
|
-
let(:client) { fake_client(:apps => [app]) }
|
306
317
|
let(:manifest_memory) { "256M" }
|
307
|
-
let(:app) {
|
318
|
+
let(:app) { build(:app, :name => "a", :memory => 256) }
|
308
319
|
let(:manifest) { { :name => "a", :memory => manifest_memory } }
|
309
320
|
|
310
321
|
subject { plugin.send(:push_input_for, manifest, inputs) }
|
data/spec/spec_helper.rb
CHANGED
data/spec/tunnel/tunnel_spec.rb
CHANGED
@@ -24,7 +24,7 @@ describe CFTunnel do
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
let(:client) {
|
27
|
+
let(:client) { build(:client) }
|
28
28
|
let(:service) { NullObject.new }
|
29
29
|
|
30
30
|
subject { CFTunnel.new(client, service) }
|
@@ -32,16 +32,16 @@ describe CFTunnel do
|
|
32
32
|
describe "#open!" do
|
33
33
|
describe "creating a route for caldecott" do
|
34
34
|
let!(:app) { NullObject.new("app") }
|
35
|
-
let!(:domain) {
|
36
|
-
let!(:route) {
|
37
|
-
let!(:space) {
|
35
|
+
let!(:domain) { build(:domain, :owning_organization => nil) }
|
36
|
+
let!(:route) { build(:route) }
|
37
|
+
let!(:space) { build(:space) }
|
38
38
|
let(:host) { "caldecott" }
|
39
39
|
|
40
40
|
before do
|
41
41
|
subject.stub(:random_helper_url) { "caldecott" }
|
42
42
|
client.stub(:app) { app }
|
43
43
|
client.stub(:current_space) { space }
|
44
|
-
client.stub(:domains) { [
|
44
|
+
client.stub(:domains) { [build(:domain, :owning_organization => build(:organization)), domain] }
|
45
45
|
end
|
46
46
|
|
47
47
|
it "adds a new route to caldecott app" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
13
|
+
date: 2013-06-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -49,17 +49,23 @@ dependencies:
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.0.1.rc1
|
55
|
+
- - <
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '2.1'
|
55
58
|
type: :runtime
|
56
59
|
prerelease: false
|
57
60
|
version_requirements: !ruby/object:Gem::Requirement
|
58
61
|
none: false
|
59
62
|
requirements:
|
60
|
-
- -
|
63
|
+
- - ! '>='
|
61
64
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
65
|
+
version: 2.0.1.rc1
|
66
|
+
- - <
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.1'
|
63
69
|
- !ruby/object:Gem::Dependency
|
64
70
|
name: interact
|
65
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -493,9 +499,18 @@ files:
|
|
493
499
|
- spec/cf/cli/user/register_spec.rb
|
494
500
|
- spec/cf/cli_spec.rb
|
495
501
|
- spec/console/console_spec.rb
|
496
|
-
- spec/factories/cfoundry/v2/
|
497
|
-
- spec/factories/cfoundry/v2/
|
498
|
-
- spec/factories/cfoundry/v2/
|
502
|
+
- spec/factories/cfoundry/v2/apps_factory.rb
|
503
|
+
- spec/factories/cfoundry/v2/clients_factory.rb
|
504
|
+
- spec/factories/cfoundry/v2/domains_factory.rb
|
505
|
+
- spec/factories/cfoundry/v2/organizations_factory.rb
|
506
|
+
- spec/factories/cfoundry/v2/routes_factory.rb
|
507
|
+
- spec/factories/cfoundry/v2/service_bindings_factory.rb
|
508
|
+
- spec/factories/cfoundry/v2/service_instances_factory.rb
|
509
|
+
- spec/factories/cfoundry/v2/service_plans_factory.rb
|
510
|
+
- spec/factories/cfoundry/v2/services_factory.rb
|
511
|
+
- spec/factories/cfoundry/v2/spaces_factory.rb
|
512
|
+
- spec/factories/cfoundry/v2/stacks_factory.rb
|
513
|
+
- spec/factories/cfoundry/v2/users_factory.rb
|
499
514
|
- spec/features/account_lifecycle_spec.rb
|
500
515
|
- spec/features/create_user_spec.rb
|
501
516
|
- spec/features/login_spec.rb
|
@@ -534,7 +549,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
534
549
|
version: '0'
|
535
550
|
segments:
|
536
551
|
- 0
|
537
|
-
hash: -
|
552
|
+
hash: -3456553480456892639
|
538
553
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
539
554
|
none: false
|
540
555
|
requirements:
|
@@ -644,9 +659,18 @@ test_files:
|
|
644
659
|
- spec/cf/cli/user/register_spec.rb
|
645
660
|
- spec/cf/cli_spec.rb
|
646
661
|
- spec/console/console_spec.rb
|
647
|
-
- spec/factories/cfoundry/v2/
|
648
|
-
- spec/factories/cfoundry/v2/
|
649
|
-
- spec/factories/cfoundry/v2/
|
662
|
+
- spec/factories/cfoundry/v2/apps_factory.rb
|
663
|
+
- spec/factories/cfoundry/v2/clients_factory.rb
|
664
|
+
- spec/factories/cfoundry/v2/domains_factory.rb
|
665
|
+
- spec/factories/cfoundry/v2/organizations_factory.rb
|
666
|
+
- spec/factories/cfoundry/v2/routes_factory.rb
|
667
|
+
- spec/factories/cfoundry/v2/service_bindings_factory.rb
|
668
|
+
- spec/factories/cfoundry/v2/service_instances_factory.rb
|
669
|
+
- spec/factories/cfoundry/v2/service_plans_factory.rb
|
670
|
+
- spec/factories/cfoundry/v2/services_factory.rb
|
671
|
+
- spec/factories/cfoundry/v2/spaces_factory.rb
|
672
|
+
- spec/factories/cfoundry/v2/stacks_factory.rb
|
673
|
+
- spec/factories/cfoundry/v2/users_factory.rb
|
650
674
|
- spec/features/account_lifecycle_spec.rb
|
651
675
|
- spec/features/create_user_spec.rb
|
652
676
|
- spec/features/login_spec.rb
|