From 7a7196e844062e68b0ea86ff8c7a29d7da354de2 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:41:33 -0500 Subject: [PATCH 01/16] Update json version dependency Update json version dependency to avoid native code compile issues. Signed-off-by: Adam King --- dpl.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpl.gemspec b/dpl.gemspec index 5212c87a5..9080df158 100644 --- a/dpl.gemspec +++ b/dpl.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', '~> 3.0.0' s.add_development_dependency 'rspec-its' s.add_development_dependency 'rake' - s.add_development_dependency 'json', '1.8.1' + s.add_development_dependency 'json', '1.8.2' s.add_development_dependency 'tins', '~> 1.6.0', '>= 1.6.0' s.add_development_dependency 'coveralls' From 9716c4150dce91a3d9b31c646f9e105e7147db4e Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:42:25 -0500 Subject: [PATCH 02/16] .gitignore coverage/ report directory .gitignore the coverage/ report directory to avoid accidentally committing code coverage reports. Signed-off-by: Adam King --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7072f9ed5..32ae77841 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ Gemfile.lock .coverage +coverage .dpl setuptools*.zip google_appengine_*.zip From 3eec1193e36016e2a3ab9e8ac2a1f0b56bb21f93 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:49:28 -0500 Subject: [PATCH 03/16] Add Bluemix deployment provider Add a deployment provider for Bluemix as a subclass of CloudFoundry deploy. The Bluemix provider uses the same options as Cloudfoundry, with the addition of a region choice, where setting the region determined the Bluemix api. Explicitly setting the API overrides the region setting. Signed-off-by: Adam King --- README.md | 17 +++++++++++++++++ lib/dpl/provider.rb | 1 + lib/dpl/provider/bluemix_cloudfoundry.rb | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 lib/dpl/provider/bluemix_cloudfoundry.rb diff --git a/README.md b/README.md index 0eb2cfe51..1b72bdac3 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Dpl supports the following providers: * [Azure Web Apps](#azure-web-apps) * [Bintray](#bintray) * [BitBalloon](#bitballoon) +* [Bluemix Cloud Foundry](#bluemix-cloud-foundry) * [Boxfuse](#boxfuse) * [Catalyze](#catalyze) * [Chef Supermarket](#chef-supermarket) @@ -908,3 +909,19 @@ In order to use this provider, please make sure you have the [App Engine Admin A #### Example: dpl --provider=surge --project= --domain= +### Bluemix Cloud Foundry: + +#### Options: + +* **username**: Bluemix username. +* **password**: Bluemix password. +* **organization**: Bluemix target organization. +* **space**: Bluemix target space +* **region**: Bluemix region [ng, eu-gb, au-syd]. Optional, default US region (ng). +* **api**: Bluemix api URL. Optional for Bluemix dedicated. Explicit **api** setting precedence over **region** setting. +* **manifest**: Path to manifest file. Optional. +* **skip_ssl_validation**: Skip ssl validation. Optional. + +#### Examples: + + dpl --provider=bluemixcf --username= --password= --organization= --region= --space= --skip-ssl-validation diff --git a/lib/dpl/provider.rb b/lib/dpl/provider.rb index 3ad1ea663..626673852 100644 --- a/lib/dpl/provider.rb +++ b/lib/dpl/provider.rb @@ -12,6 +12,7 @@ class Provider autoload :AzureWebApps, 'dpl/provider/azure_webapps' autoload :Bintray, 'dpl/provider/bintray' autoload :BitBalloon, 'dpl/provider/bitballoon' + autoload :BluemixCF, 'dpl/provider/bluemix_cloudfoundry' autoload :Boxfuse, 'dpl/provider/boxfuse' autoload :Catalyze, 'dpl/provider/catalyze' autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' diff --git a/lib/dpl/provider/bluemix_cloudfoundry.rb b/lib/dpl/provider/bluemix_cloudfoundry.rb new file mode 100644 index 000000000..90e5c79f8 --- /dev/null +++ b/lib/dpl/provider/bluemix_cloudfoundry.rb @@ -0,0 +1,22 @@ +module DPL + class Provider + class BluemixCF < CloudFoundry + + REGIONS = Hash.new {"api.ng.bluemix.net"}.update( + "eu-gb" => "api.eu-gb.bluemix.net", + "au-syd" => "api.au-syd.bluemix.net" + ) + + def set_api + region = options[:region] || "ng" + options[:api] = options[:api] || REGIONS[region] + end + + def check_auth + set_api + super + end + + end + end +end From cdd370a6e32e23de08f112f14d56227cc070f15b Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:52:53 -0500 Subject: [PATCH 04/16] Add Bluemix deploy provider test coverage Add spec class to test Bluemix deploy provider Signed-off-by: Adam King --- spec/provider/bluemix_cloudfoundry_spec.rb | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 spec/provider/bluemix_cloudfoundry_spec.rb diff --git a/spec/provider/bluemix_cloudfoundry_spec.rb b/spec/provider/bluemix_cloudfoundry_spec.rb new file mode 100644 index 000000000..b497fc378 --- /dev/null +++ b/spec/provider/bluemix_cloudfoundry_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' +require 'dpl/provider/bluemix_cloudfoundry' + +describe DPL::Provider::BluemixCF do + subject :provider do + described_class.new(DummyContext.new, region: 'eu-gb', username: 'Moonpie', + password: 'myexceptionallyaveragepassword', + organization: 'myotherorg', + space: 'inner', + manifest: 'worker-manifest.yml', + skip_ssl_validation: true) + end + + describe "#check_auth" do + example do + expect(provider.context).to receive(:shell).with('wget \'https://cli.run.pivotal.io/stable?release=linux64-binary&source=github\' -qO cf-linux-amd64.tgz && tar -zxvf cf-linux-amd64.tgz && rm cf-linux-amd64.tgz') + expect(provider.context).to receive(:shell).with('./cf api api.eu-gb.bluemix.net --skip-ssl-validation') + expect(provider.context).to receive(:shell).with('./cf login -u Moonpie -p myexceptionallyaveragepassword -o myotherorg -s inner') + provider.check_auth + end + end + +end From 1652849cb1a9825771ebda595eebc37689b67fb7 Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 15 Dec 2016 10:48:16 -0500 Subject: [PATCH 05/16] Update bluemix example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b72bdac3..c6fd2384d 100644 --- a/README.md +++ b/README.md @@ -924,4 +924,4 @@ In order to use this provider, please make sure you have the [App Engine Admin A #### Examples: - dpl --provider=bluemixcf --username= --password= --organization= --region= --space= --skip-ssl-validation + dpl --provider=bluemixcf --username= --password= --organization= --region= --space= --skip-ssl-validation From 1a963f4b4a754bd96dc2e1500eee82386509a685 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 4 Jan 2017 14:12:11 -0500 Subject: [PATCH 06/16] Restore json dependency to 1.8.1 Set dependncy back to JSON 1.8.1 ais required for Ruby 1.9.3 support Signed-off-by: Adam King --- dpl.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpl.gemspec b/dpl.gemspec index 9080df158..5212c87a5 100644 --- a/dpl.gemspec +++ b/dpl.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', '~> 3.0.0' s.add_development_dependency 'rspec-its' s.add_development_dependency 'rake' - s.add_development_dependency 'json', '1.8.2' + s.add_development_dependency 'json', '1.8.1' s.add_development_dependency 'tins', '~> 1.6.0', '>= 1.6.0' s.add_development_dependency 'coveralls' From 7c5d56dc60ee1683adbbb2fd12d81329eddce170 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 7 Jan 2017 22:01:26 -0500 Subject: [PATCH 07/16] Rename BluemixCF to BluemixCloudFoundry Update class name, provider reference, and test Signed-off-by: Travis CI --- lib/dpl/provider.rb | 2 +- .../{bluemix_cloudfoundry.rb => bluemix_cloud_foundry.rb} | 4 ++-- ...uemix_cloudfoundry_spec.rb => bluemixcloudfoundry_spec.rb} | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename lib/dpl/provider/{bluemix_cloudfoundry.rb => bluemix_cloud_foundry.rb} (89%) rename spec/provider/{bluemix_cloudfoundry_spec.rb => bluemixcloudfoundry_spec.rb} (91%) diff --git a/lib/dpl/provider.rb b/lib/dpl/provider.rb index 626673852..8bf97dcec 100644 --- a/lib/dpl/provider.rb +++ b/lib/dpl/provider.rb @@ -12,7 +12,7 @@ class Provider autoload :AzureWebApps, 'dpl/provider/azure_webapps' autoload :Bintray, 'dpl/provider/bintray' autoload :BitBalloon, 'dpl/provider/bitballoon' - autoload :BluemixCF, 'dpl/provider/bluemix_cloudfoundry' + autoload :BluemixCloudFoundry, 'dpl/provider/bluemix_cloud_foundry' autoload :Boxfuse, 'dpl/provider/boxfuse' autoload :Catalyze, 'dpl/provider/catalyze' autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' diff --git a/lib/dpl/provider/bluemix_cloudfoundry.rb b/lib/dpl/provider/bluemix_cloud_foundry.rb similarity index 89% rename from lib/dpl/provider/bluemix_cloudfoundry.rb rename to lib/dpl/provider/bluemix_cloud_foundry.rb index 90e5c79f8..5d34ebe5b 100644 --- a/lib/dpl/provider/bluemix_cloudfoundry.rb +++ b/lib/dpl/provider/bluemix_cloud_foundry.rb @@ -1,12 +1,12 @@ module DPL class Provider - class BluemixCF < CloudFoundry + class BluemixCloudFoundry < CloudFoundry REGIONS = Hash.new {"api.ng.bluemix.net"}.update( "eu-gb" => "api.eu-gb.bluemix.net", "au-syd" => "api.au-syd.bluemix.net" ) - + def set_api region = options[:region] || "ng" options[:api] = options[:api] || REGIONS[region] diff --git a/spec/provider/bluemix_cloudfoundry_spec.rb b/spec/provider/bluemixcloudfoundry_spec.rb similarity index 91% rename from spec/provider/bluemix_cloudfoundry_spec.rb rename to spec/provider/bluemixcloudfoundry_spec.rb index b497fc378..856ad22c5 100644 --- a/spec/provider/bluemix_cloudfoundry_spec.rb +++ b/spec/provider/bluemixcloudfoundry_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'dpl/provider/bluemix_cloudfoundry' +require 'dpl/provider/bluemix_cloud_foundry' -describe DPL::Provider::BluemixCF do +describe DPL::Provider::BluemixCloudFoundry do subject :provider do described_class.new(DummyContext.new, region: 'eu-gb', username: 'Moonpie', password: 'myexceptionallyaveragepassword', From 69f80f13ee2c95ad87cf854b35a47791f6bb5f30 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 7 Jan 2017 22:05:32 -0500 Subject: [PATCH 08/16] Align provider.rb autoload references Signed-off-by: Travis CI --- lib/dpl/provider.rb | 82 ++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/lib/dpl/provider.rb b/lib/dpl/provider.rb index 8bf97dcec..78e81dead 100644 --- a/lib/dpl/provider.rb +++ b/lib/dpl/provider.rb @@ -6,48 +6,48 @@ module DPL class Provider include FileUtils - autoload :Anynines, 'dpl/provider/anynines' - autoload :Appfog, 'dpl/provider/appfog' - autoload :Atlas, 'dpl/provider/atlas' - autoload :AzureWebApps, 'dpl/provider/azure_webapps' - autoload :Bintray, 'dpl/provider/bintray' - autoload :BitBalloon, 'dpl/provider/bitballoon' + autoload :Anynines, 'dpl/provider/anynines' + autoload :Appfog, 'dpl/provider/appfog' + autoload :Atlas, 'dpl/provider/atlas' + autoload :AzureWebApps, 'dpl/provider/azure_webapps' + autoload :Bintray, 'dpl/provider/bintray' + autoload :BitBalloon, 'dpl/provider/bitballoon' autoload :BluemixCloudFoundry, 'dpl/provider/bluemix_cloud_foundry' - autoload :Boxfuse, 'dpl/provider/boxfuse' - autoload :Catalyze, 'dpl/provider/catalyze' - autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' - autoload :Cloud66, 'dpl/provider/cloud66' - autoload :CloudFiles, 'dpl/provider/cloud_files' - autoload :CloudFoundry, 'dpl/provider/cloud_foundry' - autoload :CodeDeploy, 'dpl/provider/code_deploy' - autoload :Deis, 'dpl/provider/deis' - autoload :Divshot, 'dpl/provider/divshot' - autoload :ElasticBeanstalk, 'dpl/provider/elastic_beanstalk' - autoload :EngineYard, 'dpl/provider/engine_yard' - autoload :Firebase, 'dpl/provider/firebase' - autoload :GAE, 'dpl/provider/gae' - autoload :GCS, 'dpl/provider/gcs' - autoload :Hackage, 'dpl/provider/hackage' - autoload :Heroku, 'dpl/provider/heroku' - autoload :Lambda, 'dpl/provider/lambda' - autoload :Launchpad, 'dpl/provider/launchpad' - autoload :Modulus, 'dpl/provider/modulus' - autoload :Nodejitsu, 'dpl/provider/nodejitsu' - autoload :NPM, 'dpl/provider/npm' - autoload :Openshift, 'dpl/provider/openshift' - autoload :OpsWorks, 'dpl/provider/ops_works' - autoload :Packagecloud, 'dpl/provider/packagecloud' - autoload :Pages, 'dpl/provider/pages' - autoload :PuppetForge, 'dpl/provider/puppet_forge' - autoload :PyPI, 'dpl/provider/pypi' - autoload :Releases, 'dpl/provider/releases' - autoload :RubyGems, 'dpl/provider/rubygems' - autoload :S3, 'dpl/provider/s3' - autoload :Scalingo, 'dpl/provider/scalingo' - autoload :Script, 'dpl/provider/script' - autoload :Surge, 'dpl/provider/surge' - autoload :TestFairy, 'dpl/provider/testfairy' - autoload :Transifex, 'dpl/provider/transifex' + autoload :Boxfuse, 'dpl/provider/boxfuse' + autoload :Catalyze, 'dpl/provider/catalyze' + autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' + autoload :Cloud66, 'dpl/provider/cloud66' + autoload :CloudFiles, 'dpl/provider/cloud_files' + autoload :CloudFoundry, 'dpl/provider/cloud_foundry' + autoload :CodeDeploy, 'dpl/provider/code_deploy' + autoload :Deis, 'dpl/provider/deis' + autoload :Divshot, 'dpl/provider/divshot' + autoload :ElasticBeanstalk, 'dpl/provider/elastic_beanstalk' + autoload :EngineYard, 'dpl/provider/engine_yard' + autoload :Firebase, 'dpl/provider/firebase' + autoload :GAE, 'dpl/provider/gae' + autoload :GCS, 'dpl/provider/gcs' + autoload :Hackage, 'dpl/provider/hackage' + autoload :Heroku, 'dpl/provider/heroku' + autoload :Lambda, 'dpl/provider/lambda' + autoload :Launchpad, 'dpl/provider/launchpad' + autoload :Modulus, 'dpl/provider/modulus' + autoload :Nodejitsu, 'dpl/provider/nodejitsu' + autoload :NPM, 'dpl/provider/npm' + autoload :Openshift, 'dpl/provider/openshift' + autoload :OpsWorks, 'dpl/provider/ops_works' + autoload :Packagecloud, 'dpl/provider/packagecloud' + autoload :Pages, 'dpl/provider/pages' + autoload :PuppetForge, 'dpl/provider/puppet_forge' + autoload :PyPI, 'dpl/provider/pypi' + autoload :Releases, 'dpl/provider/releases' + autoload :RubyGems, 'dpl/provider/rubygems' + autoload :S3, 'dpl/provider/s3' + autoload :Scalingo, 'dpl/provider/scalingo' + autoload :Script, 'dpl/provider/script' + autoload :Surge, 'dpl/provider/surge' + autoload :TestFairy, 'dpl/provider/testfairy' + autoload :Transifex, 'dpl/provider/transifex' def self.new(context, options) From a39b4e4de4c05ed893a9fdd16711ac61c4409e22 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:41:33 -0500 Subject: [PATCH 09/16] Update json version dependency Update json version dependency to avoid native code compile issues. Signed-off-by: Adam King --- dpl.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpl.gemspec b/dpl.gemspec index 5212c87a5..9080df158 100644 --- a/dpl.gemspec +++ b/dpl.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', '~> 3.0.0' s.add_development_dependency 'rspec-its' s.add_development_dependency 'rake' - s.add_development_dependency 'json', '1.8.1' + s.add_development_dependency 'json', '1.8.2' s.add_development_dependency 'tins', '~> 1.6.0', '>= 1.6.0' s.add_development_dependency 'coveralls' From 2f7c3760a7ecc4078d884eec8b186a6eb6f51cf0 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:42:25 -0500 Subject: [PATCH 10/16] .gitignore coverage/ report directory .gitignore the coverage/ report directory to avoid accidentally committing code coverage reports. Signed-off-by: Adam King --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7072f9ed5..32ae77841 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ Gemfile.lock .coverage +coverage .dpl setuptools*.zip google_appengine_*.zip From f06308770c85c0db4c2b46dde717387a416144c0 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:49:28 -0500 Subject: [PATCH 11/16] Add Bluemix deployment provider Add a deployment provider for Bluemix as a subclass of CloudFoundry deploy. The Bluemix provider uses the same options as Cloudfoundry, with the addition of a region choice, where setting the region determined the Bluemix api. Explicitly setting the API overrides the region setting. Signed-off-by: Adam King --- README.md | 17 +++++++++++++++++ lib/dpl/provider.rb | 1 + lib/dpl/provider/bluemix_cloudfoundry.rb | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 lib/dpl/provider/bluemix_cloudfoundry.rb diff --git a/README.md b/README.md index 8d4c5a551..0d91fc7b9 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Dpl supports the following providers: * [Azure Web Apps](#azure-web-apps) * [Bintray](#bintray) * [BitBalloon](#bitballoon) +* [Bluemix Cloud Foundry](#bluemix-cloud-foundry) * [Boxfuse](#boxfuse) * [Catalyze](#catalyze) * [Chef Supermarket](#chef-supermarket) @@ -910,3 +911,19 @@ In order to use this provider, please make sure you have the [App Engine Admin A #### Example: dpl --provider=surge --project= --domain= +### Bluemix Cloud Foundry: + +#### Options: + +* **username**: Bluemix username. +* **password**: Bluemix password. +* **organization**: Bluemix target organization. +* **space**: Bluemix target space +* **region**: Bluemix region [ng, eu-gb, au-syd]. Optional, default US region (ng). +* **api**: Bluemix api URL. Optional for Bluemix dedicated. Explicit **api** setting precedence over **region** setting. +* **manifest**: Path to manifest file. Optional. +* **skip_ssl_validation**: Skip ssl validation. Optional. + +#### Examples: + + dpl --provider=bluemixcf --username= --password= --organization= --region= --space= --skip-ssl-validation diff --git a/lib/dpl/provider.rb b/lib/dpl/provider.rb index 3ad1ea663..626673852 100644 --- a/lib/dpl/provider.rb +++ b/lib/dpl/provider.rb @@ -12,6 +12,7 @@ class Provider autoload :AzureWebApps, 'dpl/provider/azure_webapps' autoload :Bintray, 'dpl/provider/bintray' autoload :BitBalloon, 'dpl/provider/bitballoon' + autoload :BluemixCF, 'dpl/provider/bluemix_cloudfoundry' autoload :Boxfuse, 'dpl/provider/boxfuse' autoload :Catalyze, 'dpl/provider/catalyze' autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' diff --git a/lib/dpl/provider/bluemix_cloudfoundry.rb b/lib/dpl/provider/bluemix_cloudfoundry.rb new file mode 100644 index 000000000..90e5c79f8 --- /dev/null +++ b/lib/dpl/provider/bluemix_cloudfoundry.rb @@ -0,0 +1,22 @@ +module DPL + class Provider + class BluemixCF < CloudFoundry + + REGIONS = Hash.new {"api.ng.bluemix.net"}.update( + "eu-gb" => "api.eu-gb.bluemix.net", + "au-syd" => "api.au-syd.bluemix.net" + ) + + def set_api + region = options[:region] || "ng" + options[:api] = options[:api] || REGIONS[region] + end + + def check_auth + set_api + super + end + + end + end +end From 722389fa91ee43ccdf9b40564f8d9f197e20ba92 Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Dec 2016 15:52:53 -0500 Subject: [PATCH 12/16] Add Bluemix deploy provider test coverage Add spec class to test Bluemix deploy provider Signed-off-by: Adam King --- spec/provider/bluemix_cloudfoundry_spec.rb | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 spec/provider/bluemix_cloudfoundry_spec.rb diff --git a/spec/provider/bluemix_cloudfoundry_spec.rb b/spec/provider/bluemix_cloudfoundry_spec.rb new file mode 100644 index 000000000..b497fc378 --- /dev/null +++ b/spec/provider/bluemix_cloudfoundry_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' +require 'dpl/provider/bluemix_cloudfoundry' + +describe DPL::Provider::BluemixCF do + subject :provider do + described_class.new(DummyContext.new, region: 'eu-gb', username: 'Moonpie', + password: 'myexceptionallyaveragepassword', + organization: 'myotherorg', + space: 'inner', + manifest: 'worker-manifest.yml', + skip_ssl_validation: true) + end + + describe "#check_auth" do + example do + expect(provider.context).to receive(:shell).with('wget \'https://cli.run.pivotal.io/stable?release=linux64-binary&source=github\' -qO cf-linux-amd64.tgz && tar -zxvf cf-linux-amd64.tgz && rm cf-linux-amd64.tgz') + expect(provider.context).to receive(:shell).with('./cf api api.eu-gb.bluemix.net --skip-ssl-validation') + expect(provider.context).to receive(:shell).with('./cf login -u Moonpie -p myexceptionallyaveragepassword -o myotherorg -s inner') + provider.check_auth + end + end + +end From e92e2526a5051d85876d680e10b4a00094a24970 Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 15 Dec 2016 10:48:16 -0500 Subject: [PATCH 13/16] Update bluemix example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d91fc7b9..ac8a71fe9 100644 --- a/README.md +++ b/README.md @@ -926,4 +926,4 @@ In order to use this provider, please make sure you have the [App Engine Admin A #### Examples: - dpl --provider=bluemixcf --username= --password= --organization= --region= --space= --skip-ssl-validation + dpl --provider=bluemixcf --username= --password= --organization= --region= --space= --skip-ssl-validation From 5fd6346f5d6b13b6d42cd15ad79fe549fe7d292a Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 4 Jan 2017 14:12:11 -0500 Subject: [PATCH 14/16] Restore json dependency to 1.8.1 Set dependncy back to JSON 1.8.1 ais required for Ruby 1.9.3 support Signed-off-by: Adam King --- dpl.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpl.gemspec b/dpl.gemspec index 9080df158..5212c87a5 100644 --- a/dpl.gemspec +++ b/dpl.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', '~> 3.0.0' s.add_development_dependency 'rspec-its' s.add_development_dependency 'rake' - s.add_development_dependency 'json', '1.8.2' + s.add_development_dependency 'json', '1.8.1' s.add_development_dependency 'tins', '~> 1.6.0', '>= 1.6.0' s.add_development_dependency 'coveralls' From b937da7849364ced5417ec2bd3e2365e84da0686 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 7 Jan 2017 22:01:26 -0500 Subject: [PATCH 15/16] Rename BluemixCF to BluemixCloudFoundry Update class name, provider reference, and test Signed-off-by: Travis CI --- lib/dpl/provider.rb | 2 +- .../{bluemix_cloudfoundry.rb => bluemix_cloud_foundry.rb} | 4 ++-- ...uemix_cloudfoundry_spec.rb => bluemixcloudfoundry_spec.rb} | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename lib/dpl/provider/{bluemix_cloudfoundry.rb => bluemix_cloud_foundry.rb} (89%) rename spec/provider/{bluemix_cloudfoundry_spec.rb => bluemixcloudfoundry_spec.rb} (91%) diff --git a/lib/dpl/provider.rb b/lib/dpl/provider.rb index 626673852..8bf97dcec 100644 --- a/lib/dpl/provider.rb +++ b/lib/dpl/provider.rb @@ -12,7 +12,7 @@ class Provider autoload :AzureWebApps, 'dpl/provider/azure_webapps' autoload :Bintray, 'dpl/provider/bintray' autoload :BitBalloon, 'dpl/provider/bitballoon' - autoload :BluemixCF, 'dpl/provider/bluemix_cloudfoundry' + autoload :BluemixCloudFoundry, 'dpl/provider/bluemix_cloud_foundry' autoload :Boxfuse, 'dpl/provider/boxfuse' autoload :Catalyze, 'dpl/provider/catalyze' autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' diff --git a/lib/dpl/provider/bluemix_cloudfoundry.rb b/lib/dpl/provider/bluemix_cloud_foundry.rb similarity index 89% rename from lib/dpl/provider/bluemix_cloudfoundry.rb rename to lib/dpl/provider/bluemix_cloud_foundry.rb index 90e5c79f8..5d34ebe5b 100644 --- a/lib/dpl/provider/bluemix_cloudfoundry.rb +++ b/lib/dpl/provider/bluemix_cloud_foundry.rb @@ -1,12 +1,12 @@ module DPL class Provider - class BluemixCF < CloudFoundry + class BluemixCloudFoundry < CloudFoundry REGIONS = Hash.new {"api.ng.bluemix.net"}.update( "eu-gb" => "api.eu-gb.bluemix.net", "au-syd" => "api.au-syd.bluemix.net" ) - + def set_api region = options[:region] || "ng" options[:api] = options[:api] || REGIONS[region] diff --git a/spec/provider/bluemix_cloudfoundry_spec.rb b/spec/provider/bluemixcloudfoundry_spec.rb similarity index 91% rename from spec/provider/bluemix_cloudfoundry_spec.rb rename to spec/provider/bluemixcloudfoundry_spec.rb index b497fc378..856ad22c5 100644 --- a/spec/provider/bluemix_cloudfoundry_spec.rb +++ b/spec/provider/bluemixcloudfoundry_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'dpl/provider/bluemix_cloudfoundry' +require 'dpl/provider/bluemix_cloud_foundry' -describe DPL::Provider::BluemixCF do +describe DPL::Provider::BluemixCloudFoundry do subject :provider do described_class.new(DummyContext.new, region: 'eu-gb', username: 'Moonpie', password: 'myexceptionallyaveragepassword', From ef5ed074f71d3dbc1d47fb472cc1e670a3539f66 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 7 Jan 2017 22:05:32 -0500 Subject: [PATCH 16/16] Align provider.rb autoload references Signed-off-by: Travis CI --- lib/dpl/provider.rb | 82 ++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/lib/dpl/provider.rb b/lib/dpl/provider.rb index 8bf97dcec..78e81dead 100644 --- a/lib/dpl/provider.rb +++ b/lib/dpl/provider.rb @@ -6,48 +6,48 @@ module DPL class Provider include FileUtils - autoload :Anynines, 'dpl/provider/anynines' - autoload :Appfog, 'dpl/provider/appfog' - autoload :Atlas, 'dpl/provider/atlas' - autoload :AzureWebApps, 'dpl/provider/azure_webapps' - autoload :Bintray, 'dpl/provider/bintray' - autoload :BitBalloon, 'dpl/provider/bitballoon' + autoload :Anynines, 'dpl/provider/anynines' + autoload :Appfog, 'dpl/provider/appfog' + autoload :Atlas, 'dpl/provider/atlas' + autoload :AzureWebApps, 'dpl/provider/azure_webapps' + autoload :Bintray, 'dpl/provider/bintray' + autoload :BitBalloon, 'dpl/provider/bitballoon' autoload :BluemixCloudFoundry, 'dpl/provider/bluemix_cloud_foundry' - autoload :Boxfuse, 'dpl/provider/boxfuse' - autoload :Catalyze, 'dpl/provider/catalyze' - autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' - autoload :Cloud66, 'dpl/provider/cloud66' - autoload :CloudFiles, 'dpl/provider/cloud_files' - autoload :CloudFoundry, 'dpl/provider/cloud_foundry' - autoload :CodeDeploy, 'dpl/provider/code_deploy' - autoload :Deis, 'dpl/provider/deis' - autoload :Divshot, 'dpl/provider/divshot' - autoload :ElasticBeanstalk, 'dpl/provider/elastic_beanstalk' - autoload :EngineYard, 'dpl/provider/engine_yard' - autoload :Firebase, 'dpl/provider/firebase' - autoload :GAE, 'dpl/provider/gae' - autoload :GCS, 'dpl/provider/gcs' - autoload :Hackage, 'dpl/provider/hackage' - autoload :Heroku, 'dpl/provider/heroku' - autoload :Lambda, 'dpl/provider/lambda' - autoload :Launchpad, 'dpl/provider/launchpad' - autoload :Modulus, 'dpl/provider/modulus' - autoload :Nodejitsu, 'dpl/provider/nodejitsu' - autoload :NPM, 'dpl/provider/npm' - autoload :Openshift, 'dpl/provider/openshift' - autoload :OpsWorks, 'dpl/provider/ops_works' - autoload :Packagecloud, 'dpl/provider/packagecloud' - autoload :Pages, 'dpl/provider/pages' - autoload :PuppetForge, 'dpl/provider/puppet_forge' - autoload :PyPI, 'dpl/provider/pypi' - autoload :Releases, 'dpl/provider/releases' - autoload :RubyGems, 'dpl/provider/rubygems' - autoload :S3, 'dpl/provider/s3' - autoload :Scalingo, 'dpl/provider/scalingo' - autoload :Script, 'dpl/provider/script' - autoload :Surge, 'dpl/provider/surge' - autoload :TestFairy, 'dpl/provider/testfairy' - autoload :Transifex, 'dpl/provider/transifex' + autoload :Boxfuse, 'dpl/provider/boxfuse' + autoload :Catalyze, 'dpl/provider/catalyze' + autoload :ChefSupermarket, 'dpl/provider/chef_supermarket' + autoload :Cloud66, 'dpl/provider/cloud66' + autoload :CloudFiles, 'dpl/provider/cloud_files' + autoload :CloudFoundry, 'dpl/provider/cloud_foundry' + autoload :CodeDeploy, 'dpl/provider/code_deploy' + autoload :Deis, 'dpl/provider/deis' + autoload :Divshot, 'dpl/provider/divshot' + autoload :ElasticBeanstalk, 'dpl/provider/elastic_beanstalk' + autoload :EngineYard, 'dpl/provider/engine_yard' + autoload :Firebase, 'dpl/provider/firebase' + autoload :GAE, 'dpl/provider/gae' + autoload :GCS, 'dpl/provider/gcs' + autoload :Hackage, 'dpl/provider/hackage' + autoload :Heroku, 'dpl/provider/heroku' + autoload :Lambda, 'dpl/provider/lambda' + autoload :Launchpad, 'dpl/provider/launchpad' + autoload :Modulus, 'dpl/provider/modulus' + autoload :Nodejitsu, 'dpl/provider/nodejitsu' + autoload :NPM, 'dpl/provider/npm' + autoload :Openshift, 'dpl/provider/openshift' + autoload :OpsWorks, 'dpl/provider/ops_works' + autoload :Packagecloud, 'dpl/provider/packagecloud' + autoload :Pages, 'dpl/provider/pages' + autoload :PuppetForge, 'dpl/provider/puppet_forge' + autoload :PyPI, 'dpl/provider/pypi' + autoload :Releases, 'dpl/provider/releases' + autoload :RubyGems, 'dpl/provider/rubygems' + autoload :S3, 'dpl/provider/s3' + autoload :Scalingo, 'dpl/provider/scalingo' + autoload :Script, 'dpl/provider/script' + autoload :Surge, 'dpl/provider/surge' + autoload :TestFairy, 'dpl/provider/testfairy' + autoload :Transifex, 'dpl/provider/transifex' def self.new(context, options)