class Rumr
[Ru]by [m]ulti-epository command line tool
Public Instance Methods
exec(command)
click to toggle source
# File lib/rumr.rb, line 44 def exec(command) Dir[File.join(options[:basepath], '**/.rumr')].each do |path| next unless YAML.load_file(path).include? options[:tag] if options['dryrun'] puts "Would execute #{command} in #{path}" else Dir.chdir(File.dirname(path)) { puts `#{command}` } end end end
register()
click to toggle source
# File lib/rumr.rb, line 21 def register new_tags = options[:tag] rumr_file = File.join(options[:directory], '.rumr') if options[:append] && File.exist?(rumr_file) new_tags |= YAML.load_file(rumr_file) end IO.write(rumr_file, new_tags.to_yaml) end