Module: Firehose::Assets::Sprockets

Defined in:
lib/firehose/assets.rb

Overview

Integrate Firehose ./lib/assets files into a sprocket-enabled environment.

Class Method Summary collapse

Class Method Details

.auto_detectObject

Try to automatically configure Sprockets if its detected in the project.



17
18
19
20
21
# File 'lib/firehose/assets.rb', line 17

def self.auto_detect
  if defined? ::Sprockets and ::Sprockets.respond_to? :append_path
    Firehose::Assets::Sprockets.configure ::Sprockets
  end
end

.configure(env) ⇒ Object

Drop flash and javascript paths to Firehose assets into a sprockets environment.



11
12
13
14
# File 'lib/firehose/assets.rb', line 11

def self.configure(env)
  env.append_path Firehose::Assets.path('javascripts')
  env
end

.manifestObject



23
24
25
26
27
# File 'lib/firehose/assets.rb', line 23

def self.manifest
  paths = []
  paths << File.basename(Firehose::Assets.path('/javascripts/firehose/firehose.js.coffee'), '.coffee')
  paths
end