Skip to content

Commit

Permalink
Fix AccessModifierIndentation offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Sep 6, 2014
1 parent e5db457 commit 7385ceb
Show file tree
Hide file tree
Showing 52 changed files with 55 additions and 58 deletions.
3 changes: 0 additions & 3 deletions .rubocop.yml
Expand Up @@ -10,9 +10,6 @@ RegexpLiteral:
RescueException:
Enabled: false

AccessModifierIndentation:
Enabled: false



# ----- DISABLED (hard) -----
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/checksummer.rb
Expand Up @@ -19,7 +19,7 @@ def calc(obj)
digest.base64digest
end

private
private

def update(obj, digest)
digest.update(obj.class.to_s)
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/checksum_store.rb
Expand Up @@ -42,7 +42,7 @@ def unload
@checksums = {}
end

protected
protected

def data
@checksums
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/compiled_content_cache.rb
Expand Up @@ -47,7 +47,7 @@ def unload
@cache = {}
end

protected
protected

def data
@cache
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/compiler.rb
Expand Up @@ -295,7 +295,7 @@ def outdatedness_checker
end
memoize :outdatedness_checker

private
private

# @return [Array<Nanoc::Item>] The site’s items
def items
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/compiler_dsl.rb
Expand Up @@ -253,7 +253,7 @@ def include_rules(name)
@rules_collection.parse(filename)
end

private
private

# Converts the given identifier, which can contain the '*' or '+'
# wildcard characters, matching zero or more resp. one or more
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/dependency_tracker.rb
Expand Up @@ -172,7 +172,7 @@ def unload
@graph = Nanoc::DirectedGraph.new([nil] + @objects)
end

protected
protected

def data
{
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/item_rep_proxy.rb
Expand Up @@ -83,7 +83,7 @@ def proxy?
end
alias_method :is_proxy?, :proxy?

private
private

def set_assigns
@item_rep.assigns = @compiler.assigns_for(@item_rep)
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/outdatedness_checker.rb
Expand Up @@ -60,7 +60,7 @@ def outdatedness_reason_for(obj)
end
memoize :outdatedness_reason_for

private
private

# Checks whether the given object is outdated and therefore needs to be
# recompiled. This method does not take dependencies into account; use
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/compilation/rule_memory_store.rb
Expand Up @@ -36,7 +36,7 @@ def []=(obj, rule_memory)
@rule_memories[obj.reference] = rule_memory
end

protected
protected

# @see Nanoc::Store#data
def data
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/directed_graph.rb
Expand Up @@ -233,7 +233,7 @@ def remove_edge(from, to)
delete_edge(from, to)
end

private
private

# Invalidates cached data. This method should be called when the internal
# graph representation is changed.
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/notification_center.rb
Expand Up @@ -70,7 +70,7 @@ def remove(name, id)
@notifications[name].reject! { |i| i[:id] == id }
end

private
private

def initialize_if_necessary(name)
@notifications ||= {} # name => observers dictionary
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/plugin_registry.rb
Expand Up @@ -202,7 +202,7 @@ def named(name)
find(self, name)
end

protected
protected

def resolve(class_or_name, _klass)
if class_or_name.is_a?(String)
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/result_data/item_rep.rb
Expand Up @@ -465,7 +465,7 @@ def inspect
"<#{self.class} name=\"#{name}\" binary=#{self.binary?} raw_path=\"#{raw_path}\" item.identifier=\"#{item.identifier}\">"
end

private
private

def initialize_content
# Initialize content and filenames
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/source_data/data_source.rb
Expand Up @@ -234,7 +234,7 @@ def create_layout(_content, _attributes, _identifier, _params = {})
not_implemented('create_layout')
end

private
private

def not_implemented(name)
raise NotImplementedError.new(
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/source_data/item_array.rb
Expand Up @@ -48,7 +48,7 @@ def at(arg)
end
end

protected
protected

def item_with_identifier(identifier)
if self.frozen?
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/source_data/site.rb
Expand Up @@ -297,7 +297,7 @@ def self.config_filename_for_cwd
filenames.find { |f| File.file?(f) }
end

private
private

# Loads this site’s code and executes it.
def load_code_snippets
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/store.rb
Expand Up @@ -129,7 +129,7 @@ def no_data_found
def version_mismatch_detected
end

private
private

def pstore
@pstore ||= PStore.new(filename)
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli.rb
Expand Up @@ -82,7 +82,7 @@ def self.after_setup(&block)
add_after_setup_proc(block)
end

protected
protected

# Makes the commandline interface ready for use.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/cleaning_stream.rb
Expand Up @@ -119,7 +119,7 @@ def winsize=(arg)
@stream.winsize = (arg)
end

protected
protected

def _nanoc_clean(s)
@stream_cleaners.reduce(s) { |m, c| c.clean(m) }
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/command_runner.rb
Expand Up @@ -72,7 +72,7 @@ def debug?
Nanoc::CLI.debug?
end

protected
protected

# Sets the data source's VCS to the VCS with the given name. Does nothing
# when the site's data source does not support VCSes (i.e. does not
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/check.rb
Expand Up @@ -39,7 +39,7 @@ def run
end
end

protected
protected

def validate_options_and_arguments
if arguments.empty? && !options[:all] && !options[:deploy] && !options[:list]
Expand Down
8 changes: 4 additions & 4 deletions lib/nanoc/cli/commands/compile.rb
Expand Up @@ -96,7 +96,7 @@ def stop
teardown_diffs
end

protected
protected

def setup_diffs
@diff_lock = Mutex.new
Expand Down Expand Up @@ -184,7 +184,7 @@ def stop
super
end

protected
protected

def print_profiling_feedback
# Get max filter length
Expand Down Expand Up @@ -373,7 +373,7 @@ def stop
end
end

private
private

def log(level, action, path, duration)
Nanoc::CLI::Logger.instance.file(level, action, path, duration)
Expand Down Expand Up @@ -403,7 +403,7 @@ def run
puts "Site compiled in #{format('%.2f', time_after - time_before)}s."
end

protected
protected

def prune
if site.config[:prune][:auto_prune]
Expand Down
4 changes: 2 additions & 2 deletions lib/nanoc/cli/commands/create-site.rb
Expand Up @@ -15,7 +15,7 @@ class CreateSite < ::Nanoc::CLI::CommandRunner

class << self

protected
protected

# Converts the given array to YAML format
def array_to_yaml(array)
Expand Down Expand Up @@ -329,7 +329,7 @@ def run
puts "Created a blank nanoc site at '#{path}'. Enjoy!"
end

protected
protected

# Creates a configuration file and a output directory for this site, as
# well as a rakefile that loads the standard nanoc tasks.
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/prune.rb
Expand Up @@ -33,7 +33,7 @@ def run
end
end

protected
protected

def prune_config
site.config[:prune] || {}
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/shell.rb
Expand Up @@ -19,7 +19,7 @@ def run
Nanoc::Context.new(env).pry
end

protected
protected

def env
{
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/show-data.rb
Expand Up @@ -31,7 +31,7 @@ def run
print_layouts(layouts, compiler)
end

protected
protected

def sorted_with_prev(objects)
prev = nil
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/show-plugins.rb
Expand Up @@ -71,7 +71,7 @@ def run
end
end

private
private

PLUGIN_CLASS_ORDER = [
Nanoc::Filter,
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/show-rules.rb
Expand Up @@ -25,7 +25,7 @@ def run
site.layouts.each { |l| explain_layout(l) }
end

protected
protected

def explain_item(item)
puts "#{@c.c('Item ' + item.identifier, :bold, :yellow)}:"
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/view.rb
Expand Up @@ -57,7 +57,7 @@ def run
handler.run(app, options_for_rack)
end

protected
protected

def load_adsf
# Load adsf
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/watch.rb
Expand Up @@ -114,7 +114,7 @@ def notify(message)
end
end

protected
protected

def nix_tool_present?(tool)
!`which #{tool}`.empty?
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/cli/error_handler.rb
Expand Up @@ -157,7 +157,7 @@ def write_verbose_error(error, stream)
write_load_paths(stream, :verbose => true)
end

protected
protected

# @return [Boolean] true if debug output is enabled, false if not
#
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/data_sources/filesystem.rb
Expand Up @@ -60,7 +60,7 @@ def create_layout(content, attributes, identifier, params = {})
create_object(layouts_dir_name, content, attributes, identifier, params)
end

protected
protected

# Creates a new object (item or layout) on disk in dir_name according to
# the given identifier. The file will have its attributes taken from the
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/data_sources/filesystem_unified.rb
Expand Up @@ -71,7 +71,7 @@ class FilesystemUnified < Nanoc::DataSource

include Nanoc::DataSources::Filesystem

private
private

# See {Nanoc::DataSources::Filesystem#create_object}.
def create_object(dir_name, content, attributes, identifier, params = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/data_sources/filesystem_verbose.rb
Expand Up @@ -43,7 +43,7 @@ class FilesystemVerbose < Nanoc::DataSource

include Nanoc::DataSources::Filesystem

private
private

# See {Nanoc::DataSources::Filesystem#create_object}.
def create_object(dir_name, content, attributes, identifier, params = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/data_sources/static.rb
Expand Up @@ -53,7 +53,7 @@ def items
end
end

protected
protected

def all_files_in(dir_name)
Nanoc::Extra::FilesystemTools.all_files_in(dir_name)
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/extra/auto_compiler.rb
Expand Up @@ -79,7 +79,7 @@ def call(env)
raise e
end

private
private

def build_site
@site = Nanoc::Site.new(@site_path)
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/extra/checking/checks/internal_links.rb
Expand Up @@ -28,7 +28,7 @@ def run
end
end

protected
protected

def valid?(href, origin)
# Skip hrefs that point to self
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/extra/checking/checks/stale.rb
Expand Up @@ -19,7 +19,7 @@ def run
end
end

protected
protected

def pruner
exclude_config = @site.config.fetch(:prune, {}).fetch(:exclude, [])
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/extra/checking/runner.rb
Expand Up @@ -66,7 +66,7 @@ def run_specific(check_class_names)
run_check_classes(check_classes_named(check_class_names))
end

protected
protected

def load_dsl_if_available
@dsl_loaded ||= false
Expand Down

0 comments on commit 7385ceb

Please sign in to comment.