lib/rtriplify.rb in rtriplify-0.0.0 vs lib/rtriplify.rb in rtriplify-0.0.1
- old
+ new
@@ -1,17 +1,16 @@
require 'configatron'
-#loading helpers and controllers
+if File.exists?('config/triplify.yml')
+ #loading helpers and controllers
-%w{ models controllers helpers}.each do |dir|
- path = File.join(File.dirname(__FILE__), 'app', dir)
- $LOAD_PATH << path
- ActiveSupport::Dependencies.load_paths << path
- ActiveSupport::Dependencies.load_once_paths.delete(path)
+ %w{ models controllers helpers}.each do |dir|
+ path = File.join(File.dirname(__FILE__), 'app', dir)
+ $LOAD_PATH << path
+ ActiveSupport::Dependencies.load_paths << path
+ ActiveSupport::Dependencies.load_once_paths.delete(path)
+ end
+ # load settings
+ configatron.configure_from_yaml('config/triplify.yml')
end
-
-# load settings
-configatron.configure_from_yaml('vendor/plugins/rtriplify/lib/config/database.yml')
-
-