Module: Middleman::CoreExtensions::Request

Defined in:
lib/middleman-core/core_extensions/request.rb

Overview

Base helper to manipulate asset paths

Defined Under Namespace

Modules: ClassMethods, CompatibleClassMethods, InstanceMethods, ServerMethods

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object Also known as: included



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/middleman-core/core_extensions/request.rb', line 15

def registered(app)

  # CSSPIE HTC File
  ::Rack::Mime::MIME_TYPES['.htc'] = 'text/x-component'

  # Let's serve all HTML as UTF-8
  ::Rack::Mime::MIME_TYPES['.html'] = 'text/html; charset=utf-8'
  ::Rack::Mime::MIME_TYPES['.htm'] = 'text/html; charset=utf-8'

  app.extend ClassMethods
  app.extend ServerMethods

  Middleman.extend CompatibleClassMethods

  # Include instance methods
  app.send :include, InstanceMethods
end