lib/otacrawler.rb in otacrawler-0.1.1 vs lib/otacrawler.rb in otacrawler-0.1.2

- old
+ new

@@ -3,10 +3,11 @@ require "mem" require "active_record" module Otacrawler config = YAML.load(ERB.new(IO.read(ENV["DATABASE_SETTING_PATH"])).result) - ActiveRecord::Base.establish_connection(config["db"]["development"]) + env = ENV["RAILS_ENV"] || ENV["OTACRAWLER_ENV"] + ActiveRecord::Base.establish_connection(config[env]) class << self include Mem def sites []