Allow create_volume Mock to support size || snapshot_id || (snapshot_id && size) #365

merged 2 commits into from Jun 21, 2011


None yet

2 participants


Since the documentation for CreateVolume specifies that size is optional when snapshot_id is passed the Mock should support this.

Ran rake twice with no errors, although I did need to tweak the Rakefile to require the right 'lib/fog' file.

geemus commented Jun 20, 2011

Looks good. I don't think you should need the rake/path related changes though. I always run it via the bundled stuff, ie bundle exec rake. I believe that takes care of the paths such that it should work. Let me know if you aren't experiencing that though (and/or if it is mis-documented anywhere). Once we sort that out I'll be happy to get this merged in. Thanks!

➜  fog git:(optional_size_arg) ✗ bundle exec rake --trace
rake aborted!
no such file to load -- lib/fog
/Users/dylanegan/Code/dylanegan/fog/Rakefile:4:in `require'
/Users/dylanegan/Code/dylanegan/fog/Rakefile:4:in `<top (required)>'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
/Users/dylanegan/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
➜  fog git:(optional_size_arg) ✗ bundle -v
Bundler version 1.0.14
➜  fog git:(optional_size_arg) ✗ head -n 4 Rakefile 
require 'rubygems'
require 'bundler/setup'
require 'date'
require 'lib/fog'
geemus commented Jun 21, 2011

Ah, yes. I forget that 1.8 and 1.9 disagree a bit on load paths (I still usually run against 1.8.7). Thanks for the clarification.

@geemus geemus merged commit cdf518c into fog:master Jun 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment