enabled: true
eslint:
enabled: true
- channel: eslint-5
+ channel: eslint-6
rubocop:
enabled: true
- channel: rubocop-0-71
+ channel: rubocop-0-76
sass-lint:
enabled: true
exclude_patterns:
Rails:
Enabled: true
+Rails/EnumHash:
+ Enabled: false
+
Rails/HasAndBelongsToMany:
Enabled: false
Style/DoubleNegation:
Enabled: true
+Style/FormatStringToken:
+ Enabled: false
+
Style/FrozenStringLiteralComment:
Enabled: true
def serializable_hash(options = nil)
named_contexts = {}
context_extensions = {}
+
options = serialization_options(options)
serialized_hash = serializer.serializable_hash(options.merge(named_contexts: named_contexts, context_extensions: context_extensions))
serialized_hash = serialized_hash.select { |k, _| options[:fields].include?(k) } if options[:fields]
words = text.scan(RELIABLE_CHARACTERS_RE)
if words.present?
- words.reduce(0) { |acc, elem| acc + elem.size }.to_f / text.size.to_f > 0.3
+ words.reduce(0) { |acc, elem| acc + elem.size }.to_f / text.size > 0.3
else
false
end
width: width,
height: height,
size: "#{width}x#{height}",
- aspect: width.to_f / height.to_f,
+ aspect: width.to_f / height,
}
end
min_side = [@current_geometry.width, @current_geometry.height].min.to_i
options[:geometry] = "#{min_side}x#{min_side}#" if @target_geometry.square? && min_side < @target_geometry.width
elsif options[:pixels]
- width = Math.sqrt(options[:pixels] * (@current_geometry.width.to_f / @current_geometry.height.to_f)).round.to_i
- height = Math.sqrt(options[:pixels] * (@current_geometry.height.to_f / @current_geometry.width.to_f)).round.to_i
+ width = Math.sqrt(options[:pixels] * (@current_geometry.width.to_f / @current_geometry.height)).round.to_i
+ height = Math.sqrt(options[:pixels] * (@current_geometry.height.to_f / @current_geometry.width)).round.to_i
options[:geometry] = "#{width}x#{height}>"
end