lib/table_setter.rb in table_setter-0.2.3 vs lib/table_setter.rb in table_setter-0.2.4
- old
+ new
@@ -1,13 +1,21 @@
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
require 'table_fu'
require 'yaml'
+if RUBY_VERSION > "1.9"
+ require 'csv'
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+ ::FasterCSV = CSV unless defined? ::FasterCSV
+else
+ require 'fastercsv'
+end
+
autoload :Sinatra, 'sinatra/base'
autoload :Thin, 'thin'
autoload :ERB, 'erb'
-autoload :FasterCSV, 'FasterCSV'
autoload :Curb, 'curb'
autoload :RDiscount, 'rdiscount'
module TableSetter
# autoload internals
\ No newline at end of file