Put back request_path, I get it now
This commit is contained in:
parent
b0ea4e7608
commit
2beb774eb9
3 changed files with 10 additions and 4 deletions
|
@ -254,7 +254,7 @@ module Middleman::Cli
|
|||
FileUtils.cp(resource.source_file, output_file)
|
||||
else
|
||||
begin
|
||||
response = @rack.get(URI.escape(resource.destination_path))
|
||||
response = @rack.get(URI.escape(resource.request_path))
|
||||
|
||||
if response.status == 200
|
||||
base.create_file(output_file, binary_encode(response.body))
|
||||
|
|
|
@ -49,12 +49,13 @@ module Middleman
|
|||
class EndpointResource < ::Middleman::Sitemap::Resource
|
||||
attr_accessor :output
|
||||
|
||||
def initialize(store, path, source_file)
|
||||
@request_path = ::Middleman::Util.normalize_path(source_file)
|
||||
|
||||
def initialize(store, path, request_path)
|
||||
super(store, path)
|
||||
@request_path = ::Middleman::Util.normalize_path(request_path)
|
||||
end
|
||||
|
||||
attr_reader :request_path
|
||||
|
||||
def template?
|
||||
true
|
||||
end
|
||||
|
|
|
@ -20,6 +20,11 @@ module Middleman
|
|||
# @return [String]
|
||||
attr_accessor :destination_path
|
||||
|
||||
# The path to use when requesting this resource. Normally it's
|
||||
# the same as {#destination_path} but it can be overridden in subclasses.
|
||||
# @return [String]
|
||||
alias_method :request_path, :destination_path
|
||||
|
||||
# Set the on-disk source file for this resource
|
||||
# @return [String]
|
||||
def source_file
|
||||
|
|
Loading…
Reference in a new issue