<commit_before>require 'souffle/provider'
require 'souffle/template'
require 'ostruct'

# The Vagrant souffle provider.
class Souffle::Provider::Vagrant < Souffle::Provider
  attr_reader :vagrant_dir

  # Setup the internal Vagrant configuration and object.
  def setup
    @vagrant_dir = @system.try_opt(:vagrant_dir)
    create_new_vm_group unless current_folder_has_souffle_config?
    generate_vagrant_config
  end

  # The name of the given provider.
  def name; "Vagrant"; end

  # Creates a system using vagrant as the provider.
  # 
  # @param [ Souffle::System ] system The system to instantiate.
  def create_system(system)
  end

  # Takes a node definition and begins the provisioning process.
  # 
  # @param [ Souffle::Node ] node The node to instantiate.
  def create_node(node)
  end

  # Noop.
  def create_raid; end

  # Checks if the current folder has the souffle configuration object.
  # 
  # @return [ true,false ] Whether or not we're in a souffle Vagrant project.
  def current_folder_has_souffle_config?
    File.exists? "#{Dir.pwd}/souffle.json"
  end

  # Creates a new virtualmachine group.
  def create_new_vm_group
  end

  # Generates the multi-vm configuration.
  def generate_vagrant_config
    template = Souffle::Template.new('Vagrantfile.erb')
    temp_binding = OpenStruct.new
    temp_binding.version = Souffle::VERSION
    
    template.render(temp_binding)
  end
end
<commit_msg>Add tags to vagrant provider<commit_after>require 'souffle/provider'
require 'souffle/template'
require 'ostruct'

# The Vagrant souffle provider.
class Souffle::Provider::Vagrant < Souffle::Provider
  attr_reader :vagrant_dir

  # Setup the internal Vagrant configuration and object.
  def initialize
    super()
    @vagrant_dir = @system.try_opt(:vagrant_dir)
    create_new_vm_group unless current_folder_has_souffle_config?
    generate_vagrant_config
  end

  # The name of the given provider.
  def name; "Vagrant"; end

  # 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.
  def create_system(system, tag_prefix=nil)
  end

  # 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.
  def create_node(node, tag=nil)
  end

  # Noop.
  def create_raid; end

  # Checks if the current folder has the souffle configuration object.
  # 
  # @return [ true,false ] Whether or not we're in a souffle Vagrant project.
  def current_folder_has_souffle_config?
    File.exists? "#{Dir.pwd}/souffle.json"
  end

  # Creates a new virtualmachine group.
  def create_new_vm_group
  end

  # Generates the multi-vm configuration.
  def generate_vagrant_config
    template = Souffle::Template.new('Vagrantfile.erb')
    temp_binding = OpenStruct.new
    temp_binding.version = Souffle::VERSION
    
    template.render(temp_binding)
  end
end

{'fraction_non_alphanumeric': 0.07674495534237512, 'fraction_numerical': 0.0, 'mean_word_length': 3.853932584269663, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4416972', 'n_tokens_mistral': 1019, 'n_tokens_neox': 990, 'n_words': 290}