summaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-07 16:32:01 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-07 16:32:04 +0100
commita1be4276f60d2bfccd086370ccfa09b5fc87fecb (patch)
tree7c3502a7b04b2fa6979f7ec08625df3f6e9a7c77 /import
parent57efb12b15ddb54c1bf2fd6d89c36ce7b6b17122 (diff)
downloadmorph-a1be4276f60d2bfccd086370ccfa09b5fc87fecb.tar.gz
squash! Fix issue encountered with bundler 1.1.4
The fnmatch? function is from the Ruby stdlib, not Bundler, so this may have actually been related to the Ruby version. Either way, it's now fixed in a different way which avoids calling fnmatch? at all (which was probably never the right thing to do).
Diffstat (limited to 'import')
-rwxr-xr-ximport/rubygems.to_chunk3
1 files changed, 2 insertions, 1 deletions
diff --git a/import/rubygems.to_chunk b/import/rubygems.to_chunk
index 9bef05ec..63c9cd26 100755
--- a/import/rubygems.to_chunk
+++ b/import/rubygems.to_chunk
@@ -30,7 +30,7 @@ end
def spec_is_from_current_source_tree(spec, source_dir)
spec.source.instance_of? Bundler::Source::Path and
- spec.source.path.fnmatch?(source_dir)
+ File.identical?(spec.source.path, source_dir)
end
BANNER = "Usage: rubygems.to_chunk SOURCE_DIR GEM_NAME [VERSION]"
@@ -62,6 +62,7 @@ class RubyGemChunkMorphologyGenerator < Importer::Base
end
source_dir, gem_name, expected_version = parsed_arguments
+ source_dir = File.absolute_path(source_dir)
if expected_version != nil
expected_version = Gem::Version.new(expected_version.dup)
end