upr.git  about / heads / tags
Upload Progress for Rack
blob 0d08f1ab842cb5963a4627de9034a2498eda86bf 918 bytes (raw)
$ git show HEAD:lib/upr.rb	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
# -*- encoding: binary -*-

require 'moneta'
require 'upr/status'
module Upr

  # Upr version number
  VERSION = '0.3.0'

  autoload :Monitor, 'upr/monitor'
  autoload :Params, 'upr/params'
  autoload :InputWrapper, 'upr/input_wrapper'
  autoload :JSON, 'upr/json'

  # Initializes a new instance of Upr::InputWrapper.  Usage in config.ru:
  #
  #   use Upr, :path_info => %w(/upload),
  #            :drb => "druby://192.168.0.1:666",
  #            :frequency => 1
  #
  # This middleware MUST be be loaded before any parameter parsers
  # like ActionController::ParamsParser in Rails.
  #
  # For use in RAILS_ROOT/config/environment.rb, the following
  # works insdie the Rails::Initializer.run block:
  #
  #   config.middleware.insert_before('ActionController::ParamsParser',
  #       'Upr', :path_info => '/', :drb => "druby://192.168.0.1:666")
  #
  def self.new(*args)
    InputWrapper.new(*args)
  end

end

git clone https://yhbt.net/upr.git