lib/flydata.rb in flydata-0.3.5 vs lib/flydata.rb in flydata-0.3.6

- old
+ new

@@ -1,26 +1,23 @@ # load_path settings def append_load_path_if_not_exist(new_lib_path) - absolute_path = File.realpath(new_lib_path) - $LOAD_PATH.unshift absolute_path unless $LOAD_PATH.include? absolute_path + expanded_path = File.expand_path(new_lib_path) + $LOAD_PATH.unshift expanded_path unless $LOAD_PATH.include? expanded_path end -flydata_top_dir = File.realpath('../../', __FILE__) +flydata_top_dir = File.expand_path('../../', __FILE__) flydata_core_dir = File.join(flydata_top_dir, 'flydata-core') -flydata_core_lib_dir = File.realpath('lib', flydata_core_dir) +flydata_core_lib_dir = File.expand_path('lib', flydata_core_dir) append_load_path_if_not_exist(flydata_core_lib_dir) # require common libs require 'active_support/core_ext/string' -require 'active_support/dependencies' require 'active_support/time' require 'highline/import' require 'readline' require 'json' require 'pp' -# require all flydata libs -lib_dir = File.absolute_path(File.dirname(__FILE__)) -ActiveSupport::Dependencies.autoload_paths << lib_dir +require 'flydata/heroku' module Flydata FLYDATA_DEBUG = !!(ENV['FLYDATA_DEBUG']) FLYDATA_HOME = ENV['FLYDATA_HOME'] || "#{ENV['HOME']}/.flydata" FLYDATA_GEM_HOME = File.expand_path(File.join(File.dirname(__FILE__), '..'))