97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/roda/plugins/sprocket_assets.rb', line 97
def sprocket_assets
scope.class.configure :test, :development do
get self.class.sprocket_assets_regexp do |path|
opts = scope.sprocket_assets_opts
env_sprockets = scope.request.env.dup
env_sprockets['PATH_INFO'] = path
status, , response = opts[:sprockets].call env_sprockets
scope.response.status = status
scope.response..merge!
response.is_a?(Array) ? response.join('\n') : response.to_s
end
end
end
|