diff --git a/providers/brightbox/.gitignore b/providers/brightbox/.gitignore new file mode 100644 index 000000000..b844b143d --- /dev/null +++ b/providers/brightbox/.gitignore @@ -0,0 +1 @@ +Gemfile.lock diff --git a/providers/brightbox/Gemfile b/providers/brightbox/Gemfile new file mode 100644 index 000000000..b4e2a20bb --- /dev/null +++ b/providers/brightbox/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gemspec diff --git a/providers/brightbox/LICENSE.txt b/providers/brightbox/LICENSE.txt new file mode 100644 index 000000000..331a70d10 --- /dev/null +++ b/providers/brightbox/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2014 Brightbox Systems Ltd. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/providers/brightbox/README.md b/providers/brightbox/README.md new file mode 100644 index 000000000..60499cc68 --- /dev/null +++ b/providers/brightbox/README.md @@ -0,0 +1,50 @@ +# Brightbox Cloud module for fog (The Ruby cloud services library) + +This gem is a modular for the `fog` gem that allows you to manage resources in +the Brightbox Cloud. + +It is included by the main `fog` metagem but can used as an independent library +in other applications. + +This includes support for the following services: + +* Compute + * Images + * Load Balancers + * SQL Cloud instances + +Currently all services are grouped within `compute` but will be moved to their +own sections when standardisation of fog progresses. + +## Installation + +Add this line to your application's Gemfile: + + gem "fog-brightbox" + +And then execute: + + $ bundle + +Or install it yourself as: + + $ gem install fog-brightbox + +## Usage + +Please see the following references for instructions using the main `fog` gem +and its modules: + +* https://github.com/fog/fog +* http://fog.io/ +* http://rubydoc.info/gems/fog/ + +## Contributing + +`fog` modules are kept within the main repo. + +1. Fork it ( http://github.com/fog/fog/fork ) +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request diff --git a/providers/brightbox/Rakefile b/providers/brightbox/Rakefile new file mode 100644 index 000000000..8e053bdff --- /dev/null +++ b/providers/brightbox/Rakefile @@ -0,0 +1,8 @@ +require "bundler/gem_tasks" +require "rake/testtask" + +task :default => :test + +Rake::TestTask.new do |t| + t.pattern = File.join("test", "**", "*_test.rb") +end diff --git a/providers/brightbox/fog-brightbox.gemspec b/providers/brightbox/fog-brightbox.gemspec index 10fa09cf4..8506c47db 100644 --- a/providers/brightbox/fog-brightbox.gemspec +++ b/providers/brightbox/fog-brightbox.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" - spec.add_development_dependency "shindo" + spec.add_development_dependency "minitest" end diff --git a/providers/brightbox/test/fog/compute/brightbox_test.rb b/providers/brightbox/test/fog/compute/brightbox_test.rb new file mode 100644 index 000000000..023765053 --- /dev/null +++ b/providers/brightbox/test/fog/compute/brightbox_test.rb @@ -0,0 +1,21 @@ +require "minitest/autorun" +require "fog/brightbox" + +class Fog::Compute::BrightboxTest < Minitest::Test + def setup + @arguments = {} + @service = Fog::Compute::Brightbox.new(@arguments) + end + + def test_respond_to_request + assert_respond_to @service, :request + end + + def test_respond_to_request_access_token + assert_respond_to @service, :request_access_token + end + + def test_respond_to_wrapped_request + assert_respond_to @service, :wrapped_request + end +end