6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/tent-status/sprockets/environment.rb', line 6
def self.assets
return @assets if defined?(@assets)
puts 'SprocketsEnvironment loaded'
@assets = Sprockets::Environment.new do |env|
env.logger = Logger.new(STDOUT)
env.context_class.class_eval do
include SprocketsHelpers
end
end
@assets.register_engine('.slim', ::Slim::Template)
paths = %w{ javascripts stylesheets images }
paths.each do |path|
@assets.append_path(File.join(File.expand_path('../../../../', __FILE__), "assets/#{path}"))
end
@assets
end
|