Skip to content

Commit

Permalink
Autoloads, requires, and using new api
Browse files Browse the repository at this point in the history
  • Loading branch information
raggi committed May 3, 2011
1 parent 51fc864 commit 297f638
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/rack.rb
Expand Up @@ -54,6 +54,7 @@ def self.release
autoload :Static, "rack/static"
autoload :URLMap, "rack/urlmap"
autoload :Utils, "rack/utils"
autoload :Multipart, "rack/multipart"

autoload :MockRequest, "rack/mock"
autoload :MockResponse, "rack/mock"
Expand Down
2 changes: 0 additions & 2 deletions lib/rack/multipart.rb
@@ -1,5 +1,3 @@
require 'rack/utils'

module Rack
# A multipart form data parser, adapted from IOWA.
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rack/multipart/parser.rb
@@ -1,3 +1,5 @@
require 'rack/utils'

module Rack
module Multipart
class Parser
Expand Down
2 changes: 1 addition & 1 deletion lib/rack/request.rb
Expand Up @@ -303,7 +303,7 @@ def parse_query(qs)
end

def parse_multipart(env)
Utils::Multipart.parse_multipart(env)
Rack::Multipart.parse_multipart(env)
end
end
end
1 change: 1 addition & 0 deletions lib/rack/utils.rb
Expand Up @@ -3,6 +3,7 @@
require 'fileutils'
require 'set'
require 'tempfile'

require 'rack/multipart'

if RUBY_VERSION[/^\d+\.\d+/] == '1.8'
Expand Down

0 comments on commit 297f638

Please sign in to comment.