Class: RubyWasm::Packager::Core::BuildStrategy
- Inherits:
-
Object
- Object
- RubyWasm::Packager::Core::BuildStrategy
show all
- Defined in:
- lib/ruby_wasm/packager/core.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BuildStrategy.
32
33
34
|
# File 'lib/ruby_wasm/packager/core.rb', line 32
def initialize(packager)
@packager = packager
end
|
Instance Method Details
#artifact ⇒ Object
74
75
76
|
# File 'lib/ruby_wasm/packager/core.rb', line 74
def artifact
raise NotImplementedError
end
|
#build(executor, options) ⇒ Object
36
37
38
|
# File 'lib/ruby_wasm/packager/core.rb', line 36
def build(executor, options)
raise NotImplementedError
end
|
#build_gem_exts(executor, gem_home) ⇒ Object
40
41
42
|
# File 'lib/ruby_wasm/packager/core.rb', line 40
def build_gem_exts(executor, gem_home)
raise NotImplementedError
end
|
#cache_key(digest) ⇒ Object
70
71
72
|
# File 'lib/ruby_wasm/packager/core.rb', line 70
def cache_key(digest)
raise NotImplementedError
end
|
#link_gem_exts(executor, ruby_root, gem_home, module_bytes) ⇒ Object
44
45
46
|
# File 'lib/ruby_wasm/packager/core.rb', line 44
def link_gem_exts(executor, ruby_root, gem_home, module_bytes)
raise NotImplementedError
end
|
#specs_with_extensions ⇒ Object
Array of paths to extconf.rb files.
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/ruby_wasm/packager/core.rb', line 49
def specs_with_extensions
@packager.specs.filter_map do |spec|
exts =
spec.extensions.select do |ext|
File.exist?(File.join(spec.full_gem_path, ext))
end
next nil if exts.empty?
[spec, exts]
end
end
|
#with_unbundled_env(&block) ⇒ Object
62
63
64
65
66
67
68
|
# File 'lib/ruby_wasm/packager/core.rb', line 62
def with_unbundled_env(&block)
__skip__ = if defined?(Bundler)
Bundler.with_unbundled_env(&block)
else
block.call
end
end
|