raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
51be3eba3cd3207bb0a722edd5b14d26a51aeeb5 blob 1093 bytes (raw)

 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
35
36
37
38
39
40
41
 
# -*- encoding: binary -*-
# :stopdoc:
# This class is used by Raindrops::Middleware to proxy application
# response bodies.  There should be no need to use it directly.
class Raindrops::Middleware::Proxy
  def initialize(body, stats)
    @body, @stats = body, stats
  end

  # yield to the Rack server here for writing
  def each
    @body.each { |x| yield x }
  end

  # the Rack server should call this after #each (usually ensure-d)
  def close
    @stats.decr_writing
    @body.close if @body.respond_to?(:close)
  end

  # Some Rack servers can optimize response processing if it responds
  # to +to_path+ via the sendfile(2) system call, we proxy +to_path+
  # to the underlying body if possible.
  def to_path
    @body.to_path
  end

  # Rack servers use +respond_to?+ to check for the presence of +close+
  # and +to_path+ methods.
  def respond_to?(m)
    m = m.to_sym
    :close == m || @body.respond_to?(m)
  end

  # Rack::BodyProxy objects use +method_missing+ to delegate methods
  # to their bodies
  def method_missing(*args, &block)
    @body.send(*args, &block)
  end

end
debug log:

solving 51be3eb ...
found 51be3eb in https://bogomips.org/raindrops.git

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git