sq_mini_racer 0.2.5.0.1.beta2 → 0.2.5.0.1.beta3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9e870a1d368e787e6167175e594568c56e5449e089a85bb01227b7ed70298c6
4
- data.tar.gz: 495a6431469a28b284238086ac44a98bf97599d480378fd29ce9da36d1ce49cd
3
+ metadata.gz: da357c40be27bea96942a9307f09e08a95e85484aca11ae2ed32ed5f1647d53e
4
+ data.tar.gz: 17ef93bbcfa122b9c66f3d7f6e6a3a37a9212cd6395d87312582127d7495dbef
5
5
  SHA512:
6
- metadata.gz: e2f8dcc7ff101baaf91ee04c676a577005b986ddfe3e98bf6bd8bbf8611071b680cddaee5a009333d278e7fd469d040365c31021a86a2e5575cf31dbcf8cd193
7
- data.tar.gz: aeca0ece81c19a06e54651abf2bf19611b9a0db2014840600e439a2a01377d3277c95a19773b93521f3a64d09890dd8b3931e2be99d098dca59df2ee1cf5a231
6
+ metadata.gz: 874a341ec3a205c40c327ed1f70f69852aee45fe3d7451a5727afb7b6e3e55431ef2701eb1010c8473ed9aa0a5575edba93762f5778553b78181dab1938cce97
7
+ data.tar.gz: 942afef2686240680342a0108f840d7d8fe86f3d610a5f6607e4d7c6831d565fc3aaaf3e445268c68dfde741ced678d2be39f11cc15517769db3ceb82d342678
@@ -44,9 +44,9 @@ def libv8_gemspec
44
44
  "#{libv8_basename}.gemspec"
45
45
  end
46
46
 
47
- def libv8_local_path
47
+ def libv8_local_path(path=Gem.path)
48
48
  puts "looking for #{libv8_gemspec} in installed gems"
49
- candidates = Gem.path.map { |p| File.join(p, 'specifications', libv8_gemspec) }
49
+ candidates = path.map { |p| File.join(p, 'specifications', libv8_gemspec) }
50
50
  found = candidates.select { |f| File.exist?(f) }.first
51
51
 
52
52
  unless found
@@ -147,7 +147,22 @@ def libv8_download(name, version, platform)
147
147
  File.open(File.join(vendor_path, libv8_downloaded_gem(name, version, platform)), 'wb') { |f| f.write(body) }
148
148
  end
149
149
 
150
+ def libv8_install!
151
+ cmd = "gem install #{libv8_gem_name} --version '#{libv8_version}' --install-dir '#{vendor_path}'"
152
+ puts "installing #{libv8_gem_name} using `#{cmd}`"
153
+ rc = system(cmd)
154
+
155
+ abort(<<-ERROR) unless rc
156
+ ERROR: could not install #{libv8_gem_name} #{libv8_version}
157
+ try "gem install #{libv8_gem_name} -v '#{libv8_version}'" to attempt to build libv8 from source
158
+ ERROR
159
+
160
+ libv8_local_path([vendor_path])
161
+ end
162
+
150
163
  def libv8_vendor!
164
+ return libv8_install! if Gem::VERSION < '2.0'
165
+
151
166
  version = libv8_remote_search
152
167
 
153
168
  puts "downloading #{libv8_downloaded_gem(libv8_gem_name, version['number'], version['platform'])} to #{vendor_path}"
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'sqreen/mini_racer'
@@ -2,6 +2,6 @@ module Sqreen
2
2
  module MiniRacer
3
3
  # part before qualifier is the number of the last upstream release
4
4
  # since we synced with it
5
- VERSION = "0.2.5.0.1.beta2"
5
+ VERSION = "0.2.5.0.1.beta3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sq_mini_racer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5.0.1.beta2
4
+ version: 0.2.5.0.1.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-15 00:00:00.000000000 Z
11
+ date: 2020-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,6 +91,7 @@ files:
91
91
  - ext/mini_racer_extension/simdutf8check.h
92
92
  - ext/prv_ext_loader/extconf.rb
93
93
  - ext/prv_ext_loader/prv_ext_loader.c
94
+ - lib/sq_mini_racer.rb
94
95
  - lib/sqreen/mini_racer.rb
95
96
  - lib/sqreen/mini_racer/version.rb
96
97
  - mini_racer.gemspec