require_relative '../feature/ruby/merge_gem' require_relative '../feature/ruby/merge_gemfile' require_relative '../feature/ruby/merge_exec' module IronWorkerNG module Code class Ruby < IronWorkerNG::Code::Base include IronWorkerNG::Feature::Ruby::MergeGem::InstanceMethods include IronWorkerNG::Feature::Ruby::MergeGemfile::InstanceMethods include IronWorkerNG::Feature::Ruby::MergeExec::InstanceMethods def bundle(zip) super(zip) gempath_code_array = [] @features.each do |f| if f.respond_to?(:code_for_gempath) gempath_code_array << f.send(:code_for_gempath) end end gempath_code = gempath_code_array.join("\n") zip.get_output_stream('__runner__.rb') do |runner| runner.write < 'ruby', :klass => IronWorkerNG::Code::Ruby)