Skip to content

Commit

Permalink
editable spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukasaoishi committed Apr 3, 2015
1 parent a9e9353 commit a002d02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/fresh_connection/connection_factory.rb
@@ -1,7 +1,8 @@
module FreshConnection
class ConnectionFactory
def initialize(group)
def initialize(group, modify_spec = {})
@group = group.to_sym
@modify_spec = modify_spec
end

def new_connection
Expand All @@ -20,7 +21,7 @@ def spec

def build_spec
config = ar_spec.config
config.merge(config[@group] || {})
config.merge(config[@group] || {}).merge(@modify_spec)
end

def ar_spec
Expand Down

0 comments on commit a002d02

Please sign in to comment.