lib/flydata.rb in flydata-0.2.17 vs lib/flydata.rb in flydata-0.2.18
- old
+ new
@@ -1,5 +1,15 @@
-# common
+# 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
+end
+flydata_top_dir = File.realpath('../../', __FILE__)
+flydata_core_dir = File.join(flydata_top_dir, 'flydata-core')
+flydata_core_lib_dir = File.realpath('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'