Sha256: 5de331cad245e729466d0f9c42e253ff71a76c88c6d0bcb9f4e0096aafe17256

Contents?: true

Size: 593 Bytes

Versions: 15

Compression:

Stored size: 593 Bytes

Contents

module Libv8
  module Patcher
    PATCH_DIRECTORY = File.expand_path '../../../patches', __FILE__

    module_function

    def patch!
      File.open(".applied_patches", File::RDWR|File::CREAT) do |f|
        available_patches = Dir.glob(File.join(PATCH_DIRECTORY, '*.patch'))
        applied_patches = f.readlines.map(&:chomp)

        (available_patches - applied_patches).each do |patch|
          puts "Applying #{patch}"
          `patch -p1 -N < #{patch}`
          fail "failed to apply patch #{patch}" unless $?.success?
          f.puts patch
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
libv8-3.16.14.18 ext/libv8/patcher.rb
arcabouco-0.2.13 vendor/bundle/gems/libv8-3.16.14.17/ext/libv8/patcher.rb
libv8-3.16.14.17 ext/libv8/patcher.rb
libv8-3.16.14.16 ext/libv8/patcher.rb
libv8-5.0.71.48.3 ext/libv8/patcher.rb
libv8-5.0.71.48.2 ext/libv8/patcher.rb
libv8-5.0.71.48.0beta2 ext/libv8/patcher.rb
libv8-3.16.14.15 ext/libv8/patcher.rb
libv8-3.16.14.14 ext/libv8/patcher.rb
libv8-4.5.95.5 ext/libv8/patcher.rb
libv8-4.5.95.4 ext/libv8/patcher.rb
libv8-4.5.95.3 ext/libv8/patcher.rb
libv8-4.5.95.2 ext/libv8/patcher.rb
libv8-4.5.95.1 ext/libv8/patcher.rb
libv8-4.5.95.0 ext/libv8/patcher.rb