Sha256: 308800ba4292aa8d7ec571c609398d0c6fff785505007d07b2bf27b935e03a57

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

module JetsUpgrade::Rewrite
  class Rakefile < Base
    def filename
      "Rakefile"
    end

    def marker
      "Jets.application.load_tasks"
    end

    def content
      modified_lines = lines.map do |line|
        if line.match(/Jets\.load_tasks/)
          "Jets.application.load_tasks\n"
        else
          line
        end
      end.compact
      modified_lines.join('')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jets-upgrade-0.1.1 lib/jets_upgrade/rewrite/rakefile.rb
jets-upgrade-0.1.0 lib/jets_upgrade/rewrite/rakefile.rb