Showing 920 of 1,009 total issues
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/storage'
- 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/io_adapters/abstract_adapter'
- 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"
Space missing after comma. Open
Open
s3_headers[name.to_s.downcase.sub(/\Ax-amz-/,'').tr("-","_").to_sym] = value
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Unused block argument - headers
. If it's necessary, use _
or _headers
as an argument name to indicate that it won't be used. Open
Open
http_headers.inject({}) do |headers,(name,value)|
- Read upRead up
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end
Line is too long. [85/80] Open
Open
# put your bucket name in this file, instead of adding it to the code directly.
- Exclude checks
Line is too long. [88/80] Open
Open
# * +bucket+: This is the name of the S3 bucket that will store your files. Remember
- 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. [94/80] Open
Open
# just an absolute path is sufficient. The leading slash *must* be included manually for
- Exclude checks
Line is too long. [90/80] Open
Open
# * +styles+: A hash of thumbnail styles and their geometries. You can find more about
- Exclude checks
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Open
Open
require 'paperclip/version'
- 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"
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. [89/80] Open
Open
# to a YAML file containing the +access_key_id+ and +secret_access_key+ that Amazon
- Exclude checks
Line is too long. [81/80] Open
Open
# * +s3_headers+: A hash of headers or a Proc. You may specify a hash such as
- Exclude checks
Line is too long. [89/80] Open
Open
# * +url+: The full URL of where the attachment is publicly accessible. This can just
- Exclude checks
Line is too long. [91/80] Open
Open
# that can control permissions. You can specify the full domain and path, but usually
- Exclude checks
Line is too long. [88/80] Open
Open
# has_attached_file :avatar, :default_url => "/images/default_:style_avatar.png"
- 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. [90/80] Open
Open
# * +storage+: Chooses the storage backend where the files will be stored. The current
- Exclude checks
Line is too long. [108/80] Open
Open
# documentation for Paperclip::Storage::Filesystem, Paperclip::Storage::Fog and Paperclip::Storage::S3
- Exclude checks