class Souffle::Provider::Vagrant

The Vagrant souffle provider.

Attributes

vagrant_dir[R]

Public Class Methods

new() click to toggle source

Setup the internal Vagrant configuration and object.

Calls superclass method Souffle::Provider::Base::new
# File lib/souffle/provider/vagrant.rb, line 9
def initialize
  super()
  @vagrant_dir = @system.try_opt(:vagrant_dir)
  create_new_vm_group unless current_folder_has_souffle_config?
  generate_vagrant_config
end

Public Instance Methods

create_new_vm_group() click to toggle source

Creates a new virtualmachine group.

# File lib/souffle/provider/vagrant.rb, line 41
def create_new_vm_group
end
create_node(node, tag=nil) click to toggle source

Takes a node definition and begins the provisioning process.

@param [ Souffle::Node ] node The node to instantiate. @param [ String ] tag The tag to use for the node.

# File lib/souffle/provider/vagrant.rb, line 27
def create_node(node, tag=nil)
end
create_raid() click to toggle source

Noop.

# File lib/souffle/provider/vagrant.rb, line 31
def create_raid; end
create_system(system, tag_prefix=nil) click to toggle source

Creates a system using vagrant as the provider.

@param [ Souffle::System ] system The system to instantiate. @param [ String ] tag_prefix The tag prefix to use for the system.

# File lib/souffle/provider/vagrant.rb, line 20
def create_system(system, tag_prefix=nil)
end
current_folder_has_souffle_config?() click to toggle source

Checks if the current folder has the souffle configuration object.

@return [ Boolean ] Whether or not we're in a souffle Vagrant project.

# File lib/souffle/provider/vagrant.rb, line 36
def current_folder_has_souffle_config?
  File.exists? "#{Dir.pwd}/souffle.json"
end
generate_vagrant_config() click to toggle source

Generates the multi-vm configuration.

# File lib/souffle/provider/vagrant.rb, line 45
def generate_vagrant_config
  template = Souffle::Template.new('Vagrantfile.erb')
  temp_binding = OpenStruct.new
  temp_binding.version = Souffle::VERSION
  
  template.render(temp_binding)
end