cf 5.2.0 → 5.2.1.rc2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,6 +6,12 @@ specfile, _ = Dir["*.gemspec"]
6
6
  SPEC = Gem::Specification.load(specfile)
7
7
  CURRENT_VERSION = SPEC.version.to_s.freeze
8
8
 
9
+ namespace :spec do
10
+ RSpec::Core::RakeTask.new(:ci) do |t|
11
+ t.rspec_opts = '-t ~type:integration'
12
+ end
13
+ end
14
+
9
15
  RSpec::Core::RakeTask.new(:spec)
10
16
  task :default => :spec
11
17
 
@@ -3,4 +3,5 @@ require "admin/guid"
3
3
  require "admin/set_quota"
4
4
  require "admin/service_auth_token"
5
5
  require "admin/service_broker/add"
6
+ require "admin/service_broker/remove"
6
7
  require "admin/service_broker/service_brokers"
@@ -6,7 +6,7 @@ module CFAdmin::ServiceBroker
6
6
  check_target
7
7
  end
8
8
 
9
- desc "Add a Service Broker."
9
+ desc "Add a service broker"
10
10
  group :admin
11
11
  input :name, :argument => :optional,
12
12
  :desc => "Broker name"
@@ -25,7 +25,7 @@ module CFAdmin::ServiceBroker
25
25
  broker.token = input[:token]
26
26
  finalize
27
27
 
28
- with_progress("") do
28
+ with_progress("Adding service broker #{broker.name}") do
29
29
  broker.create!
30
30
  end
31
31
  end
@@ -0,0 +1,33 @@
1
+ require "cf/cli"
2
+
3
+ module CFAdmin::ServiceBroker
4
+ class Remove < CF::CLI
5
+ def precondition
6
+ check_target
7
+ end
8
+
9
+ desc "Remove a service broker"
10
+ group :admin
11
+ input :name, :argument => :required,
12
+ :desc => "Service broker to remove",
13
+ :from_given => by_name(:service_broker)
14
+ input :really, :type => :boolean, :forget => true, :hidden => true,
15
+ :default => proc { force? || interact }
16
+
17
+ def remove_service_broker
18
+ broker = input[:name]
19
+ return unless input[:really, broker]
20
+
21
+ with_progress("Removing service broker #{broker.name}") do
22
+ broker.delete!
23
+ end
24
+ end
25
+
26
+ private
27
+
28
+ def ask_really(broker)
29
+ ask("Really remove #{c(broker.name, :name)}?", :default => false)
30
+ end
31
+
32
+ end
33
+ end
@@ -6,13 +6,19 @@ module CFAdmin::ServiceBroker
6
6
  check_target
7
7
  end
8
8
 
9
- desc "List Registered Service Brokers."
9
+ desc "List registered service brokers"
10
10
  group :admin
11
11
 
12
12
  def service_brokers
13
- brokers = client.service_brokers
13
+ brokers = nil
14
+ with_progress('Getting service brokers') do
15
+ brokers = client.service_brokers
16
+ end
17
+
18
+ line unless quiet?
19
+
14
20
  table(
15
- %w(name url),
21
+ %w(Name URL),
16
22
  brokers.collect { |broker|
17
23
  [c(broker.name, :name), broker.broker_url]
18
24
  }
data/lib/cf.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  require "cf/version"
2
2
 
3
- require "cf/object_extensions"
4
-
5
3
  require "cf/cli"
6
4
 
7
5
  command_files = "../cf/cli/{app,route,domain,organization,space,service,start,user}/*.rb"
@@ -5,8 +5,12 @@ module CF::App
5
5
  end
6
6
 
7
7
  def ask_host(name)
8
- ask "Subdomain", :choices => [name, "none"],
9
- :default => name,
8
+ # Use .dup here because when we pass app.name deep into interactive,
9
+ # it needs an unfrozen String because the cli allows people to change
10
+ # this value.
11
+ host = name.dup
12
+ ask "Subdomain", :choices => [host, "none"],
13
+ :default => host,
10
14
  :allow_other => true
11
15
  end
12
16
 
@@ -56,7 +56,6 @@ module CF
56
56
 
57
57
  def handler(event, state)
58
58
  ans = state.answer
59
- pos = state.position
60
59
 
61
60
  exit if event == :eof
62
61
 
@@ -69,7 +68,7 @@ module CF
69
68
  redraw_input(state)
70
69
  end
71
70
 
72
- state.clear_default! if(event != :up)
71
+ state.clear_default! if event != :up
73
72
 
74
73
  # tab with a default accepts it and moves to the end
75
74
  if event == :tab
@@ -18,13 +18,12 @@ module CF::Organization
18
18
  return unless input[:really, org]
19
19
 
20
20
  is_current = org == client.current_organization
21
- @orgs ||= client.organizations(:depth => 0)
22
21
  with_progress("Deleting organization #{c(org.name, :name)}") do
23
- deleted = org.delete!(:recursive => !!input[:recursive])
24
- @orgs.delete(org) if deleted
22
+ org.delete!(:recursive => !!input[:recursive])
25
23
  end
26
24
 
27
- if @orgs.empty?
25
+ orgs = client.organizations_first_page(:depth => 0)
26
+ if orgs.empty?
28
27
  return unless input[:warn]
29
28
 
30
29
  line
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext"
2
+
1
3
  class TargetPrettifier
2
4
  def self.prettify(client, outputter)
3
5
  outputter.line("Target Information (where will apps be pushed):")
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "5.2.0".freeze
2
+ VERSION = "5.2.1.rc2".freeze
3
3
  end
@@ -17,12 +17,12 @@ namespace :gem do
17
17
  end
18
18
 
19
19
  private
20
- def generate_release_notes(old_version)
21
- print_with_purpose "Generating release notes..."
22
- file_name = "release_#{gem_version}"
23
- sh!("anchorman notes --name=#{file_name} --from=v#{old_version}")
24
- sh!("git add release_notes")
25
- end
20
+ #def generate_release_notes(old_version)
21
+ # print_with_purpose "Generating release notes..."
22
+ # file_name = "release_#{gem_version}"
23
+ # sh!("anchorman notes --name=#{file_name} --from=v#{old_version}")
24
+ # sh!("git add release_notes")
25
+ #end
26
26
 
27
27
  def sh!(cmd)
28
28
  `#{cmd}`
@@ -0,0 +1,46 @@
1
+ require 'spec_helper'
2
+
3
+ describe CFAdmin::ServiceBroker::Remove do
4
+
5
+ describe 'command metadata' do
6
+ let(:command) { Mothership.commands[:remove_service_broker] }
7
+ subject { command }
8
+ its(:description) { should eq 'Remove a service broker' }
9
+ it { expect(Mothership::Help.group(:admin)).to include(subject) }
10
+
11
+ include_examples 'inputs must have descriptions'
12
+ end
13
+
14
+ describe 'running the command' do
15
+ let(:client) { build(:client) }
16
+ before do
17
+ CFAdmin::ServiceBroker::Remove.client = client
18
+ end
19
+
20
+ describe 'successful behavior' do
21
+ let(:service_broker) { build(:service_broker, :name => 'somebroker') }
22
+ before do
23
+ client.stub(:service_broker_by_name).with('somebroker').and_return(service_broker)
24
+ service_broker.should_receive(:delete!)
25
+ end
26
+
27
+ it 'removes the service broker' do
28
+ should_ask('Really remove somebroker?', {:default => false}) { true }
29
+
30
+ capture_output { cf %W[remove-service-broker somebroker] }
31
+ expect(output).to say("Removing service broker #{service_broker.name}... OK")
32
+ end
33
+ end
34
+
35
+ describe 'error conditions' do
36
+ context 'when the service broker does not exist' do
37
+ it 'provides a helpful error message' do
38
+ client.stub(:service_broker_by_name).with('doesnotexist').and_return(nil)
39
+
40
+ capture_output { cf %W[remove-service-broker doesnotexist] }
41
+ expect(error_output).to say("Unknown service_broker 'doesnotexist'.")
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -15,8 +15,9 @@ describe CFAdmin::ServiceBroker::ServiceBrokers do
15
15
  let(:brokers_data) { [] }
16
16
  it "says there are no brokers" do
17
17
  client.should_receive(:service_brokers).and_return(brokers_data)
18
+ mock_with_progress("Getting service brokers")
18
19
  cf %W[service-brokers]
19
- expect(stdout.string).to eq("name url\n")
20
+ expect(stdout.string).to eq("\nName URL\n")
20
21
  end
21
22
  end
22
23
 
@@ -25,8 +26,9 @@ describe CFAdmin::ServiceBroker::ServiceBrokers do
25
26
 
26
27
  it "lists the brokers" do
27
28
  client.should_receive(:service_brokers).and_return(brokers_data)
29
+ mock_with_progress("Getting service brokers")
28
30
  cf %W[service-brokers]
29
- expect(stdout.string).to match(/mysql.*mysql.example.com/)
31
+ expect(stdout.string).to match(/\nName.*URL.*\nmysql.*mysql.example.com/)
30
32
  end
31
33
  end
32
34
  end
@@ -192,7 +192,7 @@ module CF
192
192
  end
193
193
 
194
194
  describe "#map_url" do
195
- let(:app) { double(:app, :space => space).as_null_object }
195
+ let(:app) { double(:app, :space => space, name: "app-name").as_null_object }
196
196
  let(:space) { double(:space, :domains => domains) }
197
197
  let(:domains) { [double(:domain, :name => "foo.com")] }
198
198
  let(:hosts) { [app.name] }
@@ -29,6 +29,7 @@ module CF
29
29
  CF::Populators::Organization.any_instance.stub(:populate_and_save!).and_return(organization)
30
30
  organization.stub(:delete!).and_return(true)
31
31
  client.stub(:organizations).and_return(organizations)
32
+ client.stub(:organizations_first_page).and_return(organizations)
32
33
  end
33
34
 
34
35
  context "without the force parameter" do
@@ -43,6 +44,10 @@ module CF
43
44
  end
44
45
 
45
46
  context "when deleting the last organization" do
47
+ before do
48
+ client.stub(:organizations_first_page).and_return([])
49
+ end
50
+
46
51
  it "warns the user what they've done" do
47
52
  subject
48
53
  expect(output).to say("There are no longer any organizations.")
@@ -0,0 +1,11 @@
1
+ FactoryGirl.define do
2
+ factory :service_broker, :class => CFoundry::V2::ServiceBroker do
3
+ sequence(:guid) { |n| "service-broker-guid-#{n}" }
4
+
5
+ ignore do
6
+ client { FactoryGirl.build(:client) }
7
+ end
8
+
9
+ initialize_with { new(guid, client) }
10
+ end
11
+ end
@@ -0,0 +1,46 @@
1
+ require "spec_helper"
2
+ require "webmock/rspec"
3
+
4
+ if ENV['CF_V2_RUN_INTEGRATION']
5
+ describe "A user pushing a new sinatra app", :ruby19 => true do
6
+ let(:run_id) { TRAVIS_BUILD_ID.to_s + Time.new.to_f.to_s.gsub(".", "_") }
7
+ let(:app) { "hello-sinatra-#{run_id}" }
8
+
9
+ before do
10
+ FileUtils.rm_rf File.expand_path(CF::CONFIG_DIR)
11
+ login
12
+ end
13
+
14
+ after do
15
+ `#{cf_bin} delete #{app} -f --routes --no-script`
16
+ end
17
+
18
+ it "attempts to use the backspace key" do
19
+ Dir.chdir("#{SPEC_ROOT}/assets/hello-sinatra") do
20
+ FileUtils.rm("manifest.yml", force: true)
21
+ BlueShell::Runner.run("#{cf_bin} push #{app}") do |runner|
22
+ expect(runner).to say "Instances> 1"
23
+ runner.send_return
24
+
25
+ expect(runner).to say "Memory Limit>"
26
+ runner.send_keys "128M"
27
+
28
+ expect(runner).to say "Creating #{app}... OK"
29
+
30
+ expect(runner).to say "Subdomain> #{app}"
31
+ app.length.times { runner.send_right_arrow }
32
+ runner.send_backspace
33
+ runner.send_return
34
+
35
+ expect(runner).to say "Domain>"
36
+ runner.send_return
37
+
38
+ expect(runner).to say /Binding #{app[0..-2]}\..* to #{app}.*OK/, 1
39
+ end
40
+ end
41
+ end
42
+ end
43
+ else
44
+ $stderr.puts 'Skipping v2 integration specs; please provide environment variables'
45
+ end
46
+
@@ -23,7 +23,7 @@ if ENV['CF_V2_RUN_INTEGRATION']
23
23
  client
24
24
  end
25
25
 
26
- let(:new_user) { Faker::Internet.email }
26
+ let(:new_user) { Faker::Internet.disposable_email("cf-test-user-#{Time.now.to_i}") }
27
27
 
28
28
  before do
29
29
  Interact::Progress::Dots.start!
@@ -66,11 +66,6 @@ if ENV['CF_V2_RUN_INTEGRATION']
66
66
 
67
67
  BlueShell::Runner.run("#{cf_bin} login #{new_user} --password #{password}") do |runner|
68
68
  expect(runner).to say "Authenticating... OK"
69
-
70
- expect(runner).to say "Space>"
71
- runner.send_keys "1"
72
-
73
- expect(runner).to say /Switching to space.*OK/
74
69
  end
75
70
  end
76
71
  end
@@ -35,7 +35,7 @@ applications:
35
35
  memory: 256M
36
36
  instances: 1
37
37
  host: #{subdomain}
38
- domain: a1-app.cf-app.com
38
+ domain: cfapps.io
39
39
  path: .
40
40
  services:
41
41
  #{user_provided_name}:
@@ -63,7 +63,7 @@ applications:
63
63
  expect(runner).to say "Preparing to start #{app}... OK", 180
64
64
  expect(runner).to say "Checking status of app '#{app}'...", 180
65
65
  expect(runner).to say "1 of 1 instances running"
66
- expect(runner).to say "Push successful! App '#{app}' available at http://#{subdomain}.a1-app.cf-app.com", 30
66
+ expect(runner).to say "Push successful! App '#{app}' available at http://#{subdomain}.cfapps.io", 30
67
67
  end
68
68
  end
69
69
 
@@ -40,8 +40,8 @@ if ENV["CF_V2_RUN_INTEGRATION"]
40
40
  expect(runner).to say "Deleting organization #{new_org_name}... OK", 15
41
41
  end
42
42
 
43
- BlueShell::Runner.run("#{cf_bin} orgs") do |runner|
44
- expect(runner).to_not say new_org_name
43
+ BlueShell::Runner.run("#{cf_bin} target -o #{new_org_name}") do |runner|
44
+ expect(runner).to say "Unknown organization '#{new_org_name}'."
45
45
  end
46
46
  end
47
47
  end
@@ -122,7 +122,7 @@ if ENV["CF_V2_RUN_INTEGRATION"]
122
122
  expect(runner).to say "Preparing to start #{app}... OK", 180
123
123
  expect(runner).to say "Checking status of app '#{app}'...", 180
124
124
  expect(runner).to say "1 of 1 instances running"
125
- expect(runner).to say "Push successful! App '#{app}' available at http://#{subdomain}.a1-app.cf-app.com", 30
125
+ expect(runner).to say "Push successful! App '#{app}' available at http://#{subdomain}.cfapps.io", 30
126
126
  end
127
127
  end
128
128
 
@@ -99,6 +99,7 @@ if ENV['CF_V2_RUN_INTEGRATION']
99
99
 
100
100
  after do
101
101
  delete_app(app_name)
102
+ delete_service(service_name)
102
103
  end
103
104
  end
104
105
 
@@ -1,10 +1,13 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "Service Broker Management", components: [:nats, :uaa, :ccng] do
3
+ describe "Service Broker Management", components: [:nats, :uaa, :ccng, :fake_service_broker] do
4
4
  let(:username) { 'admin' }
5
5
  let(:password) { 'the_admin_pw' }
6
6
  let(:target) { 'http://127.0.0.1:8181' }
7
7
 
8
+ let(:broker_url) { 'http://127.0.0.1:54329' }
9
+ let(:broker_token) { 'opensesame' }
10
+
8
11
  before do
9
12
  create_user_in_ccng
10
13
  logout
@@ -24,21 +27,33 @@ describe "Service Broker Management", components: [:nats, :uaa, :ccng] do
24
27
  end
25
28
 
26
29
  it "allows an admin user to add a service broker" do
27
- BlueShell::Runner.run("#{cf_bin} add-service-broker --name cf-mysql --url http://cf-mysql.cfapp.io --token cfmysqlsecret") do |runner|
28
- expect(runner).to say "... OK"
30
+ BlueShell::Runner.run("#{cf_bin} add-service-broker --name my-custom-service --url #{broker_url} --token #{broker_token}") do |runner|
31
+ expect(runner).to say "Adding service broker my-custom-service... OK"
29
32
  end
30
33
  end
31
34
 
32
- context "with some service brokers already registered" do
35
+ context "with a service broker already registered" do
33
36
  before do
34
- BlueShell::Runner.run("#{cf_bin} add-service-broker --name cf-mysql --url http://cf-mysql.cfapp.io --token cfmysqlsecret") do |runner|
35
- expect(runner).to say "... OK"
37
+ BlueShell::Runner.run("#{cf_bin} add-service-broker --name my-custom-service --url #{broker_url} --token #{broker_token}") do |runner|
38
+ expect(runner).to say "Adding service broker my-custom-service... OK"
36
39
  end
37
40
  end
38
41
 
39
42
  it "allows an admin user to list service brokers" do
40
43
  BlueShell::Runner.run("#{cf_bin} service-brokers") do |runner|
41
- expect(runner).to say /cf-mysql.*cf-mysql.cfapp.io/
44
+ expect(runner).to say /my-custom-service.*#{broker_url}/
45
+ end
46
+ end
47
+
48
+ it "allows an admin user to remove a service broker" do
49
+ BlueShell::Runner.run("#{cf_bin} remove-service-broker my-custom-service") do |runner|
50
+ expect(runner).to say "Really remove my-custom-service?> n"
51
+ runner.send_keys("y")
52
+ expect(runner).to say "Removing service broker my-custom-service... OK"
53
+ end
54
+
55
+ BlueShell::Runner.run("#{cf_bin} service-brokers") do |runner|
56
+ expect(runner).to_not say /my-custom-service/
42
57
  end
43
58
  end
44
59
  end
@@ -3,10 +3,10 @@ module FeaturesHelper
3
3
  set_target
4
4
  logout
5
5
 
6
- space = ENV['CF_V2_TEST_SPACE']
7
- organization = ENV['CF_V2_TEST_ORGANIZATION']
8
6
  username = ENV['CF_V2_TEST_USER']
9
7
  password = ENV['CF_V2_TEST_PASSWORD']
8
+ organization = ENV['CF_V2_TEST_ORGANIZATION']
9
+ space = ENV['CF_V2_TEST_SPACE']
10
10
 
11
11
  cmd = "#{cf_bin} login #{username} --password #{password} -o #{organization}"
12
12
  cmd += " -s #{space}"
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1.rc2
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Cloud Foundry Team
@@ -9,11 +10,28 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-08-09 00:00:00.000000000 Z
13
+ date: 2013-08-16 00:00:00.000000000 Z
13
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 3.2.13
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: 3.2.13
14
31
  - !ruby/object:Gem::Dependency
15
32
  name: addressable
16
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
17
35
  requirements:
18
36
  - - ~>
19
37
  - !ruby/object:Gem::Version
@@ -21,6 +39,7 @@ dependencies:
21
39
  type: :runtime
22
40
  prerelease: false
23
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
24
43
  requirements:
25
44
  - - ~>
26
45
  - !ruby/object:Gem::Version
@@ -28,6 +47,7 @@ dependencies:
28
47
  - !ruby/object:Gem::Dependency
29
48
  name: caldecott-client
30
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
31
51
  requirements:
32
52
  - - ~>
33
53
  - !ruby/object:Gem::Version
@@ -35,6 +55,7 @@ dependencies:
35
55
  type: :runtime
36
56
  prerelease: false
37
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
38
59
  requirements:
39
60
  - - ~>
40
61
  - !ruby/object:Gem::Version
@@ -42,20 +63,23 @@ dependencies:
42
63
  - !ruby/object:Gem::Dependency
43
64
  name: cfoundry
44
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
45
67
  requirements:
46
68
  - - ~>
47
69
  - !ruby/object:Gem::Version
48
- version: 4.3.0
70
+ version: 4.3.5.rc1
49
71
  type: :runtime
50
72
  prerelease: false
51
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
52
75
  requirements:
53
76
  - - ~>
54
77
  - !ruby/object:Gem::Version
55
- version: 4.3.0
78
+ version: 4.3.5.rc1
56
79
  - !ruby/object:Gem::Dependency
57
80
  name: interact
58
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
59
83
  requirements:
60
84
  - - ~>
61
85
  - !ruby/object:Gem::Version
@@ -63,6 +87,7 @@ dependencies:
63
87
  type: :runtime
64
88
  prerelease: false
65
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
66
91
  requirements:
67
92
  - - ~>
68
93
  - !ruby/object:Gem::Version
@@ -70,6 +95,7 @@ dependencies:
70
95
  - !ruby/object:Gem::Dependency
71
96
  name: json_pure
72
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
73
99
  requirements:
74
100
  - - ~>
75
101
  - !ruby/object:Gem::Version
@@ -77,6 +103,7 @@ dependencies:
77
103
  type: :runtime
78
104
  prerelease: false
79
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
80
107
  requirements:
81
108
  - - ~>
82
109
  - !ruby/object:Gem::Version
@@ -84,6 +111,7 @@ dependencies:
84
111
  - !ruby/object:Gem::Dependency
85
112
  name: mothership
86
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
87
115
  requirements:
88
116
  - - ! '>='
89
117
  - !ruby/object:Gem::Version
@@ -94,6 +122,7 @@ dependencies:
94
122
  type: :runtime
95
123
  prerelease: false
96
124
  version_requirements: !ruby/object:Gem::Requirement
125
+ none: false
97
126
  requirements:
98
127
  - - ! '>='
99
128
  - !ruby/object:Gem::Version
@@ -104,6 +133,7 @@ dependencies:
104
133
  - !ruby/object:Gem::Dependency
105
134
  name: multi_json
106
135
  requirement: !ruby/object:Gem::Requirement
136
+ none: false
107
137
  requirements:
108
138
  - - ~>
109
139
  - !ruby/object:Gem::Version
@@ -111,6 +141,7 @@ dependencies:
111
141
  type: :runtime
112
142
  prerelease: false
113
143
  version_requirements: !ruby/object:Gem::Requirement
144
+ none: false
114
145
  requirements:
115
146
  - - ~>
116
147
  - !ruby/object:Gem::Version
@@ -118,6 +149,7 @@ dependencies:
118
149
  - !ruby/object:Gem::Dependency
119
150
  name: rest-client
120
151
  requirement: !ruby/object:Gem::Requirement
152
+ none: false
121
153
  requirements:
122
154
  - - ~>
123
155
  - !ruby/object:Gem::Version
@@ -125,6 +157,7 @@ dependencies:
125
157
  type: :runtime
126
158
  prerelease: false
127
159
  version_requirements: !ruby/object:Gem::Requirement
160
+ none: false
128
161
  requirements:
129
162
  - - ~>
130
163
  - !ruby/object:Gem::Version
@@ -132,6 +165,7 @@ dependencies:
132
165
  - !ruby/object:Gem::Dependency
133
166
  name: uuidtools
134
167
  requirement: !ruby/object:Gem::Requirement
168
+ none: false
135
169
  requirements:
136
170
  - - ~>
137
171
  - !ruby/object:Gem::Version
@@ -139,6 +173,7 @@ dependencies:
139
173
  type: :runtime
140
174
  prerelease: false
141
175
  version_requirements: !ruby/object:Gem::Requirement
176
+ none: false
142
177
  requirements:
143
178
  - - ~>
144
179
  - !ruby/object:Gem::Version
@@ -146,20 +181,23 @@ dependencies:
146
181
  - !ruby/object:Gem::Dependency
147
182
  name: blue-shell
148
183
  requirement: !ruby/object:Gem::Requirement
184
+ none: false
149
185
  requirements:
150
186
  - - ! '>='
151
187
  - !ruby/object:Gem::Version
152
- version: 0.2.1
188
+ version: 0.2.2
153
189
  type: :development
154
190
  prerelease: false
155
191
  version_requirements: !ruby/object:Gem::Requirement
192
+ none: false
156
193
  requirements:
157
194
  - - ! '>='
158
195
  - !ruby/object:Gem::Version
159
- version: 0.2.1
196
+ version: 0.2.2
160
197
  - !ruby/object:Gem::Dependency
161
198
  name: factory_girl
162
199
  requirement: !ruby/object:Gem::Requirement
200
+ none: false
163
201
  requirements:
164
202
  - - ! '>='
165
203
  - !ruby/object:Gem::Version
@@ -167,6 +205,7 @@ dependencies:
167
205
  type: :development
168
206
  prerelease: false
169
207
  version_requirements: !ruby/object:Gem::Requirement
208
+ none: false
170
209
  requirements:
171
210
  - - ! '>='
172
211
  - !ruby/object:Gem::Version
@@ -174,6 +213,7 @@ dependencies:
174
213
  - !ruby/object:Gem::Dependency
175
214
  name: fakefs
176
215
  requirement: !ruby/object:Gem::Requirement
216
+ none: false
177
217
  requirements:
178
218
  - - ~>
179
219
  - !ruby/object:Gem::Version
@@ -181,6 +221,7 @@ dependencies:
181
221
  type: :development
182
222
  prerelease: false
183
223
  version_requirements: !ruby/object:Gem::Requirement
224
+ none: false
184
225
  requirements:
185
226
  - - ~>
186
227
  - !ruby/object:Gem::Version
@@ -188,6 +229,7 @@ dependencies:
188
229
  - !ruby/object:Gem::Dependency
189
230
  name: ffaker
190
231
  requirement: !ruby/object:Gem::Requirement
232
+ none: false
191
233
  requirements:
192
234
  - - '='
193
235
  - !ruby/object:Gem::Version
@@ -195,6 +237,7 @@ dependencies:
195
237
  type: :development
196
238
  prerelease: false
197
239
  version_requirements: !ruby/object:Gem::Requirement
240
+ none: false
198
241
  requirements:
199
242
  - - '='
200
243
  - !ruby/object:Gem::Version
@@ -202,6 +245,7 @@ dependencies:
202
245
  - !ruby/object:Gem::Dependency
203
246
  name: gem-release
204
247
  requirement: !ruby/object:Gem::Requirement
248
+ none: false
205
249
  requirements:
206
250
  - - ! '>='
207
251
  - !ruby/object:Gem::Version
@@ -209,6 +253,7 @@ dependencies:
209
253
  type: :development
210
254
  prerelease: false
211
255
  version_requirements: !ruby/object:Gem::Requirement
256
+ none: false
212
257
  requirements:
213
258
  - - ! '>='
214
259
  - !ruby/object:Gem::Version
@@ -216,6 +261,7 @@ dependencies:
216
261
  - !ruby/object:Gem::Dependency
217
262
  name: rake
218
263
  requirement: !ruby/object:Gem::Requirement
264
+ none: false
219
265
  requirements:
220
266
  - - ~>
221
267
  - !ruby/object:Gem::Version
@@ -223,6 +269,7 @@ dependencies:
223
269
  type: :development
224
270
  prerelease: false
225
271
  version_requirements: !ruby/object:Gem::Requirement
272
+ none: false
226
273
  requirements:
227
274
  - - ~>
228
275
  - !ruby/object:Gem::Version
@@ -230,6 +277,7 @@ dependencies:
230
277
  - !ruby/object:Gem::Dependency
231
278
  name: rspec
232
279
  requirement: !ruby/object:Gem::Requirement
280
+ none: false
233
281
  requirements:
234
282
  - - ~>
235
283
  - !ruby/object:Gem::Version
@@ -237,6 +285,7 @@ dependencies:
237
285
  type: :development
238
286
  prerelease: false
239
287
  version_requirements: !ruby/object:Gem::Requirement
288
+ none: false
240
289
  requirements:
241
290
  - - ~>
242
291
  - !ruby/object:Gem::Version
@@ -244,6 +293,7 @@ dependencies:
244
293
  - !ruby/object:Gem::Dependency
245
294
  name: rspec-instafail
246
295
  requirement: !ruby/object:Gem::Requirement
296
+ none: false
247
297
  requirements:
248
298
  - - ~>
249
299
  - !ruby/object:Gem::Version
@@ -251,6 +301,7 @@ dependencies:
251
301
  type: :development
252
302
  prerelease: false
253
303
  version_requirements: !ruby/object:Gem::Requirement
304
+ none: false
254
305
  requirements:
255
306
  - - ~>
256
307
  - !ruby/object:Gem::Version
@@ -258,6 +309,7 @@ dependencies:
258
309
  - !ruby/object:Gem::Dependency
259
310
  name: webmock
260
311
  requirement: !ruby/object:Gem::Requirement
312
+ none: false
261
313
  requirements:
262
314
  - - ~>
263
315
  - !ruby/object:Gem::Version
@@ -265,6 +317,7 @@ dependencies:
265
317
  type: :development
266
318
  prerelease: false
267
319
  version_requirements: !ruby/object:Gem::Requirement
320
+ none: false
268
321
  requirements:
269
322
  - - ~>
270
323
  - !ruby/object:Gem::Version
@@ -272,6 +325,7 @@ dependencies:
272
325
  - !ruby/object:Gem::Dependency
273
326
  name: httpclient
274
327
  requirement: !ruby/object:Gem::Requirement
328
+ none: false
275
329
  requirements:
276
330
  - - ~>
277
331
  - !ruby/object:Gem::Version
@@ -279,6 +333,7 @@ dependencies:
279
333
  type: :development
280
334
  prerelease: false
281
335
  version_requirements: !ruby/object:Gem::Requirement
336
+ none: false
282
337
  requirements:
283
338
  - - ~>
284
339
  - !ruby/object:Gem::Version
@@ -286,6 +341,7 @@ dependencies:
286
341
  - !ruby/object:Gem::Dependency
287
342
  name: yajl-ruby
288
343
  requirement: !ruby/object:Gem::Requirement
344
+ none: false
289
345
  requirements:
290
346
  - - ! '>='
291
347
  - !ruby/object:Gem::Version
@@ -293,6 +349,7 @@ dependencies:
293
349
  type: :development
294
350
  prerelease: false
295
351
  version_requirements: !ruby/object:Gem::Requirement
352
+ none: false
296
353
  requirements:
297
354
  - - ! '>='
298
355
  - !ruby/object:Gem::Version
@@ -300,6 +357,7 @@ dependencies:
300
357
  - !ruby/object:Gem::Dependency
301
358
  name: nats
302
359
  requirement: !ruby/object:Gem::Requirement
360
+ none: false
303
361
  requirements:
304
362
  - - ! '>='
305
363
  - !ruby/object:Gem::Version
@@ -307,6 +365,7 @@ dependencies:
307
365
  type: :development
308
366
  prerelease: false
309
367
  version_requirements: !ruby/object:Gem::Requirement
368
+ none: false
310
369
  requirements:
311
370
  - - ! '>='
312
371
  - !ruby/object:Gem::Version
@@ -314,6 +373,7 @@ dependencies:
314
373
  - !ruby/object:Gem::Dependency
315
374
  name: typhoeus
316
375
  requirement: !ruby/object:Gem::Requirement
376
+ none: false
317
377
  requirements:
318
378
  - - ! '>='
319
379
  - !ruby/object:Gem::Version
@@ -321,20 +381,7 @@ dependencies:
321
381
  type: :development
322
382
  prerelease: false
323
383
  version_requirements: !ruby/object:Gem::Requirement
324
- requirements:
325
- - - ! '>='
326
- - !ruby/object:Gem::Version
327
- version: '0'
328
- - !ruby/object:Gem::Dependency
329
- name: anchorman
330
- requirement: !ruby/object:Gem::Requirement
331
- requirements:
332
- - - ! '>='
333
- - !ruby/object:Gem::Version
334
- version: '0'
335
- type: :development
336
- prerelease: false
337
- version_requirements: !ruby/object:Gem::Requirement
384
+ none: false
338
385
  requirements:
339
386
  - - ! '>='
340
387
  - !ruby/object:Gem::Version
@@ -355,6 +402,7 @@ files:
355
402
  - lib/admin/README.md
356
403
  - lib/admin/service_auth_token.rb
357
404
  - lib/admin/service_broker/add.rb
405
+ - lib/admin/service_broker/remove.rb
358
406
  - lib/admin/service_broker/service_brokers.rb
359
407
  - lib/admin/set_quota.rb
360
408
  - lib/cf/cli/app/app.rb
@@ -432,7 +480,6 @@ files:
432
480
  - lib/cf/cli.rb
433
481
  - lib/cf/constants.rb
434
482
  - lib/cf/errors.rb
435
- - lib/cf/object_extensions.rb
436
483
  - lib/cf/plugin.rb
437
484
  - lib/cf/spacing.rb
438
485
  - lib/cf/spec_helper.rb
@@ -470,6 +517,7 @@ files:
470
517
  - spec/admin/curl_spec.rb
471
518
  - spec/admin/guid_spec.rb
472
519
  - spec/admin/service_broker/add_spec.rb
520
+ - spec/admin/service_broker/remove_spec.rb
473
521
  - spec/admin/service_broker/service_brokers_spec.rb
474
522
  - spec/admin/set_quota_spec.rb
475
523
  - spec/assets/env/env_test.rb
@@ -594,13 +642,14 @@ files:
594
642
  - spec/factories/cfoundry/v2/quota_definitions.rb
595
643
  - spec/factories/cfoundry/v2/routes_factory.rb
596
644
  - spec/factories/cfoundry/v2/service_bindings_factory.rb
645
+ - spec/factories/cfoundry/v2/service_brokers_factory.rb
597
646
  - spec/factories/cfoundry/v2/service_plans_factory.rb
598
647
  - spec/factories/cfoundry/v2/services_factory.rb
599
648
  - spec/factories/cfoundry/v2/spaces_factory.rb
600
649
  - spec/factories/cfoundry/v2/stacks_factory.rb
601
650
  - spec/factories/cfoundry/v2/user_provided_service_instances_factory.rb
602
651
  - spec/factories/cfoundry/v2/users_factory.rb
603
- - spec/features/account_lifecycle_spec.rb
652
+ - spec/features/backspace_spec.rb
604
653
  - spec/features/create_user_spec.rb
605
654
  - spec/features/delete_orphaned_service_spec.rb
606
655
  - spec/features/login_spec.rb
@@ -633,31 +682,33 @@ files:
633
682
  homepage: http://github.com/cloudfoundry/cf
634
683
  licenses:
635
684
  - Apache 2.0
636
- metadata: {}
637
685
  post_install_message:
638
686
  rdoc_options: []
639
687
  require_paths:
640
688
  - lib
641
689
  required_ruby_version: !ruby/object:Gem::Requirement
690
+ none: false
642
691
  requirements:
643
692
  - - ! '>='
644
693
  - !ruby/object:Gem::Version
645
694
  version: '0'
646
695
  required_rubygems_version: !ruby/object:Gem::Requirement
696
+ none: false
647
697
  requirements:
648
- - - ! '>='
698
+ - - ! '>'
649
699
  - !ruby/object:Gem::Version
650
- version: '0'
700
+ version: 1.3.1
651
701
  requirements: []
652
702
  rubyforge_project: cf
653
- rubygems_version: 2.0.5
703
+ rubygems_version: 1.8.25
654
704
  signing_key:
655
- specification_version: 4
705
+ specification_version: 3
656
706
  summary: Friendly command-line interface for Cloud Foundry.
657
707
  test_files:
658
708
  - spec/admin/curl_spec.rb
659
709
  - spec/admin/guid_spec.rb
660
710
  - spec/admin/service_broker/add_spec.rb
711
+ - spec/admin/service_broker/remove_spec.rb
661
712
  - spec/admin/service_broker/service_brokers_spec.rb
662
713
  - spec/admin/set_quota_spec.rb
663
714
  - spec/assets/env/env_test.rb
@@ -782,13 +833,14 @@ test_files:
782
833
  - spec/factories/cfoundry/v2/quota_definitions.rb
783
834
  - spec/factories/cfoundry/v2/routes_factory.rb
784
835
  - spec/factories/cfoundry/v2/service_bindings_factory.rb
836
+ - spec/factories/cfoundry/v2/service_brokers_factory.rb
785
837
  - spec/factories/cfoundry/v2/service_plans_factory.rb
786
838
  - spec/factories/cfoundry/v2/services_factory.rb
787
839
  - spec/factories/cfoundry/v2/spaces_factory.rb
788
840
  - spec/factories/cfoundry/v2/stacks_factory.rb
789
841
  - spec/factories/cfoundry/v2/user_provided_service_instances_factory.rb
790
842
  - spec/factories/cfoundry/v2/users_factory.rb
791
- - spec/features/account_lifecycle_spec.rb
843
+ - spec/features/backspace_spec.rb
792
844
  - spec/features/create_user_spec.rb
793
845
  - spec/features/delete_orphaned_service_spec.rb
794
846
  - spec/features/login_spec.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NmFhZTUzZjQ0MTg5MDViOTc2M2M0MDdjNDVmYWE0Mzk0N2UwODdmOQ==
5
- data.tar.gz: !binary |-
6
- MWQ2ODZiYTZjMTdhYTQ0YjRmMTA3ZWE4Mjc4MGE2NzVmMjQ4Mzg5Mg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MWUzNWFmODc2NDc1NDNkMjRjYzA0MDUyZGVjYjBhZWI3ODNmNzJhNTVlODNl
10
- OGMwOWE0ZWQ3OWRhMWM4NTM0NzhjMGY2ODE4ZTFhZjA2ZjE1OTY5YmVmMmEz
11
- ZDJkYTUyN2I1OTM2ODRjYjk5MmMyZTQ5OTNkN2JhOGQ5MGM4Y2E=
12
- data.tar.gz: !binary |-
13
- ZWJjZDZlZGE2ZTA2ZTNmZjcwNWI0MDY1YzNmMDBiNjVlMTJiNmFjNTY4OTBl
14
- YTY2OTEyNDg5MzQ1NTllNTQ0NWQ0YWQ4MDBlMjU3NzI1YzkzZGIzNGViODc2
15
- M2Y3YmVhYzdmMzhkMjlkOTEyNTI3ZmE5ZjQ2N2Y2YzY3MWVhYjU=
@@ -1,15 +0,0 @@
1
- class Object
2
- def try(*a, &b)
3
- if a.empty? && block_given?
4
- yield self
5
- else
6
- __send__(*a, &b)
7
- end
8
- end
9
- end
10
-
11
- class NilClass
12
- def try(*a, &b)
13
- nil
14
- end
15
- end
@@ -1,70 +0,0 @@
1
- require "spec_helper"
2
- require "webmock/rspec"
3
- require "ffaker"
4
-
5
- if ENV['CF_V2_RUN_INTEGRATION']
6
- describe 'A new user tries to use CF against v2 production', :ruby19 => true do
7
- before(:all) do
8
- WebMock.allow_net_connect!
9
- end
10
-
11
- after(:all) do
12
- WebMock.disable_net_connect!
13
- end
14
-
15
- let(:target) { ENV['CF_V2_TEST_TARGET'] }
16
- let(:username) { ENV['CF_V2_TEST_USER'] }
17
- let(:password) { ENV['CF_V2_TEST_PASSWORD'] }
18
-
19
- before do
20
- Interact::Progress::Dots.start!
21
- login
22
- end
23
-
24
- after do
25
- logout
26
- Interact::Progress::Dots.stop!
27
- end
28
-
29
- it "registers a new account and deletes it" do
30
- email = Faker::Internet.email
31
-
32
- BlueShell::Runner.run("#{cf_bin} register #{email} --password #{password}") do |runner|
33
- expect(runner).to say "Confirm Password>"
34
- runner.send_keys password
35
- expect(runner).to say "Your password strength is: good"
36
- expect(runner).to say "Creating user... OK"
37
- expect(runner).to say "Authenticating... OK"
38
- end
39
-
40
- # TODO: do this when cf delete-user is implemented
41
- #BlueShell::Runner.run("#{cf_bin} delete-user #{email}") do |runner|
42
- # expect(runner).to say "Really delete user #{email}?>"
43
- # runner.send_keys "y"
44
- # expect(runner).to say "Deleting #{email}... OK"
45
- #end
46
-
47
- # TODO: not this.
48
- client = CFoundry::V2::Client.new("https://#{target}")
49
- client.login(:username => email, :password => password)
50
- user = client.current_user
51
- guid = user.guid
52
- client.login(:username => username, :password => password)
53
- user.delete!
54
-
55
- BlueShell::Runner.run("#{cf_bin} login #{email} --password #{password}") do |runner|
56
- expect(runner).to say "Authenticating... FAILED"
57
-
58
- expect(runner).to say "Password>"
59
- runner.send_keys "another_password"
60
- expect(runner).to say "Password>"
61
- runner.send_keys "passwords_for_everyone!"
62
- expect(runner).to say "FAILED"
63
- runner.output.should_not =~ /CFoundry::/
64
- runner.output.should_not =~ %r{~/\.cf/crash}
65
- end
66
- end
67
- end
68
- else
69
- $stderr.puts 'Skipping v2 integration specs; please provide environment variables'
70
- end