Sha256: be1a5d32fb5d3e751bc97cf810917b515d4eecb045891ad66423dec6e0d31799

Contents?: true

Size: 598 Bytes

Versions: 35

Compression:

Stored size: 598 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')).sort
        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

35 entries across 35 versions & 1 rubygems

Version Path
libv8-3.16.14.19.1 ext/libv8/patcher.rb
libv8-6.3.292.48.1 ext/libv8/patcher.rb
libv8-6.3.292.48.0 ext/libv8/patcher.rb
libv8-6.3.292.48.0beta2 ext/libv8/patcher.rb
libv8-6.3.292.48.0beta1 ext/libv8/patcher.rb
libv8-6.2.414.42.1 ext/libv8/patcher.rb
libv8-6.2.414.42.0 ext/libv8/patcher.rb
libv8-6.2.414.42.0beta1 ext/libv8/patcher.rb
libv8-6.0.286.54.3 ext/libv8/patcher.rb
libv8-6.0.286.54.2 ext/libv8/patcher.rb
libv8-6.0.286.54.1 ext/libv8/patcher.rb
libv8-6.0.286.54.0 ext/libv8/patcher.rb
libv8-6.0.286.54.0beta2 ext/libv8/patcher.rb
libv8-6.0.286.54.0beta1 ext/libv8/patcher.rb
libv8-6.0.286.44.0beta1 ext/libv8/patcher.rb
libv8-5.9.211.38.1 ext/libv8/patcher.rb
libv8-5.9.211.38.0 ext/libv8/patcher.rb
libv8-5.9.211.38.0beta0 ext/libv8/patcher.rb
libv8-5.7.492.65.1 ext/libv8/patcher.rb
libv8-5.7.492.65.0 ext/libv8/patcher.rb