lib/jim/bundler.rb in jim-0.2.2 vs lib/jim/bundler.rb in jim-0.2.3

- old
+ new

@@ -53,11 +53,11 @@ # concatenate all the requirements into a single file and write to `to` or to the # path specified in the :bundled_path option def bundle!(to = nil) resolve! if paths.empty? - to = options[:bundled_path] if to.nil? && to != false && options[:bundled_path] + to = options[:bundled_path] if to.nil? && options[:bundled_path] io_for_path(to) do |io| logger.info "Bundling to #{to}" if to paths.each do |path, name, version| io << path.read << "\n" end @@ -121,10 +121,13 @@ yield to to.close to when Pathname to.dirname.mkpath - io = to.open('w') {|f| yield f } + io = to.open('w') + yield io + io.close + io when String to = Pathname.new(to) io_for_path(to, &block) else io = ""