Module: Ruby19Monkey

Defined in:
lib/ruby19_monkey.rb

Defined Under Namespace

Modules: ForceEncoding, StringBytesize, StringEach

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.install!Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ruby19_monkey.rb', line 6

def self.install!
  ActionView::Base.send(:include, ForceEncoding::OutputBuffer)
  ActionView::Template.send(:include, ForceEncoding::RenderResult)

  if Rails::VERSION::STRING >= "2.3.0"
    ActionController::Response.send(:include, StringBytesize::ResponseContentLength)
    ActionController::Dispatcher.send(:include, StringEach::RackAppCall)
    ::Rack::File.send(:include, StringEach::RackAppCall)
  else
    ActionController::AbstractResponse.send(:include, StringBytesize::ResponseContentLength)
  end
end