summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-10-06 16:32:34 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-10-06 16:32:34 +0100
commitbb6475e7536c5509f8acc5b6e571b6b88d83d460 (patch)
tree1cad680bb6d8bb53a68ac54525d1951cebfa50eb
parent81fa3b972289ebda69fb736ef4b2db4ba88449f7 (diff)
downloadmorph-bb6475e7536c5509f8acc5b6e571b6b88d83d460.tar.gz
Fix issue encountered with bundler 1.1.4
-rwxr-xr-ximport/rubygems.to_chunk6
1 files changed, 3 insertions, 3 deletions
diff --git a/import/rubygems.to_chunk b/import/rubygems.to_chunk
index 0a939a0f..1e8cd893 100755
--- a/import/rubygems.to_chunk
+++ b/import/rubygems.to_chunk
@@ -28,9 +28,9 @@ class << Bundler
end
end
-def spec_is_from_current_source_tree(spec)
+def spec_is_from_current_source_tree(spec, source_dir)
spec.source.instance_of? Bundler::Source::Path and
- spec.source.path.fnmatch?('.')
+ spec.source.path.fnmatch?(source_dir)
end
BANNER = "Usage: rubygems.to_chunk SOURCE_DIR GEM_NAME [VERSION]"
@@ -223,7 +223,7 @@ class RubyGemChunkMorphologyGenerator < Importer::Base
spec = get_spec_for_gem(resolved_specs, gem_name)
- if not spec_is_from_current_source_tree(spec)
+ if not spec_is_from_current_source_tree(spec, source_dir_name)
error "Specified gem '#{spec.name}' doesn't live in the source in " +
"'#{source_dir_name}'"
log.debug "SPEC: #{spec.inspect} #{spec.source}"