Sha256: ee314a32576bfa093684eb2465268e34ae9c22370130de6c947c71c709d6b250

Contents?: true

Size: 1.06 KB

Versions: 21

Compression:

Stored size: 1.06 KB

Contents

#!/usr/bin/env ruby

require 'tnetstring'

require 'mongrel2' unless defined?( Mongrel2 )
require 'mongrel2/config' unless defined?( Mongrel2::Config )

# Mongrel2 X-Request configuration class
#
#   # Using the config DSL:
#   xrequest '/usr/local/lib/mongrel2/filters/watermark.so',
#       extensions: ['*.jpg', '*.png'],
#       src: '/usr/local/var/image/acme.png'
#
#   # Which is the same as:
#   Mongrel2::Config::XRequest.create(
#       name: '/usr/local/lib/mongrel2/filters/sendfile.so',
#       settings: {
#         min_size: 1000
#       }
#
#   # Or:
#   server.add_xrequest(
#       name: '/usr/local/lib/mongrel2/filters/sendfile.so',
#       settings: {
#         min_size: 1000
#       })
#
class Mongrel2::Config::XRequest < Mongrel2::Config( :xrequest )

	### As of Mongrel2/1.8.1:
	# CREATE TABLE xrequest (id INTEGER PRIMARY KEY,
	#     server_id INTEGER,
	#     name TEXT,
	#     settings TEXT);
	#

	many_to_one :server


	# Serialize the settings column as TNetStrings
	plugin :serialization, :tnetstring, :settings

end # class Mongrel2::Config::XRequest

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
mongrel2-0.52.2 lib/mongrel2/config/xrequest.rb
mongrel2-0.52.1 lib/mongrel2/config/xrequest.rb
mongrel2-0.52.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.51.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.50.2 lib/mongrel2/config/xrequest.rb
mongrel2-0.50.1 lib/mongrel2/config/xrequest.rb
mongrel2-0.50.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.49.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.48.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.47.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.46.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.45.1 lib/mongrel2/config/xrequest.rb
mongrel2-0.45.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.44.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.43.2 lib/mongrel2/config/xrequest.rb
mongrel2-0.43.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.42.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.42.0.pre.410 lib/mongrel2/config/xrequest.rb
mongrel2-0.41.0 lib/mongrel2/config/xrequest.rb
mongrel2-0.40.0 lib/mongrel2/config/xrequest.rb