Class: Libv8::Node::Location::Vendor
Defined Under Namespace
Classes: ArchiveNotFound, HeaderNotFound
Instance Method Summary
collapse
load!
Instance Method Details
#install! ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'ext/libv8-node/location.rb', line 26
def install!
require File.expand_path('builder', __dir__)
builder = Libv8::Node::Builder.new
exit_status = builder.build_libv8!
builder.remove_intermediates!
super if exit_status == 0
verify_installation!
exit_status
end
|
#verify_installation! ⇒ Object
45
46
47
48
49
50
51
52
53
54
55
|
# File 'ext/libv8-node/location.rb', line 45
def verify_installation!
include_paths = Libv8::Node::Paths.include_paths
unless include_paths.detect { |p| Pathname(p).join('v8.h').exist? } raise(HeaderNotFound, "Unable to locate 'v8.h' in the libv8 header paths: #{include_paths.inspect}")
end
Libv8::Node::Paths.object_paths.each do |p|
raise(ArchiveNotFound, p) unless File.exist?(p)
end
end
|