Skip to content

Commit 52d660d

Browse files
committed
Adjust namespace
1 parent b7e5613 commit 52d660d

File tree

9 files changed

+25
-18
lines changed

9 files changed

+25
-18
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ task :binary => :compile do
2626

2727
# We don't need most things for the binary
2828
gemspec.files = []
29-
gemspec.files += ['lib/libv8-node.rb', 'lib/libv8_node.rb', 'lib/libv8_node/version.rb']
29+
gemspec.files += ['lib/libv8-node.rb', 'lib/libv8/node.rb', 'lib/libv8/node/version.rb']
3030
gemspec.files += ['ext/libv8-node/location.rb', 'ext/libv8-node/paths.rb']
3131
gemspec.files += ['ext/libv8-node/.location.yml']
3232

ext/libv8-node/.location.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
--- !ruby/object:Libv8Node::Location::Vendor {}
1+
--- !ruby/object:Libv8::Node::Location::Vendor {}
22

ext/libv8-node/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
create_makefile('libv8-node')
33

44
#require File.expand_path('../location', __FILE__)
5-
#location = Libv8Node::Location::Vendor.new
5+
#location = Libv8::Node::Location::Vendor.new
66

77
#exit location.install!
88
exit 0

ext/libv8-node/location.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
require 'pathname'
33
require File.expand_path '../paths', __FILE__
44

5-
module Libv8Node
5+
module Libv8; end
6+
7+
module Libv8::Node
68
class Location
79
def install!
810
File.open(Pathname(__FILE__).dirname.join('.location.yml'), "w") do |f|
@@ -20,24 +22,24 @@ def self.load!
2022
class Vendor < Location
2123
def install!
2224
require File.expand_path '../builder', __FILE__
23-
builder = Libv8Node::Builder.new
25+
builder = Libv8::Node::Builder.new
2426
exit_status = builder.build_libv8!
2527
super if exit_status == 0
2628
verify_installation!
2729
return exit_status
2830
end
2931

3032
def configure(context = MkmfContext.new)
31-
context.incflags.insert 0, Libv8Node::Paths.include_paths.map{ |p| "-I#{p}" }.join(" ") + " "
32-
context.ldflags.insert 0, Libv8Node::Paths.object_paths.join(" ") + " "
33+
context.incflags.insert 0, Libv8::Node::Paths.include_paths.map{ |p| "-I#{p}" }.join(" ") + " "
34+
context.ldflags.insert 0, Libv8::Node::Paths.object_paths.join(" ") + " "
3335
end
3436

3537
def verify_installation!
36-
include_paths = Libv8Node::Paths.include_paths
38+
include_paths = Libv8::Node::Paths.include_paths
3739
unless include_paths.detect { |p| Pathname(p).join('v8.h').exist? }
3840
fail HeaderNotFound, "Unable to locate 'v8.h' in the libv8 header paths: #{include_paths.inspect}"
3941
end
40-
Libv8Node::Paths.object_paths.each do |p|
42+
Libv8::Node::Paths.object_paths.each do |p|
4143
fail ArchiveNotFound, p unless File.exist? p
4244
end
4345
end
@@ -69,7 +71,7 @@ def initialize(*args)
6971
However, your system version of v8 could not be located.
7072
7173
Please make sure your system version of v8 that is compatible
72-
with #{Libv8Node::VERSION} installed. You may need to use the
74+
with #{Libv8::Node::VERSION} installed. You may need to use the
7375
--with-v8-dir option if it is installed in a non-standard location
7476
EOS
7577
end

ext/libv8-node/paths.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require 'rbconfig'
22
require 'shellwords'
33

4-
module Libv8Node
4+
module Libv8; end
5+
6+
module Libv8::Node
57
module Paths
68
module_function
79

lib/libv8-node.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require 'libv8_node'
1+
require 'libv8/node'
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
require 'libv8_node/version'
1+
require 'libv8/node/version'
22
require 'libv8-node/location'
33

4-
module Libv8Node
4+
module Libv8; end
5+
6+
module Libv8::Node
57
def self.configure_makefile
68
location = Location.load!
79
location.configure
810
end
911
end
10-
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
module Libv8Node
1+
module Libv8; end
2+
3+
module Libv8::Node
24
VERSION = "12.18.4.0.beta1"
35
NODE_VERSION = "12.18.4"
46
LIBV8_VERSION = "7.8.279.23" # v8/include/v8-version.h

libv8-node.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
2-
require 'libv8_node/version'
2+
require 'libv8/node/version'
33

44
Gem::Specification.new do |s|
55
s.name = 'libv8-node'
6-
s.version = Libv8Node::VERSION
6+
s.version = Libv8::Node::VERSION
77
s.platform = Gem::Platform::RUBY
88
s.authors = ['']
99
s.email = ['']

0 commit comments

Comments
 (0)