lib/superstore/railtie.rb in superstore-1.1.2 vs lib/superstore/railtie.rb in superstore-1.1.3

- old
+ new

@@ -4,11 +4,17 @@ load 'superstore/tasks/ks.rake' end initializer "superstore.config" do |app| ActiveSupport.on_load :superstore do - pathnames = [Rails.root.join('config', 'superstore.yml'), Rails.root.join('config', 'cassandra.yml')] + pathnames = [Rails.root.join('config', 'cassandra.yml'), Rails.root.join('config', 'superstore.yml')] if pathname = pathnames.detect(&:exist?) + if pathname.basename.to_s == 'cassandra.yml' + warn "***********************" + warn "config/cassandra.yml is deprecated. Use config/superstore.yml" + warn "***********************" + end + config = ERB.new(pathname.read).result config = YAML.load(config) if config = config[Rails.env] self.config = config.symbolize_keys!