lib/not_relational/configuration.rb in cloudwow-not_relational-0.1.0 vs lib/not_relational/configuration.rb in cloudwow-not_relational-0.1.2

- old
+ new

@@ -3,16 +3,16 @@ module NotRelational class Configuration attr_reader :repository_class - attr_reader :domain_prefix - attr_reader :clob_bucket + attr_reader :base_domain_name + attr_reader :blob_bucket attr_reader :aws_key_id attr_reader :aws_secret_key attr_reader :memcache_servers - attr_reader :append_table_to_domain + attr_reader :use_seperate_domain_per_model attr_reader :fail_fast attr_reader :cipher_key_file attr_reader :cipher_iv_file @@ -26,21 +26,21 @@ if not_relational_config if not_relational_config.has_key?("repository_class") @repository_class=eval not_relational_config["repository_class"] else - @repository_class=NotRelational::Repository + @repository_class=NotRelational::MemoryRepository end - @domain_prefix= not_relational_config["domain_name_prefix"] || "" - @clob_bucket= not_relational_config["s3_clob_bucket"] + @base_domain_name= not_relational_config["domain_name_prefix"] || "" + @blob_bucket= not_relational_config["blob_bucket"] @aws_key_id = not_relational_config["aws_key_id"] @aws_secret_key = not_relational_config["aws_secret_key"] @memcache_servers= not_relational_config['memcache_servers'] - @memcache_servers = memcache_servers.split(",") if memcache_servers + @memcache_servers = memcache_servers.split(",") if memcache_servers and memcache_servers.respond_to?(:split) - @append_table_to_domain=not_relational_config['append_table_to_domain'] - @fail_fast=not_relational_config['fail_fast'] + @use_seperate_domain_per_model=not_relational_config['use_seperate_domain_per_model']||false + @fail_fast=not_relational_config['fail_fast'] ||false @cipher_key_file = not_relational_config['cipher_key_file'] @cipher_key_file ||= "./.cipher_key" if @cipher_key_file and File.exists?(@cipher_key_file) @cipher_key=File.open(@cipher_key_file).read @@ -96,10 +96,10 @@ config_file_path = "database.yml" elsif File.exists?(File.join("config", "database.yml")) config_file_path = File.join("config", "database.yml") end - config_section =(ENV['not_relational_ENV'] || "production")+"_not_relational" + config_section =(ENV['NOT_RELATIONAL_ENV'] || "production")+"_not_relational" end if config_file_path and config_section config_file = YAML.load(File.open( config_file_path)) $not_relational_config = config_file[config_section] \ No newline at end of file