thoughtbot/paperclip

View on GitHub
Rakefile

Summary

Maintainability
Test Coverage

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

desc 'Start an IRB session with all necessary files required.'
Severity: Minor
Found in Rakefile by rubocop

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

require 'appraisal'
Severity: Minor
Found in Rakefile by rubocop

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

desc 'Default: run unit tests.'
Severity: Minor
Found in Rakefile by rubocop

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

    exec('rake spec cucumber')
Severity: Minor
Found in Rakefile by rubocop

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

    exec('rake appraisal')
Severity: Minor
Found in Rakefile by rubocop

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

  exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
Severity: Minor
Found in Rakefile by rubocop

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

desc 'Clean up files.'
Severity: Minor
Found in Rakefile by rubocop

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

require 'rspec/core/rake_task'
Severity: Minor
Found in Rakefile by rubocop

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

desc 'Test the paperclip plugin under all supported Rails versions.'
Severity: Minor
Found in Rakefile by rubocop

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

  if ENV['BUNDLE_GEMFILE']
Severity: Minor
Found in Rakefile by rubocop

Unused block argument - t. You can omit the argument if you don't care about it.
Open

task :all do |t|
Severity: Minor
Found in Rakefile by rubocop

This cop checks for unused block arguments.

Example:

#good

do_something do |used, unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

# bad

do_something do |used, _unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Line is too long. [86/80]
Open

  exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
Severity: Minor
Found in Rakefile by rubocop

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

desc 'Test the paperclip plugin.'
Severity: Minor
Found in Rakefile by rubocop

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

require 'bundler/gem_tasks'
Severity: Minor
Found in Rakefile by rubocop

Use the new Ruby 1.9 hash syntax.
Open

task :default => [:clean, :all]
Severity: Minor
Found in Rakefile by rubocop

This cop checks hash literal syntax.

It can enforce either the use of the class hash rocket syntax or the use of the newer Ruby 1.9 syntax (when applicable).

A separate offense is registered for each problematic pair.

The supported styles are:

  • ruby19 - forces use of the 1.9 syntax (e.g. {a: 1}) when hashes have all symbols for keys
  • hash_rockets - forces use of hash rockets for all hashes
  • nomixedkeys - simply checks for hashes with mixed syntaxes
  • ruby19nomixed_keys - forces use of ruby 1.9 syntax and forbids mixed syntax hashes

Example:

"EnforcedStyle => 'ruby19'"

# good
{a: 2, b: 1}
{:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
{d: 1, 'e' => 2} # technically not forbidden

# bad
{:a => 2}
{b: 1, :c => 2}

Example:

"EnforcedStyle => 'hash_rockets'"

# good
{:a => 1, :b => 2}

# bad
{a: 1, b: 2}
{c: 1, 'd' => 5}

Example:

"EnforcedStyle => 'no_mixed_keys'"

# good
{:a => 1, :b => 2}
{c: 1, d: 2}

# bad
{:a => 1, b: 2}
{c: 1, 'd' => 2}

Example:

"EnforcedStyle => 'ruby19_no_mixed_keys'"

# good
{a: 1, b: 2}
{:c => 3, 'd' => 4}

# bad
{:a => 1, :b => 2}
{c: 2, 'd' => 3} # should just use hash rockets

Avoid using rescue in its modifier form.
Open

  FileUtils.rm "test/debug.log" rescue nil
Severity: Minor
Found in Rakefile by rubocop

Avoid using rescue in its modifier form.
Open

  FileUtils.rm "test/paperclip.db" rescue nil
Severity: Minor
Found in Rakefile by rubocop

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

desc 'Run integration test'
Severity: Minor
Found in Rakefile by rubocop

Unused block argument - t. You can omit the argument if you don't care about it.
Open

task :shell do |t|
Severity: Minor
Found in Rakefile by rubocop

This cop checks for unused block arguments.

Example:

#good

do_something do |used, unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

# bad

do_something do |used, _unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Space missing to the left of {.
Open

  Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
Severity: Minor
Found in Rakefile by rubocop

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

require 'cucumber/rake/task'
Severity: Minor
Found in Rakefile by rubocop

Space between { and | missing.
Open

  Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
Severity: Minor
Found in Rakefile by rubocop

Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

Unused block argument - t. You can omit the argument if you don't care about it.
Open

task :clean do |t|
Severity: Minor
Found in Rakefile by rubocop

This cop checks for unused block arguments.

Example:

#good

do_something do |used, unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

# bad

do_something do |used, _unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

There are no issues that match your filters.

Category
Status