Sha256: 67ff48435e13b13af9e2661c63257417d4ed6c36abada201d4719f1d532f97c6

Contents?: true

Size: 894 Bytes

Versions: 1

Compression:

Stored size: 894 Bytes

Contents

require 'uri' unless defined?(::URI)
module Plezi
   protected

  @plezi_finalize = nil
  def plezi_finalize
     if @plezi_finalize.nil?
        @plezi_finalize = true
        @plezi_finalize = 1
     end
  end
  @plezi_initialize = nil
  def self.plezi_initialize
     if @plezi_initialize.nil?
        @plezi_initialize = true
        self.hash_proc_4symstr # creates the Proc object used for request params
        @plezi_autostart = true if @plezi_autostart.nil?
        Iodine.patch_rack
        if((ENV['PL_REDIS_URL'.freeze] ||= ENV["REDIS_URL"]))
          uri = URI(ENV['PL_REDIS_URL'.freeze])
          Iodine.default_pubsub = Iodine::PubSub::RedisEngine.new(uri.host, uri.port, 0, uri.password)
        end
        at_exit do
           next if @plezi_autostart == false
           ::Iodine::Rack.app = ::Plezi.app
           ::Iodine.start
        end
     end
     true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plezi-0.15.0 lib/plezi/activation.rb