Class: Libv8::Location::Vendor
Defined Under Namespace
Classes: ArchiveNotFound, HeaderNotFound
Instance Method Summary
collapse
load!
Instance Method Details
#install! ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'ext/libv8/location.rb', line 21
def install!
require File.expand_path '../builder', __FILE__
builder = Libv8::Builder.new
exit_status = builder.build_libv8!
super if exit_status == 0
verify_installation!
return exit_status
end
|
#verify_installation! ⇒ Object
35
36
37
38
39
40
41
42
43
|
# File 'ext/libv8/location.rb', line 35
def verify_installation!
include_paths = Libv8::Paths.include_paths
unless include_paths.detect { |p| Pathname(p).join('v8.h').exist? }
fail HeaderNotFound, "Unable to locate 'v8.h' in the libv8 header paths: #{include_paths.inspect}"
end
Libv8::Paths.object_paths.each do |p|
fail ArchiveNotFound, p unless File.exist? p
end
end
|