Sha256: 9c86a0bf87d7b9f3f6fce208c446c70795d785609277fe645f06b27c0efa88ae
Contents?: true
Size: 941 Bytes
Versions: 3
Compression:
Stored size: 941 Bytes
Contents
# conditional loading of activesupport if defined? Rails and (Rails.version.split('.').map(&:to_i) <=> [2,3,5]) < 0 require 'activesupport' else require 'active_support/core_ext/class/inheritable_attributes' end # load the right csv library if RUBY_VERSION >= '1.9' require 'csv' FasterCSV = CSV else begin # try faster csv require 'fastercsv' rescue Exception => e if defined? Rails Rails.logger.info "FasterCSV not installed, falling back on CSV" else puts "FasterCSV not installed, falling back on CSV" end require 'csv' FasterCSV = CSV end end require 'comma/extractors' require 'comma/generator' require 'comma/array' require 'comma/object' require 'comma/render_as_csv' if defined?(ActiveRecord) require 'comma/named_scope' require 'comma/association_proxy' end if defined?(RenderAsCSV) && defined?(ActionController) ActionController::Base.send :include, RenderAsCSV end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
comma-0.4.3 | lib/comma.rb |
comma-0.4.2 | lib/comma.rb |
vibedeck-comma-0.4.2 | lib/comma.rb |