module Gauntlt::Support::ProfileHelper

Public Instance Methods

add_to_profile(k,v) click to toggle source
# File lib/gauntlt/attack_adapters/support/profile_helper.rb, line 8
def add_to_profile(k,v)
  puts "Overwriting profile value for #{k}" if gauntlt_profile.has_key?(k)
  gauntlt_profile[k] = v
end
add_to_profile_from_environment(k,v) click to toggle source
# File lib/gauntlt/attack_adapters/support/profile_helper.rb, line 13
def add_to_profile_from_environment(k,v)
  puts "Overwriting profile with env value for #{k}" if gauntlt_profile.has_key?(k)
  gauntlt_profile[k] = ENV[v]
end
gauntlt_profile() click to toggle source
# File lib/gauntlt/attack_adapters/support/profile_helper.rb, line 4
def gauntlt_profile
  @gauntlt_profile ||= {}
end
run_with_profile(command_template) click to toggle source
# File lib/gauntlt/attack_adapters/support/profile_helper.rb, line 18
def run_with_profile(command_template)
  command = command_template.dup

  gauntlt_profile.each do |name, value|
    command.gsub!( "<#{name}>", value )
  end

  run command
end