thoughtbot/paperclip

View on GitHub
lib/paperclip.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [89/80]
Open

    #   the original around is to regenerate all the thumbnails when requirements change.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [95/80]
Open

    #     has_attached_file :avatar, :styles => { :large => "300x300", :negative => "100x100" }
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [94/80]
Open

    #   also adds the "#" option (e.g. "50x50#"), which will resize the image to fit maximally
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # * +whiny+: Will raise an error if Paperclip cannot post_process an uploaded file due
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [92/80]
Open

    #   Note that this option takes a hash of options, each of which correspond to the style
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [91/80]
Open

    #   to all of the thumbnails being generated. If you specify options for the :original,
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 'paperclip/callbacks'
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 'paperclip/io_adapters/abstract_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # * +styles+: A hash of thumbnail styles and their geometries. You can find more about
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

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

require 'paperclip/style'
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 'paperclip/helpers'
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 'mimemagic/overlay'
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 'paperclip/io_adapters/data_uri_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [81/80]
Open

# are stored in Tempfiles until the record is saved. Paperclip does not require a
Severity: Minor
Found in lib/paperclip.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. [94/80]
Open

    # :default_url, and :path in your model by passing a method name as a symbol as a argument
Severity: Minor
Found in lib/paperclip.rb by rubocop

Rename has_attached_file to has_attached_file?.
Open

    def has_attached_file(name, options = {})
Severity: Minor
Found in lib/paperclip.rb by rubocop

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value) ...

# good
def even?(value)

# bad
def has_value? ...

# good
def value? ...

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

require 'paperclip/version'
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 'paperclip/io_adapters/registry'
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 'paperclip/io_adapters/attachment_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [89/80]
Open

    # * +url+: The full URL of where the attachment is publicly accessible. This can just
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [91/80]
Open

    #   to a command line error. This will override the global setting for this attachment.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [89/80]
Open

    #   "-depth 8" to specify the bit depth of the resulting conversion.  See ImageMagick
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # * +storage+: Chooses the storage backend where the files will be stored. The current
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [108/80]
Open

    #   documentation for Paperclip::Storage::Filesystem, Paperclip::Storage::Fog and Paperclip::Storage::S3
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

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

require 'tempfile'
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 'paperclip/thumbnail'
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 'paperclip/interpolations'
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 'paperclip/attachment_registry'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [91/80]
Open

    # Paperclip::Attachment documentation for more specifics. There are a number of options
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [88/80]
Open

    #     has_attached_file :avatar, :default_url => "/images/default_:style_avatar.png"
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [88/80]
Open

    #   shell quoting for safety. If your options require a space, please pre-split them
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 'erb'
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 'paperclip/tempfile_factory'
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 'paperclip/media_type_spoof_detector'
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 'paperclip/filename_cleaner'
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 'paperclip/railtie' if defined?(Rails::Railtie)
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 'paperclip/io_adapters/uri_adapter'
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 'cocaine'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [84/80]
Open

# Paperclip allows file attachments that are stored in the filesystem. All graphical
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [86/80]
Open

# separate model for storing the attachment's information, instead adding a few simple
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    # is typically a file stored somewhere on the filesystem and has been uploaded by a user.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # The attribute returns a Paperclip::Attachment object which handles the management of
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [85/80]
Open

  #   programs if they are not visible to Rails the system's search path. Defaults to
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    #   it would be best if you did not specify destructive options, as the intent of keeping
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 'paperclip/attachment'
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 'paperclip/rails_environment'
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 'paperclip/io_adapters/uploaded_file_adapter'
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 'paperclip/storage'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [84/80]
Open

# transformations are done using the Graphics/ImageMagick command line utilities and
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # that file. The intent is to make the attachment as much like a normal attribute. The
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [91/80]
Open

    #   that can control permissions. You can specify the full domain and path, but usually
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. [98/80]
Open

    #   being automatically deleted when an attachment is cleared or updated. Defaults to +false+.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    #   array to pass in various convert command options.  Typical options are "-strip" to
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. [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 'paperclip/geometry_detector_factory'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [92/80]
Open

    #   as easily point to a directory served directly through Apache as it can to an action
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    # * +preserve_files+: Keep the existing attachment files in all cases, even if the parent
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 'paperclip/geometry_parser_factory'
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 'paperclip/validators'
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 'mimemagic'
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 'paperclip/processor_helpers'
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 'paperclip/interpolations/plural_cache'
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 'paperclip/content_type_detector'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [85/80]
Open

# Paperclip defines an attachment as any file, though it makes special considerations
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 'paperclip/io_adapters/identity_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [92/80]
Open

    # thumbnails will be created when the new file is assigned, but they will *not* be saved
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [88/80]
Open

    # * +default_url+: The URL that will be returned if there is no attachment assigned.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [86/80]
Open

    #   (http://www.imagemagick.org/script/command-line-options.php#resize). Paperclip
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # It's also possible for you to dynamically define your interpolation string for :url,
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [88/80]
Open

    #   Paperclip::Attachment#interpolate for more information on variable interpolaton.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [86/80]
Open

    #   remove all Exif data from the image (save space for thumbnails and avatars) or
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    #   of thumbnail being generated. You can also specify :all as a key, which will apply
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 'paperclip/io_adapters/file_adapter'
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 'paperclip/io_adapters/stringio_adapter'
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 'paperclip/io_adapters/http_url_proxy_adapter'
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 'paperclip/errors'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [89/80]
Open

    # until +save+ is called on the record. Likewise, if the attribute is set to +nil+ is
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 'paperclip/processor'
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 'paperclip/file_command_content_type_detector'
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 'paperclip/io_adapters/empty_string_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [88/80]
Open

    # called on it, the attachment will *not* be deleted until +save+ is called. See the
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    #   NOTE: While not deprecated yet, it is not recommended to specify options this way.
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [96/80]
Open

    # +has_attached_file+ gives the class it is called on an attribute that maps to a file. This
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [94/80]
Open

    #   just an absolute path is sufficient. The leading slash *must* be included manually for
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 'paperclip/geometry'
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 'paperclip/tempfile'
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 'paperclip/glue'
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 'paperclip/missing_attachment_styles'
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 'paperclip/logger'
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 'logger'
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 'paperclip/io_adapters/nil_adapter'
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 'paperclip/has_attached_file'
Severity: Minor
Found in lib/paperclip.rb by rubocop

There are no issues that match your filters.

Category
Status