Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change Compiler to only need one method changed between RubyGems vers…

…ions
  • Loading branch information...
commit 2ac4b9c2bdd5de69b12ef6b67c6638730e3e6263 1 parent 733ca4f
@ferrous26 authored
Showing with 5 additions and 9 deletions.
  1. +5 −9 lib/rubygems-compile/compiler.rb
View
14 lib/rubygems-compile/compiler.rb
@@ -28,11 +28,11 @@ def compile gem
gem_files.each do |file|
message = compile_file_message(file)
- full_path = absolute_path(file)
+ full_path = File.join(@spec.full_gem_path, file)
if unsafe? full_path
message << "\t\t\tSKIPPED: #{@parser.warnings.join(', ')}"
else
- MacRuby::Compiler.compile_file(full_path)
+ MacRuby::Compiler.compile_file full_path
end
say message if really_verbose
end
@@ -68,15 +68,11 @@ def gem_compilation_message
def gem_files
@spec.lib_files.select { |file| File.extname(file) == '.rb' }
end
- def absolute_path file
- File.join(@spec.full_gem_path, file)
- end
else
def gem_files
- Dir.glob("#{@spec.lib_dirs_glob}/**/*.rb")
- end
- def absolute_path file
- file
+ Dir.glob("#{@spec.lib_dirs_glob}/**/*.rb").map { |file|
+ file.sub(Regexp.new(Regexp.escape(@spec.full_gem_path)), '')
+ }
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.