fix rubocop offenses for rubocop 0.40.0
This commit is contained in:
parent
e6f36a8fe6
commit
458265b78f
3 changed files with 33 additions and 27 deletions
|
|
@ -144,7 +144,9 @@ module DiasporaFederation
|
||||||
# @param [Symbol] alias_name alias name
|
# @param [Symbol] alias_name alias name
|
||||||
def define_alias(name, alias_name)
|
def define_alias(name, alias_name)
|
||||||
class_prop_aliases[alias_name] = name
|
class_prop_aliases[alias_name] = name
|
||||||
|
# rubocop:disable Style/Alias
|
||||||
instance_eval { alias_method alias_name, name }
|
instance_eval { alias_method alias_name, name }
|
||||||
|
# rubocop:enable Style/Alias
|
||||||
end
|
end
|
||||||
|
|
||||||
# Raised, if the name is of an unexpected type
|
# Raised, if the name is of an unexpected type
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ describe Validation::Rule::Guid do
|
||||||
|
|
||||||
it "validates a long string with random characters and [-_@.:] (redmatrix)" do
|
it "validates a long string with random characters and [-_@.:] (redmatrix)" do
|
||||||
validator = Validation::Validator.new(
|
validator = Validation::Validator.new(
|
||||||
OpenStruct.new(guid: "1234567890ABCDefgh_ijkl-mnopqrSTUVwxyz@example.com:3000"))
|
OpenStruct.new(guid: "1234567890ABCDefgh_ijkl-mnopqrSTUVwxyz@example.com:3000")
|
||||||
|
)
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ Logging::Rails.configure do |config|
|
||||||
# to the pattern layout. Color schemes should only be used with appenders
|
# to the pattern layout. Color schemes should only be used with appenders
|
||||||
# that write to STDOUT or STDERR; inserting terminal color codes into a file
|
# that write to STDOUT or STDERR; inserting terminal color codes into a file
|
||||||
# is generally considered bad form.
|
# is generally considered bad form.
|
||||||
Logging.color_scheme("bright",
|
Logging.color_scheme(
|
||||||
|
"bright",
|
||||||
levels: {
|
levels: {
|
||||||
info: :green,
|
info: :green,
|
||||||
warn: :yellow,
|
warn: :yellow,
|
||||||
|
|
@ -28,7 +29,8 @@ Logging::Rails.configure do |config|
|
||||||
# Configure an appender that will write log events to STDOUT. A colorized
|
# Configure an appender that will write log events to STDOUT. A colorized
|
||||||
# pattern layout is used to format the log events into strings before
|
# pattern layout is used to format the log events into strings before
|
||||||
# writing.
|
# writing.
|
||||||
Logging.appenders.stdout("stdout",
|
Logging.appenders.stdout(
|
||||||
|
"stdout",
|
||||||
auto_flushing: true,
|
auto_flushing: true,
|
||||||
layout: Logging.layouts.pattern(
|
layout: Logging.layouts.pattern(
|
||||||
pattern: pattern,
|
pattern: pattern,
|
||||||
|
|
@ -40,7 +42,8 @@ Logging::Rails.configure do |config|
|
||||||
# be rolled on a daily basis, and the past 7 rolled files will be kept.
|
# be rolled on a daily basis, and the past 7 rolled files will be kept.
|
||||||
# Older files will be deleted. The default pattern layout is used when
|
# Older files will be deleted. The default pattern layout is used when
|
||||||
# formatting log events into strings.
|
# formatting log events into strings.
|
||||||
Logging.appenders.rolling_file("file",
|
Logging.appenders.rolling_file(
|
||||||
|
"file",
|
||||||
filename: config.paths["log"].first,
|
filename: config.paths["log"].first,
|
||||||
keep: 7,
|
keep: 7,
|
||||||
age: "daily",
|
age: "daily",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue