cf 4.2.1.rc1 → 4.2.1.rc2

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.
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "4.2.1.rc1".freeze
2
+ VERSION = "4.2.1.rc2".freeze
3
3
  end
@@ -59,7 +59,7 @@ module CF
59
59
  stub_ask("Password", anything) { "password1" }
60
60
  stub_ask("Verify Password", anything) { confirmation }
61
61
 
62
- CF::Populators::Organization.stub(:new) { stub(:organization, :populate_and_save! => org) }
62
+ CF::Populators::Organization.stub(:new) { double(:organization, :populate_and_save! => org) }
63
63
  client.stub(:register).with("some-angry-dude@example.com", "password1") { user }
64
64
  user.stub(:update!)
65
65
  end
@@ -1,26 +1,26 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe CFMicro::McfCommand do
4
- describe 'micro_status' do
5
- shared_examples 'micro common inputs' do
6
- describe 'inputs' do
7
- subject { command.inputs }
8
- it { expect(subject[:vmx][:description]).to eq "Path to micro.vmx" }
9
- it { expect(subject[:password][:description]).to eq "Cleartext password for guest VM vcap user" }
10
- end
4
+ shared_examples 'micro common inputs' do
5
+ describe 'inputs' do
6
+ subject { command.inputs }
7
+ it { expect(subject[:vmx][:description]).to eq "Path to micro.vmx" }
8
+ it { expect(subject[:password][:description]).to eq "Cleartext password for guest VM vcap user" }
9
+ end
11
10
 
12
- describe 'arguments' do
13
- subject { command.arguments }
11
+ describe 'arguments' do
12
+ subject { command.arguments }
14
13
 
15
- it 'has the correct argument order' do
16
- should eq([
17
- {:type => :required, :value => nil, :name => :vmx},
18
- {:type => :optional, :value => nil, :name => :password}
19
- ])
20
- end
14
+ it 'has the correct argument order' do
15
+ should eq([
16
+ {:type => :required, :value => nil, :name => :vmx},
17
+ {:type => :optional, :value => nil, :name => :password}
18
+ ])
21
19
  end
22
20
  end
21
+ end
23
22
 
23
+ describe 'micro_status' do
24
24
  describe '#metadata' do
25
25
  let(:command) { Mothership.commands[:micro_status] }
26
26
 
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.2.1.rc1
4
+ version: 4.2.1.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -405,7 +405,6 @@ files:
405
405
  - lib/cf/cli/space/switch.rb
406
406
  - lib/cf/cli/start/base.rb
407
407
  - lib/cf/cli/start/colors.rb
408
- - lib/cf/cli/start/info.rb
409
408
  - lib/cf/cli/start/login.rb
410
409
  - lib/cf/cli/start/logout.rb
411
410
  - lib/cf/cli/start/target.rb
@@ -556,7 +555,6 @@ files:
556
555
  - spec/cf/cli/space/spaces_spec.rb
557
556
  - spec/cf/cli/space/switch_space_spec.rb
558
557
  - spec/cf/cli/start/help_spec.rb
559
- - spec/cf/cli/start/info_spec.rb
560
558
  - spec/cf/cli/start/login_spec.rb
561
559
  - spec/cf/cli/start/logout_spec.rb
562
560
  - spec/cf/cli/start/target_prettifier_spec.rb
@@ -619,6 +617,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
619
617
  - - ! '>='
620
618
  - !ruby/object:Gem::Version
621
619
  version: '0'
620
+ segments:
621
+ - 0
622
+ hash: -4538612442505593071
622
623
  required_rubygems_version: !ruby/object:Gem::Requirement
623
624
  none: false
624
625
  requirements:
@@ -733,7 +734,6 @@ test_files:
733
734
  - spec/cf/cli/space/spaces_spec.rb
734
735
  - spec/cf/cli/space/switch_space_spec.rb
735
736
  - spec/cf/cli/start/help_spec.rb
736
- - spec/cf/cli/start/info_spec.rb
737
737
  - spec/cf/cli/start/login_spec.rb
738
738
  - spec/cf/cli/start/logout_spec.rb
739
739
  - spec/cf/cli/start/target_prettifier_spec.rb
@@ -1,65 +0,0 @@
1
- require "cf/cli/start/base"
2
-
3
- module CF::Start
4
- class Info < Base
5
- def precondition
6
- check_target
7
- end
8
-
9
- desc "Display information on the current target, user, etc."
10
- group :start
11
- input :services, :desc => "List supported services", :alias => "-s",
12
- :default => false
13
- input :all, :desc => "Show all information", :alias => "-a",
14
- :default => false
15
- def info
16
- all = input[:all]
17
-
18
- if all || input[:services]
19
- services = with_progress("Getting services") { client.services }
20
- end
21
-
22
- if all || !services
23
- info = client.info
24
-
25
- line if services
26
- line info[:description]
27
- line
28
- line "target: #{b(client.target)}"
29
-
30
- indented do
31
- line "version: #{info[:version]}"
32
- line "support: #{info[:support]}"
33
- end
34
-
35
- if (user = client.current_user)
36
- line
37
- line "user: #{b(user.email || user.guid)}"
38
- end
39
- end
40
-
41
- if services
42
- line unless quiet?
43
-
44
- if services.empty? && !quiet?
45
- line "#{d("none")}"
46
- elsif input[:quiet]
47
- services.each do |s|
48
- line s.label
49
- end
50
- else
51
- table(
52
- ["service", "version", "provider", "plans", "description"],
53
- services.sort_by(&:label).collect { |s|
54
- [c(s.label, :name),
55
- s.version,
56
- s.provider,
57
- s.service_plans.collect(&:name).join(", "),
58
- s.description
59
- ]
60
- })
61
- end
62
- end
63
- end
64
- end
65
- end
@@ -1,107 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe CF::Start::Info do
4
- let(:services) { false }
5
- let(:all) { false }
6
-
7
- let(:client) do
8
- build(:client).tap do |client|
9
- client.stub(:services => Array.new(3) { build(:service) })
10
- end
11
- end
12
-
13
- let(:target_info) do
14
- { :description => "Some description",
15
- :version => 2,
16
- :support => "http://example.com"
17
- }
18
- end
19
-
20
- before do
21
- described_class.any_instance.stub(:client).and_return(client)
22
- end
23
-
24
- describe 'metadata' do
25
- let(:command) { Mothership.commands[:info] }
26
-
27
- describe 'command' do
28
- subject { command }
29
- its(:description) { should eq "Display information on the current target, user, etc." }
30
- it { expect(Mothership::Help.group(:start)).to include(subject) }
31
- end
32
-
33
- include_examples 'inputs must have descriptions'
34
-
35
- describe 'flags' do
36
- subject { command.flags }
37
-
38
- its(["-s"]) { should eq :services }
39
- its(["-a"]) { should eq :all }
40
- end
41
-
42
- describe 'arguments' do
43
- subject { command.arguments }
44
- it { should be_empty }
45
- end
46
- end
47
-
48
-
49
- subject { cf %W[info --#{bool_flag(:services)} --#{bool_flag(:all)} --no-force --no-quiet] }
50
-
51
- context 'when given no flags' do
52
- it "displays target information" do
53
- client.should_receive(:info).and_return(target_info)
54
-
55
- subject
56
-
57
- stdout.rewind
58
- expect(stdout.readline).to eq "Some description\n"
59
- expect(stdout.readline).to eq "\n"
60
- expect(stdout.readline).to eq "target: #{client.target}\n"
61
- expect(stdout.readline).to eq " version: 2\n"
62
- expect(stdout.readline).to eq " support: http://example.com\n"
63
- end
64
- end
65
-
66
- context 'when given --services' do
67
- let(:services) { true }
68
-
69
- it 'does not grab /info' do
70
- client.should_not_receive(:info)
71
- subject
72
- end
73
-
74
- it 'lists services on the target' do
75
- subject
76
-
77
- stdout.rewind
78
- expect(stdout.readline).to match /Getting services.*OK/
79
- expect(stdout.readline).to eq "\n"
80
- expect(stdout.readline).to match /service\s+version\s+provider\s+plans\s+description/
81
-
82
- client.services.sort_by(&:label).each do |s|
83
- expect(stdout.readline).to match /#{s.label}\s+#{s.version}\s+#{s.provider}.+#{s.description}/
84
- end
85
- end
86
- end
87
-
88
- context 'when given --all' do
89
- let(:all) { true }
90
-
91
- it 'runs as --services' do
92
- client.should_receive(:info).and_return(target_info)
93
-
94
- subject
95
-
96
- stdout.rewind
97
- expect(stdout.readline).to match /Getting services.*OK/
98
- end
99
- end
100
-
101
- context 'when there is no target' do
102
- let(:client) { nil }
103
- it_behaves_like "an error that gets passed through",
104
- :with_exception => CF::UserError,
105
- :with_message => "Please select a target with 'cf target'."
106
- end
107
- end