1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/ruby -w module Herds def Herds.getHerdsForDev(handle) line = nil IO.popen("herdstat -n -q -d #{handle}") do |pipe| line = pipe.gets end line.split end def Herds.updateDev(developer) developer.herds = Herds.getHerdsForDev(developer.handle) end end