Fix yard options
This commit is contained in:
parent
7ad5b2bdef
commit
34d399f580
|
@ -5,5 +5,6 @@ middleman-*/lib/**/*.rb
|
||||||
--exclude middleman-core/lib/middleman-core/templates/html5/
|
--exclude middleman-core/lib/middleman-core/templates/html5/
|
||||||
--exclude middleman-core/lib/middleman-core/templates/mobile/
|
--exclude middleman-core/lib/middleman-core/templates/mobile/
|
||||||
--exclude middleman-core/lib/middleman-core/templates/shared/
|
--exclude middleman-core/lib/middleman-core/templates/shared/
|
||||||
|
--exclude middleman-core/lib/middleman-core/templates/extension/
|
||||||
--no-private
|
--no-private
|
||||||
--hide-void-return
|
--hide-void-return
|
10
middleman-core/.yardopts
Normal file
10
middleman-core/.yardopts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
lib/**/*.rb
|
||||||
|
--exclude lib/vendored-middleman-deps/
|
||||||
|
--exclude lib/middleman-core/step_definitions
|
||||||
|
--exclude lib/middleman-core/templates/default/
|
||||||
|
--exclude lib/middleman-core/templates/html5/
|
||||||
|
--exclude lib/middleman-core/templates/mobile/
|
||||||
|
--exclude lib/middleman-core/templates/shared/
|
||||||
|
--exclude lib/middleman-core/templates/extension/
|
||||||
|
--no-private
|
||||||
|
--hide-void-return
|
|
@ -287,8 +287,6 @@ module Middleman
|
||||||
end
|
end
|
||||||
|
|
||||||
# Immediately send static file
|
# Immediately send static file
|
||||||
#
|
|
||||||
# @param [String] path File to send
|
|
||||||
def send_file(resource, env)
|
def send_file(resource, env)
|
||||||
file = ::Rack::File.new nil
|
file = ::Rack::File.new nil
|
||||||
file.path = resource.source_file
|
file.path = resource.source_file
|
||||||
|
|
|
@ -113,12 +113,20 @@ module Middleman
|
||||||
config.define_setting(key, default, description)
|
config.define_setting(key, default, description)
|
||||||
end
|
end
|
||||||
|
|
||||||
def helpers(&block)
|
# Add helpers to the global Middleman application.
|
||||||
|
# This accepts either a list of modules to add on behalf
|
||||||
|
# of this extension, or a block whose contents will all
|
||||||
|
# be used as helpers in a new module.
|
||||||
|
def helpers(*m, &block)
|
||||||
self.defined_helpers ||= []
|
self.defined_helpers ||= []
|
||||||
|
|
||||||
|
if block
|
||||||
m = Module.new
|
m = Module.new
|
||||||
m.module_eval(&block)
|
m.module_eval(&block)
|
||||||
self.defined_helpers << m
|
mod = [m]
|
||||||
|
end
|
||||||
|
|
||||||
|
self.defined_helpers += m
|
||||||
end
|
end
|
||||||
|
|
||||||
def extension_name
|
def extension_name
|
||||||
|
|
|
@ -38,8 +38,7 @@ module Middleman
|
||||||
|
|
||||||
# Setup a redirect from a path to a target
|
# Setup a redirect from a path to a target
|
||||||
# @param [String] path
|
# @param [String] path
|
||||||
# @param [Hash] The :to value gives a target path
|
# @param [Hash] opts The :to value gives a target path
|
||||||
# @return [void]
|
|
||||||
def create_redirect(path, opts={}, &block)
|
def create_redirect(path, opts={}, &block)
|
||||||
if block_given?
|
if block_given?
|
||||||
opts[:template] = block
|
opts[:template] = block
|
||||||
|
|
|
@ -38,9 +38,8 @@ module Middleman
|
||||||
|
|
||||||
# Setup a proxy from a path to a target
|
# Setup a proxy from a path to a target
|
||||||
# @param [String] path
|
# @param [String] path
|
||||||
# @param [Hash] The :path value gives a request path if it
|
# @param [Hash] opts The :path value gives a request path if it
|
||||||
# differs from the output path
|
# differs from the output path
|
||||||
# @return [void]
|
|
||||||
def create_endpoint(path, opts={}, &block)
|
def create_endpoint(path, opts={}, &block)
|
||||||
endpoint = {
|
endpoint = {
|
||||||
:request_path => path
|
:request_path => path
|
||||||
|
|
Loading…
Reference in a new issue