summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baserockimport/exts/importer_bundler_extensions.rb5
-rwxr-xr-xbaserockimport/exts/rubygems.find_deps2
2 files changed, 4 insertions, 3 deletions
diff --git a/baserockimport/exts/importer_bundler_extensions.rb b/baserockimport/exts/importer_bundler_extensions.rb
index 034b3c2..0e81cf5 100644
--- a/baserockimport/exts/importer_bundler_extensions.rb
+++ b/baserockimport/exts/importer_bundler_extensions.rb
@@ -28,7 +28,7 @@ end
module Importer
module BundlerExtensions
- def create_bundler_definition_for_gemspec(gem_name)
+ def create_bundler_definition_for_gemspec(gem_name, path)
# Using the real Gemfile doesn't get great results, because people can put
# lots of stuff in there that is handy for developers to have but
# irrelevant if you just want to produce a .gem. Also, there is only one
@@ -41,7 +41,8 @@ module Importer
fake_gemfile = Bundler::Dsl.new
fake_gemfile.source('https://rubygems.org')
begin
- fake_gemfile.gemspec({:name => gem_name})
+ fake_gemfile.gemspec({:name => gem_name,
+ :path => path})
rescue Bundler::InvalidOption
error "Did not find #{gem_name}.gemspec in current directory."
exit 1
diff --git a/baserockimport/exts/rubygems.find_deps b/baserockimport/exts/rubygems.find_deps
index 228c88b..5ae9598 100755
--- a/baserockimport/exts/rubygems.find_deps
+++ b/baserockimport/exts/rubygems.find_deps
@@ -74,7 +74,7 @@ class RubyGemDependencyFinder < Importer::Base
"#{source_dir_name}")
resolved_specs = Dir.chdir(source_dir_name) do
- definition = create_bundler_definition_for_gemspec(gem_name)
+ definition = create_bundler_definition_for_gemspec(gem_name, source_dir_name)
definition.resolve_remotely!
end