module Yanapiri::TransformacionWollok
Public Class Methods
aplica?(entrega)
click to toggle source
# File lib/yanapiri/transformacion_wollok.rb, line 3 def self.aplica?(entrega) entrega.contiene_archivo? proyecto_wollok end
proyecto_wollok()
click to toggle source
# File lib/yanapiri/transformacion_wollok.rb, line 16 def self.proyecto_wollok '.project' end
transformar!(entrega, bot)
click to toggle source
# File lib/yanapiri/transformacion_wollok.rb, line 7 def self.transformar!(entrega, bot) entrega.repo.chdir do xml = File.read proyecto_wollok File.open(proyecto_wollok, "w") {|file| file.puts xml.sub(/<name>.*<\/name>/, "<name>#{entrega.id}</name>") } end bot.commit! entrega.repo, 'Renombrado proyecto Wollok' end