From a31aa5d8be12f98e97a78ac6c30ce62649ef1654 Mon Sep 17 00:00:00 2001 From: Karl Freeman Date: Sat, 28 Dec 2013 18:14:15 +0000 Subject: [PATCH] TrailingWhitespace 'cop' fix --- middleman-core/lib/middleman-core/cli/console.rb | 2 +- middleman-core/lib/middleman-core/cli/extension.rb | 4 ++-- middleman-core/lib/middleman-core/configuration.rb | 2 +- .../lib/middleman-core/core_extensions/data.rb | 2 +- .../lib/middleman-core/core_extensions/front_matter.rb | 4 ++-- .../lib/middleman-core/core_extensions/rendering.rb | 2 +- middleman-core/lib/middleman-core/renderers/sass.rb | 10 +++++----- middleman-core/lib/middleman-core/renderers/slim.rb | 2 +- middleman-core/lib/middleman-core/sitemap/queryable.rb | 4 ++-- .../lib/middleman-more/extensions/asset_host.rb | 2 +- .../middleman-more/extensions/automatic_alt_tags.rb | 2 +- .../lib/middleman-more/extensions/cache_buster.rb | 2 +- middleman-core/lib/middleman-more/templates/smacss.rb | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/middleman-core/lib/middleman-core/cli/console.rb b/middleman-core/lib/middleman-core/cli/console.rb index bfc08ea1..d647db2f 100644 --- a/middleman-core/lib/middleman-core/cli/console.rb +++ b/middleman-core/lib/middleman-core/cli/console.rb @@ -8,7 +8,7 @@ module Middleman::Cli check_unknown_options! namespace :console - + desc 'console [options]', 'Start an interactive console in the context of your Middleman application' method_option :environment, :aliases => '-e', diff --git a/middleman-core/lib/middleman-core/cli/extension.rb b/middleman-core/lib/middleman-core/cli/extension.rb index 6704297f..1b077f50 100644 --- a/middleman-core/lib/middleman-core/cli/extension.rb +++ b/middleman-core/lib/middleman-core/cli/extension.rb @@ -11,13 +11,13 @@ module Middleman::Cli # Required path for the new project to be generated argument :name, :type => :string - + # Template files are relative to this file # @return [String] def self.source_root File.join(File.dirname(__FILE__), '..', 'templates', 'extension') end - + desc 'extension [options]', 'Create Middleman extension scaffold NAME' # The extension task diff --git a/middleman-core/lib/middleman-core/configuration.rb b/middleman-core/lib/middleman-core/configuration.rb index ee5f2fbc..4340fa16 100644 --- a/middleman-core/lib/middleman-core/configuration.rb +++ b/middleman-core/lib/middleman-core/configuration.rb @@ -1,6 +1,6 @@ module Middleman 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. module Global def self.included(app) diff --git a/middleman-core/lib/middleman-core/core_extensions/data.rb b/middleman-core/lib/middleman-core/core_extensions/data.rb index ccd3db8d..4ae83b6e 100644 --- a/middleman-core/lib/middleman-core/core_extensions/data.rb +++ b/middleman-core/lib/middleman-core/core_extensions/data.rb @@ -181,7 +181,7 @@ module Middleman def respond_to?(method, include_private = false) super || has_key?(method) end - + # Make DataStore act like a hash. Return requested data, or # nil if data does not exist # diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index b5102625..87f0f9cb 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -48,7 +48,7 @@ module Middleman::CoreExtensions { :options => data, :page => ::Middleman::Util.recursively_enhance(fmdata).freeze } end end - + module ResourceInstanceMethods def ignored? 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) content = File.read(full_path) - + begin if content =~ /\A.*coding:/ lines = content.split(/\n/) diff --git a/middleman-core/lib/middleman-core/core_extensions/rendering.rb b/middleman-core/lib/middleman-core/core_extensions/rendering.rb index 489b88ac..e326d2e1 100644 --- a/middleman-core/lib/middleman-core/core_extensions/rendering.rb +++ b/middleman-core/lib/middleman-core/core_extensions/rendering.rb @@ -244,7 +244,7 @@ module Middleman # Store last engine for later (could be inside nested renders) context.current_engine, engine_was = engine, context.current_engine - + # Save current buffer for later @_out_buf, _buf_was = '', @_out_buf diff --git a/middleman-core/lib/middleman-core/renderers/sass.rb b/middleman-core/lib/middleman-core/renderers/sass.rb index 1145d55c..d8c33fd8 100644 --- a/middleman-core/lib/middleman-core/renderers/sass.rb +++ b/middleman-core/lib/middleman-core/renderers/sass.rb @@ -40,12 +40,12 @@ module Middleman def initialize(*args, &block) super - + if @options.has_key?(:context) @context = @options[:context] end end - + # Define the expected syntax for the template # @return [Symbol] def syntax @@ -73,15 +73,15 @@ module Middleman # @return [Hash] def sass_options more_opts = { :filename => eval_file, :line => line, :syntax => syntax } - + if @context.is_a?(::Middleman::Application) && file location_of_sass_file = @context.source_dir - + parts = basename.split('.') parts.pop more_opts[:css_filename] = File.join(location_of_sass_file, @context.config[:css_dir], parts.join('.')) end - + options.merge(more_opts) end end diff --git a/middleman-core/lib/middleman-core/renderers/slim.rb b/middleman-core/lib/middleman-core/renderers/slim.rb index 02ee1fed..55457f3b 100644 --- a/middleman-core/lib/middleman-core/renderers/slim.rb +++ b/middleman-core/lib/middleman-core/renderers/slim.rb @@ -23,7 +23,7 @@ module Middleman :generator => ::Temple::Generators::RailsOutputBuffer, :disable_escape => true ) - + app.after_configuration do context_hack = { :context => self diff --git a/middleman-core/lib/middleman-core/sitemap/queryable.rb b/middleman-core/lib/middleman-core/sitemap/queryable.rb index 5ee8a470..aab8be4e 100644 --- a/middleman-core/lib/middleman-core/sitemap/queryable.rb +++ b/middleman-core/lib/middleman-core/sitemap/queryable.rb @@ -2,7 +2,7 @@ require 'active_support/core_ext/object/inclusion' module Middleman module Sitemap - + # Code adapted from https://github.com/ralph/document_mapper/ module Queryable OPERATOR_MAPPING = { @@ -146,7 +146,7 @@ class Symbol end OPERATORS end - + unless method_defined?(:"<=>") def <=>(other) self.to_s <=> other.to_s diff --git a/middleman-core/lib/middleman-more/extensions/asset_host.rb b/middleman-core/lib/middleman-more/extensions/asset_host.rb index 68b0eeb8..89cc49d6 100644 --- a/middleman-core/lib/middleman-more/extensions/asset_host.rb +++ b/middleman-core/lib/middleman-more/extensions/asset_host.rb @@ -26,7 +26,7 @@ class Middleman::Extensions::AssetHost < ::Middleman::Extension app.config[:asset_host] || options[:host] end - helpers do + helpers do # Override default asset url helper to include asset hosts # # @param [String] path diff --git a/middleman-core/lib/middleman-more/extensions/automatic_alt_tags.rb b/middleman-core/lib/middleman-more/extensions/automatic_alt_tags.rb index af8e887d..95aaefee 100644 --- a/middleman-core/lib/middleman-more/extensions/automatic_alt_tags.rb +++ b/middleman-core/lib/middleman-more/extensions/automatic_alt_tags.rb @@ -8,7 +8,7 @@ class Middleman::Extensions::AutomaticAltTags < ::Middleman::Extension helpers do # Override default image_tag helper to automatically insert alt tag # containing image name. - + def image_tag(path) if !path.include?('://') params[:alt] ||= '' diff --git a/middleman-core/lib/middleman-more/extensions/cache_buster.rb b/middleman-core/lib/middleman-more/extensions/cache_buster.rb index 467ef747..02ded8af 100644 --- a/middleman-core/lib/middleman-more/extensions/cache_buster.rb +++ b/middleman-core/lib/middleman-more/extensions/cache_buster.rb @@ -18,7 +18,7 @@ class Middleman::Extensions::CacheBuster < ::Middleman::Extension end if app.respond_to?(:compass_config) end - helpers do + helpers do # asset_url override if we're using cache busting # @param [String] path # @param [String] prefix diff --git a/middleman-core/lib/middleman-more/templates/smacss.rb b/middleman-core/lib/middleman-more/templates/smacss.rb index b8b6d625..bfe5c914 100644 --- a/middleman-core/lib/middleman-more/templates/smacss.rb +++ b/middleman-core/lib/middleman-more/templates/smacss.rb @@ -10,7 +10,7 @@ class Middleman::Templates::Smacss < Middleman::Templates::Base class_option 'images_dir', :default => 'images', :desc => 'The path to the image files' - + # Template files are relative to this file # @return [String] def self.source_root