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