assemblymade/coderwall

View on GitHub
app/badges/node_knockout.rb

Summary

Maintainability
B
5 hrs
Test Coverage

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def replace_assignments_and_awards(github_usernames, badge_class)
    competition_end_date = Date.parse(@end_date)
    tags                 = ['hackathon', 'nodejs', 'award', 'nodeknockout']
    metadata             = {
      award: badge_class.name
Severity: Minor
Found in app/badges/node_knockout.rb and 1 other location - About 55 mins to fix
app/badges/node_knockout.rb on lines 66..72

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def replace_assignments_and_awards_for_twitter(twitter_usernames, badge_class)
    competition_end_date = Date.parse(@end_date)
    tags                 = ['hackathon', 'nodejs', 'award', 'nodeknockout']
    metadata             = { award: badge_class.name }
    twitter_usernames.each do |twitter_username|
Severity: Minor
Found in app/badges/node_knockout.rb and 1 other location - About 55 mins to fix
app/badges/node_knockout.rb on lines 53..61

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "MostUseful#{year}", Class.new(BadgeBase) {
      describe "KO Utility",
               skill:       'Node.js',
               description: "Won the most useful app in the #{year} Node Knockout",
               for:         "winning the most useful app in the #{year} Node Knockout",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 203..210
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "MostComplete#{year}", Class.new(BadgeBase) {
      describe "KO Complete",
               skill:       'Node.js',
               description: "Won the most complete app in the #{year} Node Knockout",
               for:         "winning the most complete app in the #{year} Node Knockout",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 203..210

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "MostInnovative#{year}", Class.new(BadgeBase) {
      describe "KO Innovation",
               skill:       'Node.js',
               description: "Won the most innovative app in the #{year} Node Knockout",
               for:         "winning the most innovative app in the #{year} Node Knockout",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "Judge#{year}", Class.new(BadgeBase) {
      describe "KO Judge",
               skill:       'Node.js',
               description: "Official Judge of the #{year} Node Knockout",
               for:         "judging the #{year} Node Knockout.",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 203..210
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "MostVotes#{year}", Class.new(BadgeBase) {
      describe "KO Popular",
               skill:       'Node.js',
               description: "Won the most votes in the #{year} Node Knockout",
               for:         "winning the most votes in the #{year} Node Knockout",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 203..210
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "Contender#{year}", Class.new(BadgeBase) {
      describe "KO Contender",
               skill:       'Node.js',
               description: "Participated in #{year} Node Knockout",
               for:         "participating in #{year} Node Knockout.",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 203..210
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "Champion#{year}", Class.new(BadgeBase) {
      describe "KO Champion",
               skill:       'Node.js',
               description: "Won first place in the #{year} Node Knockout",
               for:         "winning first place in the #{year} Node Knockout.",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 176..183
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 203..210
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const_set "BestDesign#{year}", Class.new(BadgeBase) {
      describe "KO Design",
               skill:       'Node.js',
               description: "Won the best designed app in the #{year} Node Knockout",
               for:         "winning the best designed app in the #{year} Node Knockout",
Severity: Major
Found in app/badges/node_knockout.rb and 7 other locations - About 25 mins to fix
app/badges/node_knockout.rb on lines 149..156
app/badges/node_knockout.rb on lines 158..165
app/badges/node_knockout.rb on lines 167..174
app/badges/node_knockout.rb on lines 185..192
app/badges/node_knockout.rb on lines 194..201
app/badges/node_knockout.rb on lines 203..210
app/badges/node_knockout.rb on lines 212..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status