From 94cdb03211044f2e0620c6275525d09f84f26c78 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Tue, 4 Aug 2020 09:47:22 +1000 Subject: [PATCH] FIX: pick the correct version of libv8 in extconf Previously on downgrade we could pick the wrong version. This will correct the issue going forward, but we have no way of fixing history Fixes: #171 --- CHANGELOG | 6 +++++- ext/mini_racer_extension/extconf.rb | 2 ++ lib/mini_racer/version.rb | 1 + mini_racer.gemspec | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 07e17b5..5891906 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,8 @@ -- 23-07-202 +- Unreleased + + - FIX: on downgrade mkmf was picking the wrong version of libv8, this fix will correct future issues + +- 23-07-2020 - 0.3.1 diff --git a/ext/mini_racer_extension/extconf.rb b/ext/mini_racer_extension/extconf.rb index 1033ad2..7ef61b9 100644 --- a/ext/mini_racer_extension/extconf.rb +++ b/ext/mini_racer_extension/extconf.rb @@ -1,4 +1,6 @@ require 'mkmf' +require_relative '../../lib/mini_racer/version' +gem 'libv8', MiniRacer::LIBV8_VERSION require 'libv8' IS_DARWIN = RUBY_PLATFORM =~ /darwin/ diff --git a/lib/mini_racer/version.rb b/lib/mini_racer/version.rb index 229ec07..eb1eaea 100644 --- a/lib/mini_racer/version.rb +++ b/lib/mini_racer/version.rb @@ -2,4 +2,5 @@ module MiniRacer VERSION = "0.3.1" + LIBV8_VERSION = "~> 8.4.255" end diff --git a/mini_racer.gemspec b/mini_racer.gemspec index bf9fb06..9f1243c 100644 --- a/mini_racer.gemspec +++ b/mini_racer.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rake-compiler" spec.add_development_dependency "m" - spec.add_dependency 'libv8', '~> 8.4.255' + spec.add_dependency 'libv8', MiniRacer::LIBV8_VERSION spec.require_paths = ["lib", "ext"] spec.extensions = ["ext/mini_racer_extension/extconf.rb"]