about summary refs log tree commit homepage
path: root/lib/rainbows/const.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-10-22 16:21:03 -0700
committerEric Wong <normalperson@yhbt.net>2010-10-22 16:21:03 -0700
commit180485d49ea858f83ef2a28a9e07224aa514edc7 (patch)
treeb4c649d2118c0010bf3876a49dadfe3e4cbc3f86 /lib/rainbows/const.rb
parent41145ed4d335718ac43aec9313b7571a12fe96ee (diff)
downloadrainbows-180485d49ea858f83ef2a28a9e07224aa514edc7.tar.gz
This simplifies and disambiguates most constant resolution
issues as well as lowering our identation level.  Hopefully
this makes code easier to understand.
Diffstat (limited to 'lib/rainbows/const.rb')
-rw-r--r--lib/rainbows/const.rb38
1 files changed, 18 insertions, 20 deletions
diff --git a/lib/rainbows/const.rb b/lib/rainbows/const.rb
index 1c77c76..ecdafab 100644
--- a/lib/rainbows/const.rb
+++ b/lib/rainbows/const.rb
@@ -1,30 +1,28 @@
 # -*- encoding: binary -*-
 # :enddoc:
-module Rainbows
+module Rainbows::Const
 
-  module Const
-    RAINBOWS_VERSION = '0.97.0'
+  RAINBOWS_VERSION = '0.97.0'
 
-    include Unicorn::Const
+  include Unicorn::Const
 
-    RACK_DEFAULTS = Unicorn::HttpRequest::DEFAULTS.update({
-      "SERVER_SOFTWARE" => "Rainbows! #{RAINBOWS_VERSION}",
+  RACK_DEFAULTS = Unicorn::HttpRequest::DEFAULTS.update({
+    "SERVER_SOFTWARE" => "Rainbows! #{RAINBOWS_VERSION}",
 
-      # using the Rev model, we'll automatically chunk pipe and socket objects
-      # if they're the response body.  Unset by default.
-      # "rainbows.autochunk" => false,
-    })
+    # using the Rev model, we'll automatically chunk pipe and socket objects
+    # if they're the response body.  Unset by default.
+    # "rainbows.autochunk" => false,
+  })
 
-    # client IO object that supports reading and writing directly
-    # without filtering it through the HTTP chunk parser.
-    # Maybe we can get this renamed to "rack.io" if it becomes part
-    # of the official spec, but for now it is "hack.io"
-    CLIENT_IO = "hack.io".freeze
+  # client IO object that supports reading and writing directly
+  # without filtering it through the HTTP chunk parser.
+  # Maybe we can get this renamed to "rack.io" if it becomes part
+  # of the official spec, but for now it is "hack.io"
+  CLIENT_IO = "hack.io".freeze
 
-    ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n"
-    ERROR_416_RESPONSE = "HTTP/1.1 416 Requested Range Not Satisfiable\r\n\r\n"
+  ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n"
+  ERROR_416_RESPONSE = "HTTP/1.1 416 Requested Range Not Satisfiable\r\n\r\n"
 
-    RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT
-    REMOTE_ADDR = Unicorn::HttpRequest::REMOTE_ADDR
-  end
+  RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT
+  REMOTE_ADDR = Unicorn::HttpRequest::REMOTE_ADDR
 end