Sha256: e6f04b27940803c4a0530abbe3c2f3363ef4a0efd762892fb171caacb5c44cef
Contents?: true
Size: 1.9 KB
Versions: 7
Compression:
Stored size: 1.9 KB
Contents
# Copyright (C) 2008-2011 AMEE UK Ltd. - http://www.amee.com # Released as Open Source Software under the BSD 3-Clause license. See LICENSE.txt for details. require 'rexml/document' require 'nokogiri' require 'active_support' require 'active_support/time' require 'log4r' # We don't NEED the JSON gem, but if it's available, use it. begin require 'json' rescue LoadError nil end class String def is_json? slice(0,1) == '{' end def is_v2_json? is_json? && match('"apiVersion"\s?:\s?"2.0"') end def is_xml? slice(0,5) == '<?xml' end def is_v2_xml? is_xml? && include?('<Resources xmlns="http://schemas.amee.cc/2.0">') end def is_v2_atom? is_xml? && (include?('<feed ') || include?('<entry ')) && include?('xmlns:amee="http://schemas.amee.cc/2.0"') end end require 'amee/core-extensions/hash' require 'amee/logger' require 'amee/exceptions' require 'amee/connection' require 'amee/parse_helper' require 'amee/collection' require 'amee/object' require 'amee/data_object' require 'amee/profile_object' require 'amee/data_category' require 'amee/data_item' require 'amee/data_item_value' require 'amee/data_item_value_history' require 'amee/profile' require 'amee/profile_category' require 'amee/profile_item' require 'amee/profile_item_value' require 'amee/drill_down' require 'amee/pager' require 'amee/item_definition' require 'amee/item_value_definition' require 'amee/user' require 'amee/v3' require 'amee/config' if defined?(Rails) require 'amee/rails' ActiveRecord::Base.send :include, AMEE::Rails amee_config = "config/amee.yml" if File.exist? amee_config $AMEE_CONFIG = AMEE::Config.setup(amee_config, Rails.env) else $AMEE_CONFIG = AMEE::Config.setup end end class Date def amee1_date strftime("%Y%m%d") end def amee1_month strftime("%Y%m") end end class Time def amee1_date strftime("%Y%m%d") end def amee1_month strftime("%Y%m") end end
Version data entries
7 entries across 7 versions & 1 rubygems
Version | Path |
---|---|
amee-4.1.7 | lib/amee.rb |
amee-4.1.6 | lib/amee.rb |
amee-4.1.5 | lib/amee.rb |
amee-4.1.4 | lib/amee.rb |
amee-4.1.3 | lib/amee.rb |
amee-4.1.2 | lib/amee.rb |
amee-4.1.1 | lib/amee.rb |