lib/jarbler/builder.rb in jarbler-0.2.1 vs lib/jarbler/builder.rb in jarbler-0.2.2
- old
+ new
@@ -273,9 +273,14 @@
if !config.include_gems_to_compile
ruby_files = ruby_files.select { |f| !(f =~ /\.#{File::SEPARATOR}gems#{File::SEPARATOR}/) } # Exclude ./gems/* directories from compiling
end
+ # Exclude named files or directories from compiling
+ config.excludes_from_compile.each do |exclude|
+ ruby_files = ruby_files.select { |f| !(f =~ /\.#{File::SEPARATOR}app_root#{File::SEPARATOR}#{exclude}/) }
+ end
+
ruby_files.each do |ruby_file|
debug "Compile Ruby file #{ruby_file}"
full_file_name = File.join(Dir.pwd, ruby_file) # full name including path is required by the JRuby compiler
begin
status = JRuby::Compiler::compile_argv([full_file_name]) # compile the Ruby file
\ No newline at end of file