Great rubocop-ing
This commit is contained in:
parent
8f75f6516d
commit
04dc48f13d
78 changed files with 457 additions and 607 deletions
|
@ -32,7 +32,6 @@
|
|||
module Middleman
|
||||
module CoreExtensions
|
||||
module Extensions
|
||||
|
||||
# Register extension
|
||||
class << self
|
||||
# @private
|
||||
|
@ -51,7 +50,7 @@ module Middleman
|
|||
app.send :include, InstanceMethods
|
||||
app.delegate :configure, :to => :"self.class"
|
||||
end
|
||||
alias :included :registered
|
||||
alias_method :included, :registered
|
||||
end
|
||||
|
||||
# Class methods
|
||||
|
@ -75,7 +74,7 @@ module Middleman
|
|||
else
|
||||
extend extension
|
||||
if extension.respond_to?(:registered)
|
||||
if extension.method(:registered).arity === 1
|
||||
if extension.method(:registered).arity == 1
|
||||
extension.registered(self, &block)
|
||||
else
|
||||
extension.registered(self, options, &block)
|
||||
|
@ -157,7 +156,7 @@ module Middleman
|
|||
|
||||
# Check for and evaluate local configuration
|
||||
local_config = File.join(root, 'config.rb')
|
||||
if File.exists? local_config
|
||||
if File.exist? local_config
|
||||
logger.debug '== Reading: Local config'
|
||||
instance_eval File.read(local_config), local_config, 1
|
||||
end
|
||||
|
@ -172,16 +171,16 @@ module Middleman
|
|||
# polluted with paths from other test app directories that don't
|
||||
# exist anymore.
|
||||
if ENV['TEST']
|
||||
::I18n.load_path.delete_if {|path| path =~ %r{tmp/aruba}}
|
||||
::I18n.load_path.delete_if { |path| path =~ %r{tmp/aruba} }
|
||||
::I18n.reload!
|
||||
end
|
||||
|
||||
run_hook :after_configuration
|
||||
|
||||
logger.debug 'Loaded extensions:'
|
||||
self.extensions.each do |ext, klass|
|
||||
extensions.each do |ext, klass|
|
||||
if ext.is_a?(Hash)
|
||||
ext.each do |k,_|
|
||||
ext.each do |k, _|
|
||||
logger.debug "== Extension: #{k}"
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue