lawrencechanyewlong/wherewolfpro

View on GitHub
config/routes.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [36/25]
Open

Rails.application.routes.draw do
  
  get 'welcome/history'
  post 'welcome/history', to:"event#store_event"
  
Severity: Minor
Found in config/routes.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Missing space after #.
Open

  #get "event/select_destination/geocoding", to: "events#geocoding", as: "geocoding"
Severity: Minor
Found in config/routes.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  get 'event/receiver_map/:id', to: "event#receiver_map"
Severity: Minor
Found in config/routes.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 single-quoted strings when you don't need string interpolation or special symbols.
Open

  get 'event/latlng/:id', to: "event#latlng"
Severity: Minor
Found in config/routes.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"

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  get 'event/receiver_map', to: "event#receiver_map"
Severity: Minor
Found in config/routes.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"

Use the new Ruby 1.9 hash syntax.
Open

  post '/event/summary', :to => 'event#create_event'
Severity: Minor
Found in config/routes.rb 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 (default)

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

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

Example: EnforcedStyle: hash_rockets

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

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

Example: EnforcedStyle: nomixedkeys

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

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

Example: EnforcedStyle: ruby19nomixed_keys

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

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  post "event/store_message"
Severity: Minor
Found in config/routes.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"

Incorrect indentation detected (column 3 instead of 2).
Open

   #root 'topics#index'
Severity: Minor
Found in config/routes.rb by rubocop

This cops checks the indentation of comments.

Example:

# bad
  # comment here
def method_name
end

  # comment here
a = 'hello'

# yet another comment
  if true
    true
  end

# good
# comment here
def method_name
end

# comment here
a = 'hello'

# yet another comment
if true
  true
end

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Line is too long. [84/80]
Open

  #get "event/select_destination/geocoding", to: "events#geocoding", as: "geocoding"
Severity: Minor
Found in config/routes.rb by rubocop

Line is too long. [81/80]
Open

  # Example resource route (maps HTTP verbs to controller actions automatically):
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  post 'event/select_destination', to: "event#store_destination"
Severity: Minor
Found in config/routes.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"

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  get 'event/user_map/:id', to: "event#user_map"
Severity: Minor
Found in config/routes.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"

Incorrect indentation detected (column 2 instead of 3).
Open

  # You can have the root of your site routed with "root"
Severity: Minor
Found in config/routes.rb by rubocop

This cops checks the indentation of comments.

Example:

# bad
  # comment here
def method_name
end

  # comment here
a = 'hello'

# yet another comment
  if true
    true
  end

# good
# comment here
def method_name
end

# comment here
a = 'hello'

# yet another comment
if true
  true
end

Space missing after colon.
Open

  post 'welcome/history', to:"event#store_event"
Severity: Minor
Found in config/routes.rb by rubocop

Checks for colon (:) not followed by some kind of space. N.B. this cop does not handle spaces after a ternary operator, which are instead handled by Layout/SpaceAroundOperators.

Example:

# bad
def f(a:, b:2); {a:3}; end

# good
def f(a:, b: 2); {a: 3}; end

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Use the new Ruby 1.9 hash syntax.
Open

  post '/event/select_duration', :to => 'event#store_duration'
Severity: Minor
Found in config/routes.rb 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 (default)

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

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

Example: EnforcedStyle: hash_rockets

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

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

Example: EnforcedStyle: nomixedkeys

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

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

Example: EnforcedStyle: ruby19nomixed_keys

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

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

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Line is too long. [84/80]
Open

  # The priority is based upon order of creation: first created -> highest priority.
Severity: Minor
Found in config/routes.rb by rubocop

Use the new Ruby 1.9 hash syntax.
Open

  get '/contacts/:provider/callback', :to => 'users#third_party'
Severity: Minor
Found in config/routes.rb 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 (default)

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

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

Example: EnforcedStyle: hash_rockets

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

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

Example: EnforcedStyle: nomixedkeys

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

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

Example: EnforcedStyle: ruby19nomixed_keys

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

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

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Use the new Ruby 1.9 hash syntax.
Open

  get '/auth/:provider/callback', :to => 'welcome#create'
Severity: Minor
Found in config/routes.rb 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 (default)

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

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

Example: EnforcedStyle: hash_rockets

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

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

Example: EnforcedStyle: nomixedkeys

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

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

Example: EnforcedStyle: ruby19nomixed_keys

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

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  post 'event/user_map/:id', to: "event#user_map"
Severity: Minor
Found in config/routes.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"

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  post 'welcome/history', to:"event#store_event"
Severity: Minor
Found in config/routes.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"

Missing space after #.
Open

   #root 'topics#index'
Severity: Minor
Found in config/routes.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  post 'event/user_map', to: "event#user_map"
Severity: Minor
Found in config/routes.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"

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Missing space after #.
Open

  #post 'event/receiver_map', to: 'event#receiver_map'
Severity: Minor
Found in config/routes.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in config/routes.rb by rubocop

Use the new Ruby 1.9 hash syntax.
Open

  post '/event/select_duration', :to => 'event#store_duration'
Severity: Minor
Found in config/routes.rb 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 (default)

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

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

Example: EnforcedStyle: hash_rockets

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

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

Example: EnforcedStyle: nomixedkeys

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

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

Example: EnforcedStyle: ruby19nomixed_keys

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

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

There are no issues that match your filters.

Category
Status