Enable Rubocop accessor grouping, fix existing offenses (#8293)
Merge pull request 8293
This commit is contained in:
parent
fcd56a5680
commit
94fcfdd787
|
@ -273,7 +273,7 @@ Security/YAMLLoad:
|
|||
Style/AccessModifierDeclarations:
|
||||
Enabled: false
|
||||
Style/AccessorGrouping:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
Style/Alias:
|
||||
EnforcedStyle: prefer_alias_method
|
||||
Style/AndOr:
|
||||
|
|
|
@ -11,14 +11,10 @@ module Jekyll
|
|||
@disk_cache_enabled = true
|
||||
|
||||
class << self
|
||||
# class-wide cache location
|
||||
attr_accessor :cache_dir
|
||||
attr_accessor :cache_dir # class-wide cache location
|
||||
|
||||
# class-wide directive to write cache to disk
|
||||
attr_reader :disk_cache_enabled
|
||||
|
||||
# class-wide base cache reader
|
||||
attr_reader :base_cache
|
||||
attr_reader :base_cache, # class-wide base cache reader
|
||||
:disk_cache_enabled # class-wide directive to write cache to disk
|
||||
|
||||
# Disable Marshaling cached items to disk
|
||||
def disable_disk_cache!
|
||||
|
|
|
@ -8,9 +8,7 @@ module Jekyll
|
|||
module Commands
|
||||
class Serve
|
||||
class LiveReloadReactor
|
||||
attr_reader :started_event
|
||||
attr_reader :stopped_event
|
||||
attr_reader :thread
|
||||
attr_reader :started_event, :stopped_event, :thread
|
||||
|
||||
def initialize
|
||||
@websockets = []
|
||||
|
|
|
@ -5,8 +5,8 @@ module Jekyll
|
|||
class UnifiedPayloadDrop < Drop
|
||||
mutable true
|
||||
|
||||
attr_accessor :page, :layout, :content, :paginator
|
||||
attr_accessor :highlighter_prefix, :highlighter_suffix
|
||||
attr_accessor :content, :page, :layout, :paginator,
|
||||
:highlighter_prefix, :highlighter_suffix
|
||||
|
||||
def jekyll
|
||||
JekyllDrop.global
|
||||
|
|
|
@ -4,8 +4,7 @@ module Jekyll
|
|||
class Excerpt
|
||||
extend Forwardable
|
||||
|
||||
attr_accessor :doc
|
||||
attr_accessor :content, :ext
|
||||
attr_accessor :content, :doc, :ext
|
||||
attr_writer :output
|
||||
|
||||
def_delegators :@doc,
|
||||
|
|
|
@ -4,26 +4,14 @@ module Jekyll
|
|||
class Layout
|
||||
include Convertible
|
||||
|
||||
# Gets the Site object.
|
||||
attr_reader :site
|
||||
attr_accessor :content, # content of layout
|
||||
:data, # the Hash that holds the metadata for this layout
|
||||
:ext # extension of layout
|
||||
|
||||
# Gets the name of this layout.
|
||||
attr_reader :name
|
||||
|
||||
# Gets the path to this layout.
|
||||
attr_reader :path
|
||||
|
||||
# Gets the path to this layout relative to its base
|
||||
attr_reader :relative_path
|
||||
|
||||
# Gets/Sets the extension of this layout.
|
||||
attr_accessor :ext
|
||||
|
||||
# Gets/Sets the Hash that holds the metadata for this layout.
|
||||
attr_accessor :data
|
||||
|
||||
# Gets/Sets the content of this layout.
|
||||
attr_accessor :content
|
||||
attr_reader :name, # name of layout
|
||||
:path, # path to layout
|
||||
:site, # the Site object
|
||||
:relative_path # path to layout relative to its base
|
||||
|
||||
# Initialize a new Layout.
|
||||
#
|
||||
|
|
|
@ -5,9 +5,7 @@ module Jekyll
|
|||
include Convertible
|
||||
|
||||
attr_writer :dir
|
||||
attr_accessor :site, :pager
|
||||
attr_accessor :name, :ext, :basename
|
||||
attr_accessor :data, :content, :output
|
||||
attr_accessor :basename, :content, :data, :ext, :name, :output, :pager, :site
|
||||
|
||||
alias_method :extname, :ext
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
module Jekyll
|
||||
class Site
|
||||
attr_reader :source, :dest, :cache_dir, :config
|
||||
attr_accessor :layouts, :pages, :static_files, :drafts, :inclusions,
|
||||
:exclude, :include, :lsi, :highlighter, :permalink_style,
|
||||
:time, :future, :unpublished, :safe, :plugins, :limit_posts,
|
||||
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts,
|
||||
:gems, :plugin_manager, :theme
|
||||
attr_accessor :baseurl, :converters, :data, :drafts, :exclude,
|
||||
:file_read_opts, :future, :gems, :generators, :highlighter,
|
||||
:include, :inclusions, :keep_files, :layouts, :limit_posts,
|
||||
:lsi, :pages, :permalink_style, :plugin_manager, :plugins,
|
||||
:reader, :safe, :show_drafts, :static_files, :theme, :time,
|
||||
:unpublished
|
||||
|
||||
attr_accessor :converters, :generators, :reader
|
||||
attr_reader :regenerator, :liquid_renderer, :includes_load_paths, :filter_cache, :profiler
|
||||
attr_reader :cache_dir, :config, :dest, :filter_cache, :includes_load_paths,
|
||||
:liquid_renderer, :profiler, :regenerator, :source
|
||||
|
||||
# Public: Initialize a new Site.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue