bitaculous/ember-cli-deploy-rack

View on GitHub

Showing 6 of 6 total issues

Use each_key instead of keys.each.
Open

            defaults.keys.each do |key|
Severity: Minor
Found in lib/ember/cli/deploy/rack/engine.rb by rubocop

This cop checks for uses of each_key and each_value Hash methods.

Note: If you have an array of two-element arrays, you can put parentheses around the block arguments to indicate that you're not working with a hash, and suppress RuboCop offenses.

Example:

# bad
hash.keys.each { |k| p k }
hash.values.each { |v| p v }
hash.each { |k, _v| p k }
hash.each { |_k, v| p v }

# good
hash.each_key { |k| p k }
hash.each_value { |v| p v }

Parenthesize the param `proc { defaults = Redis::Client::DEFAULTS.dup
Open

          set :redis, proc {
            defaults = Redis::Client::DEFAULTS.dup

            defaults.keys.each do |key|
              # Fill in defaults if needed
Severity: Minor
Found in lib/ember/cli/deploy/rack/engine.rb by rubocop

This cop checks for ambiguous block association with method when param passed without parentheses.

Example:

# bad
some_method a { |val| puts val }

Example:

# good
# With parentheses, there's no ambiguity.
some_method(a) { |val| puts val }

# good
# Operator methods require no disambiguation
foo == bar { |b| b.baz }

# good
# Lambda arguments require no disambiguation
foo = ->(bar) { bar.baz }

Script file rubocop.rake doesn't have execute permission.
Open

#!/usr/bin/env rake
Severity: Minor
Found in tasks/rubocop.rake by rubocop

Script file rspec.rake doesn't have execute permission.
Open

#!/usr/bin/env rake
Severity: Minor
Found in tasks/rspec.rake by rubocop

Script file bundler.rake doesn't have execute permission.
Open

#!/usr/bin/env rake
Severity: Minor
Found in tasks/bundler.rake by rubocop

Parenthesize the param proc { Redis.new settings.redis } to make sure that the block will be associated with the proc method call.
Open

          set :redis_client, proc {
            Redis.new settings.redis
          }
Severity: Minor
Found in lib/ember/cli/deploy/rack/engine.rb by rubocop

This cop checks for ambiguous block association with method when param passed without parentheses.

Example:

# bad
some_method a { |val| puts val }

Example:

# good
# With parentheses, there's no ambiguity.
some_method(a) { |val| puts val }

# good
# Operator methods require no disambiguation
foo == bar { |b| b.baz }

# good
# Lambda arguments require no disambiguation
foo = ->(bar) { bar.baz }
Severity
Category
Status
Source
Language