Sha256: f80a7c0647530bf2c31e27373e78c42f8e713400702813dc32a64eb6ec27f3d6

Contents?: true

Size: 503 Bytes

Versions: 7

Compression:

Stored size: 503 Bytes

Contents

module Yanapiri
  module TransformacionWollok
    def self.aplica?(entrega)
      entrega.contiene_archivo? proyecto_wollok
    end

    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

    def self.proyecto_wollok
      '.project'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
yanapiri-0.5.0 lib/yanapiri/transformacion_wollok.rb
yanapiri-0.4.4 lib/yanapiri/transformacion_wollok.rb
yanapiri-0.4.3 lib/yanapiri/transformacion_wollok.rb
yanapiri-0.4.2 lib/yanapiri/transformacion_wollok.rb
yanapiri-0.4.1 lib/yanapiri/transformacion_wollok.rb
yanapiri-0.4.0 lib/yanapiri/transformacion_wollok.rb
yanapiri-0.3.0 lib/yanapiri/transformacion_wollok.rb