thoughtbot/paperclip

View on GitHub

Showing 920 of 1,009 total issues

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/io_adapters/file_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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"

Line is too long. [86/80]
Open

    #         {:bucket => "xxx", :access_key_id => "xxx", :secret_access_key => "xxx"}
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [94/80]
Open

    # * +url+: There are four options for the S3 url. You can choose to have the bucket's name
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'erb'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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

require 'paperclip/io_adapters/attachment_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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

require 'paperclip/io_adapters/uploaded_file_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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

require 'paperclip/io_adapters/uri_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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"

Align split with attachment.path(style). on line 164.
Open

            split("/")[attachment.s3_prefixes_in_alias..-1].
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

Space inside parentheses detected.
Open

              merge_s3_headers( style_specific_options[:s3_headers], @s3_headers, @s3_metadata) if style_specific_options[:s3_headers]
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Checks for spaces inside ordinary round parentheses.

Example:

# bad
f( 3)
g = (a + 3 )

# good
f(3)
g = (a + 3)

Line is too long. [83/80]
Open

    # Amazon's S3 file hosting service is a scalable, easy place to store files for
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [82/80]
Open

    #   link in the +url+ entry for more information about S3 domains and buckets.
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [92/80]
Open

    #   path-style, or :s3_path_url). But in some cases paths don't work and you need to use
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [86/80]
Open

    # * +path+: This is the key under the bucket in which the file will be stored. The
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [86/80]
Open

    #   inside the dimensions and then crop the rest off (weighted at the center). The
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [86/80]
Open

    # * +keep_old_files+: Keep the existing attachment files (original + resized) from
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    #   It is recommended that :convert_options option be included in the hash passed to each
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [89/80]
Open

    #   NOTE: Strings supplied to :convert_options are split on space in order to undergo
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [97/80]
Open

    #   choices are :filesystem, :fog and :s3. The default is :filesystem. Make sure you read the
Severity: Minor
Found in lib/paperclip.rb by rubocop

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'digest'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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

require 'paperclip/processor_helpers'
Severity: Minor
Found in lib/paperclip.rb by rubocop

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"
Severity
Category
Status
Source
Language