Skip to content

Commit

Permalink
Include 'gen_build.complete' from Gem
Browse files Browse the repository at this point in the history
Resolves #100.
  • Loading branch information
jcangas authored and larsch committed Dec 1, 2015
1 parent dee545e commit 2e7c88f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/ocra
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,12 @@ EOF
Ocra.msg "Detected gem #{spec.full_name} (#{include.join(', ')})"

gem_root = Pathname(spec.gem_dir)
gem_extension = (gem_root / '..' / '..' / 'extensions').expand
if gem_extension.exist?
build_complete = gem_extension.find_all_files(/gem.build_complete/).select{|p| p.dirname.basename.to_s == spec.full_name}
else
build_complete = nil
end
gem_root_files = nil
files = []

Expand All @@ -673,6 +679,7 @@ EOF
when :files
gem_root_files ||= gem_root.find_all_files(//)
files << gem_root_files.select { |path| path.relative_path_from(gem_root) !~ GEM_NON_FILE_RE }
files << build_complete if build_complete
when :extras
gem_root_files ||= gem_root.find_all_files(//)
files << gem_root_files.select { |path| path.relative_path_from(gem_root) =~ GEM_EXTRA_RE }
Expand Down

0 comments on commit 2e7c88f

Please sign in to comment.