lib/plezi/common/api.rb in plezi-0.10.17 vs lib/plezi/common/api.rb in plezi-0.11.0

- old
+ new

@@ -107,13 +107,13 @@ # starts the Plezi framework and returns immidiately, # allowing you to run the Plezi framework along side another framework. def start_async Object.const_set("NO_PLEZI_AUTO_START", true) unless defined?(NO_PLEZI_AUTO_START) return GReactor.start if GReactor.running? - puts "Starting Plezi #{Plezi::VERSION} Services using the GRHttp #{GRHttp::VERSION} server." + puts "Starting Plezi #{Plezi::VERSION} Services using GRHttp #{GRHttp::VERSION} and GReactor #{GReactor::VERSION}." GReactor.on_shutdown { puts "Plezi shutdown. It was fun to serve you." } - GReactor.start Plezi::Settings.max_threads + GReactor.start ::Plezi::Settings.max_threads end # This allows you to run the Plezi framework along side another framework - WITHOUT running the actual server. # # The server will not be initiatet and instead you will be able to use Plezi controllers and the Redis auto-config # to broadcast Plezi messages to other Plezi processes - allowing for scalable intigration of Plezi into other frameworks. @@ -134,6 +134,6 @@ end Encoding.default_internal = 'utf-8' Encoding.default_external = 'utf-8' -NO_PLEZI_AUTO_START = true if defined?(::Rack::Builder) +Object.const_set("NO_PLEZI_AUTO_START", true) if defined?(::Rack::Builder) && !defined?(NO_PLEZI_AUTO_START)