Showing 1,009 of 1,009 total issues
Line is too long. [90/80] Open
Open
# * +storage+: Chooses the storage backend where the files will be stored. The current
- Exclude checks
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/missing_attachment_styles'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/helpers'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Freeze mutable objects assigned to constants. Open
Open
SENSIBLE_DEFAULT = "application/octet-stream"
- Read upRead up
- Exclude checks
This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).
Example:
# bad
CONST = [1, 2, 3]
# good
CONST = [1, 2, 3].freeze
Line is too long. [86/80] Open
Open
# (http://www.imagemagick.org/script/command-line-options.php#resize). Paperclip
- Exclude checks
Line is too long. [91/80] Open
Open
# to all of the thumbnails being generated. If you specify options for the :original,
- Exclude checks
Line is too long. [95/80] Open
Open
# has_attached_file :avatar, :styles => { :large => "300x300", :negative => "100x100" }
- Exclude checks
Line is too long. [93/80] Open
Open
# It is recommended that :convert_options option be included in the hash passed to each
- Exclude checks
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/callbacks'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/content_type_detector'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Operator ||
should be surrounded by a single space. Open
Open
@s3_options = @options[:s3_options] || {}
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Line is too long. [94/80] Open
Open
# * +url+: There are four options for the S3 url. You can choose to have the bucket's name
- Exclude checks
Line is too long. [92/80] Open
Open
# path-style, or :s3_path_url). But in some cases paths don't work and you need to use
- Exclude checks
Line is too long. [92/80] Open
Open
# thumbnails will be created when the new file is assigned, but they will *not* be saved
- Exclude checks
Line is too long. [89/80] Open
Open
# until +save+ is called on the record. Likewise, if the attribute is set to +nil+ is
- Exclude checks
Line is too long. [93/80] Open
Open
# * +preserve_files+: Keep the existing attachment files in all cases, even if the parent
- Exclude checks
Line is too long. [93/80] Open
Open
# it would be best if you did not specify destructive options, as the intent of keeping
- Exclude checks
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'tempfile'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/interpolations'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/tempfile_factory'
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"