bin/est in est-0.2 vs bin/est in est-0.2.1

- old
+ new

@@ -65,18 +65,23 @@ exit end Encoding.default_external = Encoding::UTF_8 Encoding.default_internal = Encoding::UTF_8 -file = opts.file? ? File.new(opts[:file], 'w') : STDOUT +if opts.file? + file = File.new(opts[:file], 'w') + Est.log.info "output saving into #{file.path}" +else + file = STDOUT +end output = Est::Base.new(opts).xml if opts[:format].nil? || opts[:format] == 'text' xslt = File.join( File.dirname(File.dirname(__FILE__)), 'assets', 'est-text.xsl' ) - output = Nokogiri::XSLT(File.read(xslt)).transform(Nokogiri::XML(output)) + output = Nokogiri::XSLT(File.read(xslt)).apply_to(Nokogiri::XML(output)) elsif opts[:format] == 'html' Est.log.info 'using HTML format' xslt = File.join( File.dirname(File.dirname(__FILE__)), 'assets', 'est.xsl' @@ -86,6 +91,5 @@ Est.log.info 'using XML format' else fail 'invalid format, use html, text, or xml' end file << output -Est.log.info "output saved into #{file}"