lib/synchronised_migration.rb in synchronised_migration-1.0.2 vs lib/synchronised_migration.rb in synchronised_migration-2.0.0
- old
+ new
@@ -1,18 +1,36 @@
module SynchronisedMigration
+ class << self
+ attr_accessor :redis_config
+ end
+
+ def self.configure
+ self.redis_config ||= Configuration.new
+ yield(redis_config)
+ end
+
+ class Configuration
+ attr_accessor :host, :port, :db
+
+ def initialize
+ @host = ''
+ @port = 0
+ @db = 0
+ end
+ end
end
require 'synchronised_migration/railtie' if defined?(Rails)