class Ronin::RunList
Public Class Methods
new()
click to toggle source
# File lib/ronin/run_list.rb, line 24 def initialize @run_list = {} if Ronin::Config[:run_list_type] == 'etcd' @artifacts_raw = Ronin::Etcd.get_run_list else @artifacts_raw = YAML.load_file(Ronin::Config['run_list_file'])['artifacts'] end unless @artifacts_raw.nil? @artifacts_raw.each do |a| if a.include?(";") @repo = a.split(";")[0].sub(/(\/)+$/, '') @branch = a.split(";")[1] else @repo = a @branch = 'master' end @name = @repo.split("/").last @run_list[@name] = { :name => @name, :repo => @repo, :branch => @branch } end end @run_list end
Public Instance Methods
artifacts()
click to toggle source
# File lib/ronin/run_list.rb, line 52 def artifacts @arts = [] @run_list.each { |k, v| @arts << k } @arts end
items()
click to toggle source
# File lib/ronin/run_list.rb, line 58 def items @items = [] @run_list.each do |k, v| @items << { :name => v[:name], :repo => v[:repo], :branch => v[:branch] } end @items end