127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
# File 'lib/roda/plugins/sprockets.rb', line 127
def sprockets
get self.roda_class.sprockets_regexp do |path|
options = scope.sprockets_options
env_sprockets = scope.request.env.dup
env_sprockets['PATH_INFO'] = path
status, , response = options[:sprockets].call env_sprockets
scope.response.status = status
scope.response..merge!
case response
when nil, []
nil
when Array
response.join
else
response.to_s
end
end
end
|