TrailingWhitespace 'cop' fix
This commit is contained in:
parent
bf327c17b7
commit
a31aa5d8be
13 changed files with 20 additions and 20 deletions
|
@ -8,7 +8,7 @@ module Middleman::Cli
|
||||||
check_unknown_options!
|
check_unknown_options!
|
||||||
|
|
||||||
namespace :console
|
namespace :console
|
||||||
|
|
||||||
desc 'console [options]', 'Start an interactive console in the context of your Middleman application'
|
desc 'console [options]', 'Start an interactive console in the context of your Middleman application'
|
||||||
method_option :environment,
|
method_option :environment,
|
||||||
:aliases => '-e',
|
:aliases => '-e',
|
||||||
|
|
|
@ -11,13 +11,13 @@ module Middleman::Cli
|
||||||
|
|
||||||
# Required path for the new project to be generated
|
# Required path for the new project to be generated
|
||||||
argument :name, :type => :string
|
argument :name, :type => :string
|
||||||
|
|
||||||
# Template files are relative to this file
|
# Template files are relative to this file
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def self.source_root
|
def self.source_root
|
||||||
File.join(File.dirname(__FILE__), '..', 'templates', 'extension')
|
File.join(File.dirname(__FILE__), '..', 'templates', 'extension')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'extension [options]', 'Create Middleman extension scaffold NAME'
|
desc 'extension [options]', 'Create Middleman extension scaffold NAME'
|
||||||
|
|
||||||
# The extension task
|
# The extension task
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module Middleman
|
module Middleman
|
||||||
module Configuration
|
module Configuration
|
||||||
# Access to a global configuration manager for the whole Middleman project,
|
# Access to a global configuration manager for the whole Middleman project,
|
||||||
# plus backwards compatibility mechanisms for older Middleman projects.
|
# plus backwards compatibility mechanisms for older Middleman projects.
|
||||||
module Global
|
module Global
|
||||||
def self.included(app)
|
def self.included(app)
|
||||||
|
|
|
@ -181,7 +181,7 @@ module Middleman
|
||||||
def respond_to?(method, include_private = false)
|
def respond_to?(method, include_private = false)
|
||||||
super || has_key?(method)
|
super || has_key?(method)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Make DataStore act like a hash. Return requested data, or
|
# Make DataStore act like a hash. Return requested data, or
|
||||||
# nil if data does not exist
|
# nil if data does not exist
|
||||||
#
|
#
|
||||||
|
|
|
@ -48,7 +48,7 @@ module Middleman::CoreExtensions
|
||||||
{ :options => data, :page => ::Middleman::Util.recursively_enhance(fmdata).freeze }
|
{ :options => data, :page => ::Middleman::Util.recursively_enhance(fmdata).freeze }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
module ResourceInstanceMethods
|
module ResourceInstanceMethods
|
||||||
def ignored?
|
def ignored?
|
||||||
if !proxy? && raw_data[:ignored] == true
|
if !proxy? && raw_data[:ignored] == true
|
||||||
|
@ -178,7 +178,7 @@ module Middleman::CoreExtensions
|
||||||
return [data, nil] if !app.files.exists?(full_path) || ::Middleman::Util.binary?(full_path)
|
return [data, nil] if !app.files.exists?(full_path) || ::Middleman::Util.binary?(full_path)
|
||||||
|
|
||||||
content = File.read(full_path)
|
content = File.read(full_path)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if content =~ /\A.*coding:/
|
if content =~ /\A.*coding:/
|
||||||
lines = content.split(/\n/)
|
lines = content.split(/\n/)
|
||||||
|
|
|
@ -244,7 +244,7 @@ module Middleman
|
||||||
|
|
||||||
# Store last engine for later (could be inside nested renders)
|
# Store last engine for later (could be inside nested renders)
|
||||||
context.current_engine, engine_was = engine, context.current_engine
|
context.current_engine, engine_was = engine, context.current_engine
|
||||||
|
|
||||||
# Save current buffer for later
|
# Save current buffer for later
|
||||||
@_out_buf, _buf_was = '', @_out_buf
|
@_out_buf, _buf_was = '', @_out_buf
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,12 @@ module Middleman
|
||||||
|
|
||||||
def initialize(*args, &block)
|
def initialize(*args, &block)
|
||||||
super
|
super
|
||||||
|
|
||||||
if @options.has_key?(:context)
|
if @options.has_key?(:context)
|
||||||
@context = @options[:context]
|
@context = @options[:context]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Define the expected syntax for the template
|
# Define the expected syntax for the template
|
||||||
# @return [Symbol]
|
# @return [Symbol]
|
||||||
def syntax
|
def syntax
|
||||||
|
@ -73,15 +73,15 @@ module Middleman
|
||||||
# @return [Hash]
|
# @return [Hash]
|
||||||
def sass_options
|
def sass_options
|
||||||
more_opts = { :filename => eval_file, :line => line, :syntax => syntax }
|
more_opts = { :filename => eval_file, :line => line, :syntax => syntax }
|
||||||
|
|
||||||
if @context.is_a?(::Middleman::Application) && file
|
if @context.is_a?(::Middleman::Application) && file
|
||||||
location_of_sass_file = @context.source_dir
|
location_of_sass_file = @context.source_dir
|
||||||
|
|
||||||
parts = basename.split('.')
|
parts = basename.split('.')
|
||||||
parts.pop
|
parts.pop
|
||||||
more_opts[:css_filename] = File.join(location_of_sass_file, @context.config[:css_dir], parts.join('.'))
|
more_opts[:css_filename] = File.join(location_of_sass_file, @context.config[:css_dir], parts.join('.'))
|
||||||
end
|
end
|
||||||
|
|
||||||
options.merge(more_opts)
|
options.merge(more_opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ module Middleman
|
||||||
:generator => ::Temple::Generators::RailsOutputBuffer,
|
:generator => ::Temple::Generators::RailsOutputBuffer,
|
||||||
:disable_escape => true
|
:disable_escape => true
|
||||||
)
|
)
|
||||||
|
|
||||||
app.after_configuration do
|
app.after_configuration do
|
||||||
context_hack = {
|
context_hack = {
|
||||||
:context => self
|
:context => self
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'active_support/core_ext/object/inclusion'
|
||||||
|
|
||||||
module Middleman
|
module Middleman
|
||||||
module Sitemap
|
module Sitemap
|
||||||
|
|
||||||
# Code adapted from https://github.com/ralph/document_mapper/
|
# Code adapted from https://github.com/ralph/document_mapper/
|
||||||
module Queryable
|
module Queryable
|
||||||
OPERATOR_MAPPING = {
|
OPERATOR_MAPPING = {
|
||||||
|
@ -146,7 +146,7 @@ class Symbol
|
||||||
end
|
end
|
||||||
OPERATORS
|
OPERATORS
|
||||||
end
|
end
|
||||||
|
|
||||||
unless method_defined?(:"<=>")
|
unless method_defined?(:"<=>")
|
||||||
def <=>(other)
|
def <=>(other)
|
||||||
self.to_s <=> other.to_s
|
self.to_s <=> other.to_s
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Middleman::Extensions::AssetHost < ::Middleman::Extension
|
||||||
app.config[:asset_host] || options[:host]
|
app.config[:asset_host] || options[:host]
|
||||||
end
|
end
|
||||||
|
|
||||||
helpers do
|
helpers do
|
||||||
# Override default asset url helper to include asset hosts
|
# Override default asset url helper to include asset hosts
|
||||||
#
|
#
|
||||||
# @param [String] path
|
# @param [String] path
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Middleman::Extensions::AutomaticAltTags < ::Middleman::Extension
|
||||||
helpers do
|
helpers do
|
||||||
# Override default image_tag helper to automatically insert alt tag
|
# Override default image_tag helper to automatically insert alt tag
|
||||||
# containing image name.
|
# containing image name.
|
||||||
|
|
||||||
def image_tag(path)
|
def image_tag(path)
|
||||||
if !path.include?('://')
|
if !path.include?('://')
|
||||||
params[:alt] ||= ''
|
params[:alt] ||= ''
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Middleman::Extensions::CacheBuster < ::Middleman::Extension
|
||||||
end if app.respond_to?(:compass_config)
|
end if app.respond_to?(:compass_config)
|
||||||
end
|
end
|
||||||
|
|
||||||
helpers do
|
helpers do
|
||||||
# asset_url override if we're using cache busting
|
# asset_url override if we're using cache busting
|
||||||
# @param [String] path
|
# @param [String] path
|
||||||
# @param [String] prefix
|
# @param [String] prefix
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Middleman::Templates::Smacss < Middleman::Templates::Base
|
||||||
class_option 'images_dir',
|
class_option 'images_dir',
|
||||||
:default => 'images',
|
:default => 'images',
|
||||||
:desc => 'The path to the image files'
|
:desc => 'The path to the image files'
|
||||||
|
|
||||||
# Template files are relative to this file
|
# Template files are relative to this file
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def self.source_root
|
def self.source_root
|
||||||
|
|
Loading…
Add table
Reference in a new issue