Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #696 from teoljungberg/patch-1

Rename files to follow ruby naming conventions
commit 971209b412e993f47b1956d4711b6ad6faa05689 2 parents 02e2f0f + 8c5916f
@tenderlove tenderlove authored
Showing with 35 additions and 35 deletions.
  1. +6 −6 lib/rack.rb
  2. 0  lib/rack/{commonlogger.rb → common_logger.rb}
  3. 0  lib/rack/{conditionalget.rb → conditional_get.rb}
  4. +1 −1  lib/rack/lobster.rb
  5. 0  lib/rack/{methodoverride.rb → method_override.rb}
  6. +1 −1  lib/rack/multipart/parser.rb
  7. 0  lib/rack/{nulllogger.rb → null_logger.rb}
  8. 0  lib/rack/{showexceptions.rb → show_exceptions.rb}
  9. 0  lib/rack/{showstatus.rb → show_status.rb}
  10. +1 −1  test/registering_handler/rack/handler/registering_myself.rb
  11. +3 −3 test/spec_builder.rb
  12. +1 −1  test/spec_cascade.rb
  13. +1 −1  test/{spec_commonlogger.rb → spec_common_logger.rb}
  14. +2 −2 test/{spec_conditionalget.rb → spec_conditional_get.rb}
  15. +2 −2 test/spec_content_type.rb
  16. +2 −2 test/spec_etag.rb
  17. +2 −2 test/{spec_methodoverride.rb → spec_method_override.rb}
  18. +1 −1  test/{spec_nulllogger.rb → spec_null_logger.rb}
  19. +1 −1  test/spec_recursive.rb
  20. +1 −1  test/spec_request.rb
  21. +2 −2 test/spec_runtime.rb
  22. +1 −1  test/spec_session_cookie.rb
  23. +1 −1  test/spec_session_pool.rb
  24. +2 −2 test/{spec_showexceptions.rb → spec_show_exceptions.rb}
  25. +2 −2 test/{spec_showstatus.rb → spec_show_status.rb}
  26. +1 −1  test/unregistered_handler/rack/handler/unregistered.rb
  27. +1 −1  test/unregistered_handler/rack/handler/unregistered_long_one.rb
View
12 lib/rack.rb
@@ -89,8 +89,8 @@ def self.release
autoload :BodyProxy, "rack/body_proxy"
autoload :Cascade, "rack/cascade"
autoload :Chunked, "rack/chunked"
- autoload :CommonLogger, "rack/commonlogger"
- autoload :ConditionalGet, "rack/conditionalget"
+ autoload :CommonLogger, "rack/common_logger"
+ autoload :ConditionalGet, "rack/conditional_get"
autoload :Config, "rack/config"
autoload :ContentLength, "rack/content_length"
autoload :ContentType, "rack/content_type"
@@ -104,16 +104,16 @@ def self.release
autoload :Lint, "rack/lint"
autoload :Lock, "rack/lock"
autoload :Logger, "rack/logger"
- autoload :MethodOverride, "rack/methodoverride"
+ autoload :MethodOverride, "rack/method_override"
autoload :Mime, "rack/mime"
- autoload :NullLogger, "rack/nulllogger"
+ autoload :NullLogger, "rack/null_logger"
autoload :Recursive, "rack/recursive"
autoload :Reloader, "rack/reloader"
autoload :Runtime, "rack/runtime"
autoload :Sendfile, "rack/sendfile"
autoload :Server, "rack/server"
- autoload :ShowExceptions, "rack/showexceptions"
- autoload :ShowStatus, "rack/showstatus"
+ autoload :ShowExceptions, "rack/show_exceptions"
+ autoload :ShowStatus, "rack/show_status"
autoload :Static, "rack/static"
autoload :TempfileReaper, "rack/tempfile_reaper"
autoload :URLMap, "rack/urlmap"
View
0  lib/rack/commonlogger.rb → lib/rack/common_logger.rb
File renamed without changes
View
0  lib/rack/conditionalget.rb → lib/rack/conditional_get.rb
File renamed without changes
View
2  lib/rack/lobster.rb
@@ -63,7 +63,7 @@ def call(env)
if $0 == __FILE__
require 'rack'
- require 'rack/showexceptions'
+ require 'rack/show_exceptions'
Rack::Server.start(
:app => Rack::ShowExceptions.new(Rack::Lint.new(Rack::Lobster.new)), :Port => 9292
)
View
0  lib/rack/methodoverride.rb → lib/rack/method_override.rb
File renamed without changes
View
2  lib/rack/multipart/parser.rb
@@ -172,7 +172,7 @@ def get_filename(head)
if filename !~ /\\[^\\"]/
filename = filename.gsub(/\\(.)/, '\1')
end
-
+
encoding, locale, name = filename.split("'",3)
if locale.nil? && name.nil?
View
0  lib/rack/nulllogger.rb → lib/rack/null_logger.rb
File renamed without changes
View
0  lib/rack/showexceptions.rb → lib/rack/show_exceptions.rb
File renamed without changes
View
0  lib/rack/showstatus.rb → lib/rack/show_status.rb
File renamed without changes
View
2  test/registering_handler/rack/handler/registering_myself.rb
@@ -5,4 +5,4 @@ class RegisteringMyself
register :registering_myself, RegisteringMyself
end
-end
+end
View
6 test/spec_builder.rb
@@ -2,7 +2,7 @@
require 'rack/builder'
require 'rack/lint'
require 'rack/mock'
-require 'rack/showexceptions'
+require 'rack/show_exceptions'
require 'rack/urlmap'
class NothingMiddleware
@@ -23,11 +23,11 @@ def self.env
def builder(&block)
Rack::Lint.new Rack::Builder.new(&block)
end
-
+
def builder_to_app(&block)
Rack::Lint.new Rack::Builder.new(&block).to_app
end
-
+
it "supports mapping" do
app = builder_to_app do
map '/' do |outer_env|
View
2  test/spec_cascade.rb
@@ -10,7 +10,7 @@
def cascade(*args)
Rack::Lint.new Rack::Cascade.new(*args)
end
-
+
docroot = File.expand_path(File.dirname(__FILE__))
app1 = Rack::File.new(docroot)
View
2  test/spec_commonlogger.rb → test/spec_common_logger.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'rack/commonlogger'
+require 'rack/common_logger'
require 'rack/lint'
require 'rack/mock'
View
4 test/spec_conditionalget.rb → test/spec_conditional_get.rb
@@ -1,13 +1,13 @@
require 'minitest/autorun'
require 'time'
-require 'rack/conditionalget'
+require 'rack/conditional_get'
require 'rack/mock'
describe Rack::ConditionalGet do
def conditional_get(app)
Rack::Lint.new Rack::ConditionalGet.new(app)
end
-
+
it "set a 304 status and truncate body when If-Modified-Since hits" do
timestamp = Time.now.httpdate
app = conditional_get(lambda { |env|
View
4 test/spec_content_type.rb
@@ -7,11 +7,11 @@
def content_type(app, *args)
Rack::Lint.new Rack::ContentType.new(app, *args)
end
-
+
def request
Rack::MockRequest.env_for
end
-
+
it "set Content-Type to default text/html if none is set" do
app = lambda { |env| [200, {}, "Hello, World!"] }
headers = content_type(app).call(request)[1]
View
4 test/spec_etag.rb
@@ -8,11 +8,11 @@
def etag(app, *args)
Rack::Lint.new Rack::ETag.new(app, *args)
end
-
+
def request
Rack::MockRequest.env_for
end
-
+
def sendfile_body
res = ['Hello World']
def res.to_path ; "/tmp/hello.txt" ; end
View
4 test/spec_methodoverride.rb → test/spec_method_override.rb
@@ -1,6 +1,6 @@
require 'minitest/autorun'
require 'stringio'
-require 'rack/methodoverride'
+require 'rack/method_override'
require 'rack/mock'
describe Rack::MethodOverride do
@@ -9,7 +9,7 @@ def app
[200, {"Content-Type" => "text/plain"}, []]
}))
end
-
+
it "not affect GET requests" do
env = Rack::MockRequest.env_for("/?_method=delete", :method => "GET")
app.call env
View
2  test/spec_nulllogger.rb → test/spec_null_logger.rb
@@ -1,7 +1,7 @@
require 'minitest/autorun'
require 'rack/lint'
require 'rack/mock'
-require 'rack/nulllogger'
+require 'rack/null_logger'
describe Rack::NullLogger do
it "act as a noop logger" do
View
2  test/spec_recursive.rb
@@ -32,7 +32,7 @@
raise Rack::ForwardRequest.new("http://example.org/app1/quux?meh")
}
end
-
+
def recursive(map)
Rack::Lint.new Rack::Recursive.new(Rack::URLMap.new(map))
end
View
2  test/spec_request.rb
@@ -173,7 +173,7 @@ def initialize(*)
req.POST.must_be :empty?
req.params.must_equal "foo" => "bar", "quux" => "b", "la" => nil, "wun" => "duh"
end
-
+
it "limit the keys from the GET query string" do
env = Rack::MockRequest.env_for("/?foo=bar")
View
4 test/spec_runtime.rb
@@ -7,11 +7,11 @@
def runtime_app(app, *args)
Rack::Lint.new Rack::Runtime.new(app, *args)
end
-
+
def request
Rack::MockRequest.env_for
end
-
+
it "sets X-Runtime is none is set" do
app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
response = runtime_app(app).call(request)
View
2  test/spec_session_cookie.rb
@@ -11,7 +11,7 @@
hash.delete("session_id")
Rack::Response.new(hash.inspect).to_a
end
-
+
session_id = lambda do |env|
Rack::Response.new(env["rack.session"].to_hash.inspect).to_a
end
View
2  test/spec_session_pool.rb
@@ -36,7 +36,7 @@
env['rack.session.options'][:defer] = true
incrementor.call(env)
end)
-
+
incrementor = Rack::Lint.new(incrementor)
it "creates a new cookie" do
View
4 test/spec_showexceptions.rb → test/spec_show_exceptions.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'rack/showexceptions'
+require 'rack/show_exceptions'
require 'rack/lint'
require 'rack/mock'
@@ -7,7 +7,7 @@
def show_exceptions(app)
Rack::Lint.new Rack::ShowExceptions.new(app)
end
-
+
it "catches exceptions" do
res = nil
View
4 test/spec_showstatus.rb → test/spec_show_status.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'rack/showstatus'
+require 'rack/show_status'
require 'rack/lint'
require 'rack/mock'
require 'rack/utils'
@@ -8,7 +8,7 @@
def show_status(app)
Rack::Lint.new Rack::ShowStatus.new(app)
end
-
+
it "provide a default status message" do
req = Rack::MockRequest.new(
show_status(lambda{|env|
View
2  test/unregistered_handler/rack/handler/unregistered.rb
@@ -4,4 +4,4 @@ module Handler
class Unregistered
end
end
-end
+end
View
2  test/unregistered_handler/rack/handler/unregistered_long_one.rb
@@ -4,4 +4,4 @@ module Handler
class UnregisteredLongOne
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.