Permalink
Browse files

Update bundle fog with latest version

  • Loading branch information...
gnufied committed Mar 7, 2012
1 parent 878f7ff commit e779aa8cb2568a6de6cf3ccfa55bf175230c1d79
Showing 486 changed files with 14,379 additions and 1,012 deletions.
View
@@ -9,4 +9,5 @@ spec/brightbox/cache/
*.patch
*.html
*.gem
-vendor/
+/vendor/
+
@@ -5,6 +5,10 @@
.rvmrc
.bundle
.DS_Store
+.idea
+bin/*
+!bin/fog
+!bin/rdoc
coverage
doc/*
docs/_site/*
@@ -13,3 +17,4 @@ Gemfile.lock
rdoc
pkg
spec/credentials.yml
+vendor/*
@@ -55,14 +55,8 @@ namespace :test do
end
end
-task :examples do
- sh("export FOG_MOCK=false && bundle exec shindont examples")
- # some don't provide mocks so we'll leave this out for now
- # sh("export FOG_MOCK=true && bundle exec shindont examples")
-end
-
-task :test do # => :examples do
- Rake::Task[:mock_tests].invoke && Rake::Task[:examples].invoke && Rake::Task[:real_tests].invoke
+task :test do
+ Rake::Task[:mock_tests].invoke && Rake::Task[:real_tests].invoke
end
def tests(mocked)
@@ -121,14 +115,6 @@ task :nuke do
end
end
-desc "Generate RCov test coverage and open in your browser"
-task :coverage do
- require 'rcov'
- sh "rm -fr coverage"
- sh "rcov test/test_*.rb"
- sh "open coverage/index.html"
-end
-
require 'rdoc/task'
RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
@@ -602,8 +602,8 @@ MVP! Patrick Debois
[compute|linode]
move linode compute to its own shared area (namespacing should probably be corrected). thanks geemus
-[compute|new_servers]
- move new_servers compute to its own shared area (namespacing should probably be corrected). thanks geemus
+[compute|bare_metal_cloud]
+ move bare_metal_cloud compute to its own shared area (namespacing should probably be corrected). thanks geemus
[compute|ninefold]
move ninefold compute to its own shared area (namespacing should probably be corrected). thanks geemus
@@ -66,7 +66,7 @@ Enjoy, and let me know what I can do to continue improving fog!
(The MIT License)
-Copyright (c) 2010 [geemus (Wesley Beary)](http://github.com/geemus)
+Copyright (c) 2012 [geemus (Wesley Beary)](http://github.com/geemus)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -1,83 +0,0 @@
-require 'rubygems'
-require 'shindo'
-
-require File.join(File.dirname(__FILE__), '..', 'lib', 'fog')
-require File.join(File.dirname(__FILE__), '..', 'tests', 'helper')
-
-Shindo.tests('compute examples', 'compute') do
-
- # iterate over all the providers
- Fog.providers.values.each do |provider|
-
- # FIXME: implement expected shared compute stuff for these providers as well
- next if ['Bluebox', 'Brightbox', 'Ecloud', 'GoGrid', 'Linode', 'NewServers', 'Ninefold', 'Slicehost', 'StormOnDemand', 'VirtualBox', 'Voxel'].include?(provider)
-
- provider = eval(provider) # convert from string to object
-
- # skip if provider does not have compute
- next unless provider.respond_to?(:services) && provider.services.include?(:compute)
-
- tests(provider, provider.to_s.downcase) do
-
- # use shortcuts to instantiate connection
- @compute = Fog::Compute.new(:provider => provider.to_s)
-
- # create a server
- tests('@server = @compute.servers.bootstrap').succeeds do
- @server = @compute.servers.bootstrap
- end
-
- # list servers
- tests('@servers = @compute.servers').succeeds do
- @servers = @compute.servers
- end
-
- # get a server
- tests('@compute.servers.get(@server.identity)').succeeds do
- @compute.servers.get(@server.identity)
- end
-
- # ssh to a server
- tests('@server.ssh("pwd")').succeeds do
- @server.ssh('pwd')
- end
-
- # scp a file to a server
- lorem_path = File.join([File.dirname(__FILE__), '..', 'tests', 'lorem.txt'])
- tests("@server.scp_upload('#{lorem_path}', 'lorem.txt')").succeeds do
- @server.scp_upload(lorem_path, 'lorem.txt')
- end
-
- # scp a file from a server
- tests("@server.scp_download('lorem.txt', '/tmp/lorem.txt)").succeeds do
- @server.scp_download('lorem.txt', '/tmp/lorem.txt')
- end
- File.delete('/tmp/lorem.txt')
-
- # scp a directory to a server
- Dir.mkdir('/tmp/lorem')
- file = ::File.new('/tmp/lorem/lorem.txt', 'w')
- file.write(File.read(lorem_path))
- tests("@server.scp_upload('/tmp/lorem', '/tmp', :recursive => true)").succeeds do
- @server.scp_upload('/tmp/lorem', '/tmp', :recursive => true)
- end
- File.delete('/tmp/lorem/lorem.txt')
- Dir.rmdir('/tmp/lorem')
-
- # scp a directory from a server
- tests("@server.scp_download('/tmp/lorem', '/tmp', :recursive => true)").succeeds do
- @server.scp_download('/tmp/lorem', '/tmp', :recursive => true)
- end
- File.delete('/tmp/lorem/lorem.txt')
- Dir.rmdir('/tmp/lorem')
-
- # destroy the server
- tests('@server.destroy').succeeds do
- @server.destroy
- end
-
- end
-
- end
-
-end
@@ -1,78 +0,0 @@
-require 'rubygems'
-require 'shindo'
-
-require File.join(File.dirname(__FILE__), '..', 'lib', 'fog')
-require File.join(File.dirname(__FILE__), '..', 'tests', 'helper')
-
-Shindo.tests('dns examples', 'dns') do
-
- # iterate over all the providers
- Fog.providers.values.each do |provider|
-
- provider = eval(provider) # convert from string to object
-
- # skip if provider does not have storage
- next unless provider.respond_to?(:services) && provider.services.include?(:dns)
-
- tests(provider, provider.to_s.downcase) do
-
- # use shortcuts to instantiate connection
- @dns = Fog::DNS.new(:provider => provider.to_s)
-
- # create a zone
- # domain should be the hostname
- # email is only required for linode, but included for consistency
- tests('@zone = @dns.zones.create').succeeds do
- @zone = @dns.zones.create(
- :domain => 'fogdnsexamples.com',
- :email => 'tests@fogdnsexamples.com'
- )
- end
-
- # create a record in the zone
- # ip is the address to route to
- # name is the name for the record
- # type is the type of record to create
- tests('@record = @zone.records.create').succeeds do
- @record = @zone.records.create(
- :value => '1.2.3.4',
- :name => 'www.fogdnsexamples.com',
- :type => 'A'
- )
- end
-
- # list zones
- tests('@zones = @dns.zones').succeeds do
- @zones = @dns.zones
- end
-
- # get a zone
- tests('@dns.zones.get(@zone.identity)').succeeds do
- @dns.zones.get(@zone.identity)
- end
-
- # list records
- tests('@records = @zone.records').succeeds do
- @records = @zone.records
- end
-
- # get a record
- tests('@zone.records.get(@record.identity)').succeeds do
- @zone.records.get(@record.identity)
- end
-
- # destroy the record
- tests('@record.destroy').succeeds do
- @record.destroy
- end
-
- # destroy the zone
- tests('@zone.destroy').succeeds do
- @zone.destroy
- end
-
- end
-
- end
-
-end
@@ -1,105 +0,0 @@
-require 'rubygems'
-require 'shindo'
-
-require File.join(File.dirname(__FILE__), '..', 'lib', 'fog')
-require File.join(File.dirname(__FILE__), '..', 'tests', 'helper')
-
-Shindo.tests('storage examples', 'storage') do
-
- # iterate over all the providers
- Fog.providers.values.each do |provider|
-
- provider = eval(provider) # convert from string to object
-
- # skip if provider does not have storage
- next unless provider.respond_to?(:services) && provider.services.include?(:storage)
-
- tests(provider, provider.to_s.downcase) do
-
- # use shortcuts to instantiate connection
- @storage = Fog::Storage.new(:provider => provider.to_s)
-
- # for compatibility public is simply true or false
- [false, true].each do |publicity|
-
- tests(":public => #{publicity}") do
-
- # create a directory
- # key should be a unique string
- # public should be a boolean
- tests('@directory = @storage.directories.create').succeeds do
- @directory = @storage.directories.create(
- :key => "fogstoragedirectory#{Time.now.to_i}",
- :public => publicity
- )
- end
-
- # list directories
- tests('@directories = @storage.directories').succeeds do
- @directories = @storage.directories
- end
-
- # get a directory
- tests('@storage.directories.get(@directory.identity)').succeeds do
- @storage.directories.get(@directory.identity)
- end
-
- # create a file in the directory
- # key can be any string
- # body can be a string or a file as File.open(path)
- # public should be a boolean and match the directory
- tests('@file = @directory.files.create').succeeds do
- @file = @directory.files.create(
- :body => 'fog_storage_object_body',
- :key => 'fogstorageobject',
- :public => publicity
- )
- end
-
- # list files
- tests('@files = @directory.files').succeeds do
- @files = @directory.files
- end
-
- # get a file
- tests('@directory.files.get(@file.identity)').succeeds do
- @directory.files.get(@file.identity)
- end
-
- # test the publicity of files
- # Local is unable to inherently serve files, so we can skip it
- unless provider == Local
- # if the file is public it should have a url
- test('!!@file.public_url == publicity') do
- pending if Fog.mocking?
- !!@file.public_url == publicity
- end
-
- # if it is public ensure that public url is usable
- if publicity
- tests('Excon.get(@file.public_url).body').returns('fog_storage_object_body') do
- pending if Fog.mocking?
- Excon.get(@file.public_url).body
- end
- end
- end
-
- # destroy the file
- tests('@file.destroy').succeeds do
- @file.destroy
- end
-
- # destroy the directory
- tests('@directory.destroy').succeeds do
- @directory.destroy
- end
-
- end
-
- end
-
- end
-
- end
-
-end
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
s.add_dependency('builder')
s.add_dependency('excon', '~>0.9.0')
s.add_dependency('formatador', '~>0.2.0')
- s.add_dependency('multi_json', '~>1.0.3')
+ s.add_dependency('multi_json', '~>1.0')
s.add_dependency('mime-types')
s.add_dependency('net-scp', '~>1.0.4')
s.add_dependency('net-ssh', '>=2.1.3')
@@ -54,8 +54,10 @@ Gem::Specification.new do |s|
s.add_development_dependency('rdoc')
s.add_development_dependency('thor')
s.add_development_dependency('rspec', '~>1.3.1')
+ s.add_development_dependency('rbovirt', '>=0.0.7')
s.add_development_dependency('shindo', '~>0.3.4')
s.add_development_dependency('virtualbox', '~>0.9.1')
+ s.add_development_dependency('fission')
# s.add_development_dependency('ruby-libvirt','~>0.4.0')
s.files = `git ls-files`.split("\n")
@@ -131,10 +131,6 @@ def self.private_dns_name_for(ip_address)
"ip-#{ip_address.gsub('.','-')}.ec2.internal"
end
- def self.etag
- Fog::Mock.random_hex(32)
- end
-
def self.image
path = []
(rand(3) + 2).times do
Oops, something went wrong.

0 comments on commit e779aa8

Please sign in to comment.