Class: RSpecSystem::NodeSet
- Inherits:
-
Object
- Object
- RSpecSystem::NodeSet
- Defined in:
- lib/rspec-system/node_set.rb
Overview
Factory class for NodeSet.
Defined Under Namespace
Classes: Base, Openstack, VagrantBase, VagrantVirtualbox, VagrantVmwareFusion, Vsphere
Class Method Summary collapse
-
.create ⇒ RSpecSystem::NodeSet::Base
private
Returns a NodeSet object.
Class Method Details
.create ⇒ RSpecSystem::NodeSet::Base
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a NodeSet object.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rspec-system/node_set.rb', line 9 def self.create provider = RSpec.configuration.rs_provider custom_prefabs = RSpec.configuration.rs_custom_prefabs setname = RSpec.configuration.rs_set || RSpec.configuration.rs_config['default_set'] = {:destroy => RSpec.configuration.rs_destroy} config = RSpec.configuration.rs_config['sets'][setname] begin require "rspec-system/node_set/#{provider.downcase}" rescue LoadError => e raise "Unsupported provider #{provider}: #{e}" end class_name = provider.split("_").map {|v| v.capitalize }.join const_get(class_name).new(setname, config, custom_prefabs, ) end |