lib/celluloid/supervision/configuration.rb in celluloid-supervision-0.20.0.pre2 vs lib/celluloid/supervision/configuration.rb in celluloid-supervision-0.20.0.pre4

- old
+ new

@@ -34,14 +34,14 @@ end end true end - def options(args, options={}) - configuration = args.merge(options) + def options(config={}, options={}) + configuration = config.merge(options) return configuration if configuration.is_a? Configuration - configuration[:initialize] = Container::Behavior.configure(configuration) + configuration[:configuration] = Container::Behavior.configure(configuration) valid?(configuration, true) configuration end end @@ -66,11 +66,11 @@ resync_accessors @configuration = options @supervisor ||= :"Celluloid.services" if options.is_a? Hash - options[:initialize] ||= Container::Behavior.configure(options) - @configuration = instance_eval(&options[:initialize]) + options[:configuration] ||= Container::Behavior.configure(options) + @configuration = instance_eval(&options[:configuration]) @supervisor ||= @configuration.fetch(:supervisor, :"Celluloid.services") end if (@configuration.is_a?(Hash) || @configuration.is_a?(Array)) && @configuration.any? define(@configuration)