Skip to content

Commit

Permalink
Merge pull request #93 from gel-rb/ignore-local-extensions
Browse files Browse the repository at this point in the history
Provide enough empty shells that rake-compiler can (partly) work
  • Loading branch information
matthewd committed Oct 17, 2019
2 parents d826f3f + 7bc107d commit 450d831
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
Empty file.
12 changes: 12 additions & 0 deletions lib/gel/compatibility/rubygems.rb
Expand Up @@ -32,6 +32,10 @@ class << self
include Enumerable
end

def self.load(filename)
new(Gel::DirectGem.new(File.dirname(filename), File.basename(filename, ".gemspec")))
end

def self.find_by_name(name, *requirements)
if g = Gel::Environment.find_gem(name, *requirements)
new(g)
Expand Down Expand Up @@ -76,6 +80,14 @@ def require_paths
Pathname.new(path).relative_path_from(base).to_s
end
end

def platform
nil
end

def files
[]
end
end

class DependencyInstaller
Expand Down
7 changes: 7 additions & 0 deletions lib/gel/compatibility/rubygems/package_task.rb
@@ -0,0 +1,7 @@
class Gem::PackageTask
def initialize(*)
end

def method_missing(*)
end
end
4 changes: 2 additions & 2 deletions lib/gel/direct_gem.rb
Expand Up @@ -20,10 +20,10 @@ def initialize(root, name, version = nil)
info = {
bindir: gemspec.bindir || "bin",
executables: gemspec.executables,
require_paths: gemspec.require_paths || [gemspec.require_path].compact,
require_paths: gemspec.require_paths || [gemspec.require_path || "lib"].compact,
dependencies: gemspec.runtime_dependencies,
}

super(root, name, version || Gel::Support::GemVersion.new(gemspec.version).to_s, gemspec.extensions, info)
super(root, name, version || Gel::Support::GemVersion.new(gemspec.version).to_s, nil, info)
end
end

0 comments on commit 450d831

Please sign in to comment.