lib/lifeboat.rb in lifeboat-0.1.0 vs lib/lifeboat.rb in lifeboat-0.1.1
- old
+ new
@@ -1,23 +1,34 @@
require 'rubygems'
require 'right_aws'
require 'active_record'
require 'yaml'
+class AWS
+ def self.root
+ if Rails.root
+ YAML::load(IO.read(Rails.root + "/config/aws.yml"))
+ else
+ YAML::load(IO.read(File.dirname(__FILE__) + '/../config/aws.yml'))
+ end
+ end
+end
+
+
class Credentials
def initialize
# TRIED USING THE INITIALIZE FOR THOSE YAML LOADING DOWN THERE
# BUT IT WAS GIVING ME CRAP AND HAD TO DUPLICATE THE LINE
# MY GUEST IS THAT IT IS B/C THEY ARE CLASS METHODS
# TODO: RESEARCH HOW TO REFACTOR OUT
end
def self.key
- Rails.root['test']['key']
+ AWS.root['test']['key']
end
def self.secret
- Rails.root['test']['secret']
+ AWS.root['test']['secret']
end
end
module LifeBoat