mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
rubocop: Update todo file, enable rails cops
This commit is contained in:
parent
9135da3607
commit
046f726414
3 changed files with 576 additions and 127 deletions
12
.rubocop.yml
12
.rubocop.yml
|
|
@ -1,3 +1,5 @@
|
||||||
|
Rails:
|
||||||
|
Enabled: true
|
||||||
inherit_from: .rubocop_todo.yml
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
Style/HashSyntax:
|
Style/HashSyntax:
|
||||||
|
|
@ -24,10 +26,6 @@ Style/EmptyLines:
|
||||||
Style/EmptyLinesAroundAccessModifier:
|
Style/EmptyLinesAroundAccessModifier:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# Do not insert empty line after class definition and before closing class
|
|
||||||
Style/EmptyLinesAroundBody:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# Use hash literal {} instead of Hash.new
|
# Use hash literal {} instead of Hash.new
|
||||||
Style/EmptyLiteral:
|
Style/EmptyLiteral:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
@ -93,13 +91,9 @@ Style/AndOr:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# avoid deep blocks nesting
|
# avoid deep blocks nesting
|
||||||
Style/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
Max: 4
|
Max: 4
|
||||||
|
|
||||||
# use do instead of {...} in multiline blocks
|
|
||||||
Style/Blocks:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# avoid redundunt curly braces when it is obvious that hash is used
|
# avoid redundunt curly braces when it is obvious that hash is used
|
||||||
Style/BracesAroundHashParameters:
|
Style/BracesAroundHashParameters:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
||||||
|
|
@ -1,137 +1,476 @@
|
||||||
# This configuration was generated by `rubocop --auto-gen-config`
|
# This configuration was generated by
|
||||||
# on 2014-07-21 12:48:09 +0200 using RuboCop version 0.24.1.
|
# `rubocop --auto-gen-config`
|
||||||
|
# on 2016-02-08 14:42:45 +0100 using RuboCop version 0.37.0.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 2
|
||||||
|
Lint/DuplicatedKey:
|
||||||
|
Exclude:
|
||||||
|
- 'db/migrate/20140801164901_move_conference_media_to_commercial.rb'
|
||||||
|
- 'db/migrate/20140801170430_move_event_media_to_commercial.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
Lint/IneffectiveAccessModifier:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/commercial.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
|
||||||
|
# Offense count: 84
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Max: 75
|
||||||
|
|
||||||
|
# Offense count: 7
|
||||||
|
# Configuration parameters: CountComments.
|
||||||
|
Metrics/ClassLength:
|
||||||
|
Max: 514
|
||||||
|
|
||||||
|
# Offense count: 12
|
||||||
|
Metrics/CyclomaticComplexity:
|
||||||
|
Max: 12
|
||||||
|
|
||||||
|
# Offense count: 956
|
||||||
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
||||||
|
# URISchemes: http, https
|
||||||
|
Metrics/LineLength:
|
||||||
|
Max: 208
|
||||||
|
|
||||||
|
# Offense count: 100
|
||||||
|
# Configuration parameters: CountComments.
|
||||||
|
Metrics/MethodLength:
|
||||||
|
Max: 56
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: CountComments.
|
||||||
|
Metrics/ModuleLength:
|
||||||
|
Max: 256
|
||||||
|
|
||||||
|
# Offense count: 7
|
||||||
|
Metrics/PerceivedComplexity:
|
||||||
|
Max: 15
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
Performance/StringReplacement:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/support/save_feature_failures.rb'
|
||||||
|
|
||||||
|
# Offense count: 13
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, Include.
|
||||||
|
# SupportedStyles: action, filter
|
||||||
|
# Include: app/controllers/**/*.rb
|
||||||
|
Rails/ActionFilter:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/base_controller.rb'
|
||||||
|
- 'app/controllers/admin/registrations_controller.rb'
|
||||||
|
- 'app/controllers/admin/schedules_controller.rb'
|
||||||
|
- 'app/controllers/application_controller.rb'
|
||||||
|
- 'app/controllers/conference_controller.rb'
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'app/controllers/proposal_controller.rb'
|
||||||
|
- 'app/controllers/subscriptions_controller.rb'
|
||||||
|
- 'app/controllers/ticket_purchases_controller.rb'
|
||||||
|
- 'app/controllers/tickets_controller.rb'
|
||||||
|
- 'app/controllers/users/omniauth_callbacks_controller.rb'
|
||||||
|
|
||||||
|
# Offense count: 101
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
Style/ClassCheck:
|
# SupportedStyles: strict, flexible
|
||||||
|
Rails/Date:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 8
|
# Offense count: 1
|
||||||
# Configuration parameters: CountComments.
|
# Cop supports --auto-correct.
|
||||||
Style/ClassLength:
|
Rails/Delegate:
|
||||||
Max: 524
|
Exclude:
|
||||||
|
- 'app/serializers/speaker_serializer.rb'
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: Include.
|
||||||
|
# Include: app/models/**/*.rb
|
||||||
|
Rails/FindBy:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'app/models/openid.rb'
|
||||||
|
- 'app/models/ticket.rb'
|
||||||
|
- 'app/models/ticket_purchase.rb'
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: Include.
|
||||||
|
# Include: app/models/**/*.rb
|
||||||
|
Rails/FindEach:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
|
||||||
|
# Offense count: 12
|
||||||
|
# Configuration parameters: Include.
|
||||||
|
# Include: app/models/**/*.rb
|
||||||
|
Rails/HasAndBelongsToMany:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'app/models/qanswer.rb'
|
||||||
|
- 'app/models/question.rb'
|
||||||
|
- 'app/models/registration.rb'
|
||||||
|
- 'app/models/role.rb'
|
||||||
|
- 'app/models/social_event.rb'
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
- 'app/models/vchoice.rb'
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Rails/PluralizationGrammar:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 47
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: strict, flexible
|
||||||
|
Rails/TimeZone:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'app/models/comment.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'spec/controllers/admin/comments_controller_spec.rb'
|
||||||
|
- 'spec/controllers/admin/programs_controller_spec.rb'
|
||||||
|
- 'spec/factories/users.rb'
|
||||||
|
- 'spec/models/campaign_spec.rb'
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 16
|
||||||
|
# Configuration parameters: Include.
|
||||||
|
# Include: app/models/**/*.rb
|
||||||
|
Rails/Validation:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/call_for_paper.rb'
|
||||||
|
- 'app/models/comment.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/photo.rb'
|
||||||
|
- 'app/models/registration.rb'
|
||||||
|
- 'app/models/sponsor.rb'
|
||||||
|
- 'app/models/sponsorship_level.rb'
|
||||||
|
- 'app/models/subscription.rb'
|
||||||
|
- 'app/models/ticket.rb'
|
||||||
|
- 'app/models/ticket_purchase.rb'
|
||||||
|
- 'app/models/vposition.rb'
|
||||||
|
|
||||||
|
# Offense count: 18
|
||||||
|
Style/AccessorMethodName:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/events_controller.rb'
|
||||||
|
- 'app/controllers/application_controller.rb'
|
||||||
|
- 'app/models/campaign.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/target.rb'
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: is_a?, kind_of?
|
||||||
|
Style/ClassCheck:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'app/models/email_settings.rb'
|
||||||
|
- 'app/models/revision_observer.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
Style/ClassVars:
|
Style/ClassVars:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'spec/support/kneet_connections.rb'
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/ClosingParenthesisIndentation:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'spec/support/omniauth_macros.rb'
|
||||||
|
- 'spec/views/admin/sponsors/index.html.haml_spec.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: PreferredMethods.
|
Style/ColonMethodCall:
|
||||||
Style/CollectionMethods:
|
Exclude:
|
||||||
Enabled: false
|
- 'app/models/commercial.rb'
|
||||||
|
- 'app/models/contact.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/ColonMethodCall:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 4
|
|
||||||
# Configuration parameters: Keywords.
|
# Configuration parameters: Keywords.
|
||||||
|
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
|
||||||
Style/CommentAnnotation:
|
Style/CommentAnnotation:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/models/event_user.rb'
|
||||||
|
|
||||||
# Offense count: 4
|
# Offense count: 17
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/CommentIndentation:
|
Style/CommentIndentation:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/controllers/admin/comments_controller.rb'
|
||||||
|
- 'app/controllers/admin/difficulty_levels_controller.rb'
|
||||||
|
- 'app/controllers/admin/programs_controller.rb'
|
||||||
|
- 'app/models/ahoy/program.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/program.rb'
|
||||||
|
- 'app/models/track.rb'
|
||||||
|
- 'spec/features/volunteers_spec.rb'
|
||||||
|
|
||||||
# Offense count: 10
|
# Offense count: 7
|
||||||
Style/CyclomaticComplexity:
|
|
||||||
Max: 16
|
|
||||||
|
|
||||||
# Offense count: 5
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/DeprecatedHashMethods:
|
# Configuration parameters: SingleLineConditionsOnly.
|
||||||
Enabled: false
|
Style/ConditionalAssignment:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/schedules_controller.rb'
|
||||||
|
- 'app/controllers/admin/volunteers_controller.rb'
|
||||||
|
- 'app/controllers/conference_controller.rb'
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'app/controllers/admin/conference_controller.rb'
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'app/models/ticket_purchase.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'db/migrate/20140610165551_migrate_data_person_to_user.rb'
|
||||||
|
- 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb'
|
||||||
|
|
||||||
# Offense count: 228
|
# Offense count: 366
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 150
|
# Offense count: 74
|
||||||
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: leading, trailing
|
||||||
Style/DotPosition:
|
Style/DotPosition:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 9
|
# Offense count: 5
|
||||||
Style/DoubleNegation:
|
Style/DoubleNegation:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/ElseAlignment:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowAdjacentOneLineDefs.
|
||||||
|
Style/EmptyLineBetweenDefs:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/call_for_paper.rb'
|
||||||
|
|
||||||
|
# Offense count: 98
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: empty_lines, no_empty_lines
|
||||||
|
Style/EmptyLinesAroundBlockBody:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Configuration parameters: Exclude.
|
# Cop supports --auto-correct.
|
||||||
Style/FileName:
|
Style/EmptyLiteral:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 17
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
||||||
|
Style/ExtraSpacing:
|
||||||
|
Exclude:
|
||||||
|
- 'Guardfile'
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'app/models/target.rb'
|
||||||
|
- 'app/models/ticket.rb'
|
||||||
|
- 'bin/rails'
|
||||||
|
- 'config.ru'
|
||||||
|
- 'db/migrate/20140623101032_create_ahoy_events.rb'
|
||||||
|
- 'db/migrate/20140701123203_add_events_per_week_to_conference.rb'
|
||||||
|
- 'db/migrate/20140719160903_create_delayed_jobs.rb'
|
||||||
|
- 'spec/controllers/conference_controller_spec.rb'
|
||||||
|
- 'spec/factories/splashpages.rb'
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 38
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
||||||
|
Style/FirstParameterIndentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 8
|
# Offense count: 6
|
||||||
# Configuration parameters: MinBodyLength.
|
# Configuration parameters: MinBodyLength.
|
||||||
Style/GuardClause:
|
Style/GuardClause:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'app/models/commercial.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
- 'app/models/registration.rb'
|
||||||
|
- 'app/models/ticket.rb'
|
||||||
|
- 'app/serializers/conference_serializer.rb'
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'app/controllers/tickets_controller.rb'
|
||||||
|
- 'app/controllers/admin/questions_controller.rb'
|
||||||
|
|
||||||
# Offense count: 27
|
# Offense count: 14
|
||||||
|
Style/IdenticalConditionalBranches:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/campaigns_controller.rb'
|
||||||
|
- 'app/controllers/admin/difficulty_levels_controller.rb'
|
||||||
|
- 'app/controllers/admin/event_types_controller.rb'
|
||||||
|
- 'app/controllers/admin/rooms_controller.rb'
|
||||||
|
- 'app/controllers/admin/tracks_controller.rb'
|
||||||
|
- 'app/controllers/subscriptions_controller.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/IfInsideElse:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 29
|
||||||
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: MaxLineLength.
|
# Configuration parameters: MaxLineLength.
|
||||||
Style/IfUnlessModifier:
|
Style/IfUnlessModifier:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
||||||
Style/IndentArray:
|
Style/IndentArray:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 8
|
# Offense count: 5
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: IndentationWidth.
|
||||||
|
Style/IndentAssignment:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'app/models/ability.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
||||||
Style/IndentHash:
|
Style/IndentHash:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: normal, rails
|
||||||
Style/IndentationConsistency:
|
Style/IndentationConsistency:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/controllers/users_controller.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'spec/controllers/subscriptions_controller_spec.rb'
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 10
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: Width.
|
||||||
Style/IndentationWidth:
|
Style/IndentationWidth:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'db/migrate/20140701123203_add_events_per_week_to_conference.rb'
|
||||||
|
- 'db/migrate/20141031225545_add_require_handicapped_access_to_questions.rb'
|
||||||
|
- 'db/migrate/20141031225606_add_attending_with_partner_to_questions.rb'
|
||||||
|
- 'db/migrate/20141031225620_add_staying_at_suggested_hotel_to_questions.rb'
|
||||||
|
- 'db/migrate/20141031225635_add_attending_social_events_to_questions.rb'
|
||||||
|
- 'db/migrate/20141118162030_change_lodging_association_to_conference.rb'
|
||||||
|
- 'spec/features/event_types_spec.rb'
|
||||||
|
- 'spec/models/ability_spec.rb'
|
||||||
|
- 'app/serializers/conference_serializer.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/InfiniteLoop:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/datatable.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/LeadingCommentSpace:
|
||||||
|
Exclude:
|
||||||
|
- 'Guardfile'
|
||||||
|
- 'app/models/comment.rb'
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/LineEndConcatenation:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/features/cfp_spec.rb'
|
||||||
|
- 'spec/features/conference_spec.rb'
|
||||||
|
- 'spec/features/registration_periods_spec.rb'
|
||||||
|
|
||||||
# Offense count: 7
|
# Offense count: 7
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/LeadingCommentSpace:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 5
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/LineEndConcatenation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 515
|
|
||||||
# Configuration parameters: AllowURI.
|
|
||||||
Style/LineLength:
|
|
||||||
Max: 217
|
|
||||||
|
|
||||||
# Offense count: 5
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
|
||||||
Style/MethodDefParentheses:
|
Style/MethodDefParentheses:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 68
|
# Offense count: 5
|
||||||
# Configuration parameters: CountComments.
|
|
||||||
Style/MethodLength:
|
|
||||||
Max: 134
|
|
||||||
|
|
||||||
# Offense count: 14
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/NegatedIf:
|
Style/MultilineBlockLayout:
|
||||||
|
Exclude:
|
||||||
|
- 'app/serializers/conference_serializer.rb'
|
||||||
|
|
||||||
|
# Offense count: 58
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: aligned, indented
|
||||||
|
Style/MultilineMethodCallIndentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 18
|
# Offense count: 26
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: aligned, indented
|
||||||
|
Style/MultilineOperationIndentation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/MutableConstant:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/event_user.rb'
|
||||||
|
- 'app/models/role.rb'
|
||||||
|
|
||||||
|
# Offense count: 16
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/NegatedIf:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/events_controller.rb'
|
||||||
|
- 'app/controllers/application_controller.rb'
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'app/controllers/proposal_controller.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/datatable.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'app/models/venue.rb'
|
||||||
|
- 'db/migrate/20140820093735_migrating_supporter_registrations_to_ticket_users.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
Style/NestedParenthesizedCalls:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/features/conference_spec.rb'
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 21
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
||||||
|
# SupportedStyles: skip_modifier_ifs, always
|
||||||
Style/Next:
|
Style/Next:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
|
@ -140,132 +479,249 @@ Style/Next:
|
||||||
Style/NumericLiterals:
|
Style/NumericLiterals:
|
||||||
MinDigits: 15
|
MinDigits: 15
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 3
|
||||||
|
Style/OptionalArguments:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowSafeAssignment.
|
# Configuration parameters: AllowSafeAssignment.
|
||||||
Style/ParenthesesAroundCondition:
|
Style/ParenthesesAroundCondition:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/controllers/admin/base_controller.rb'
|
||||||
|
- 'app/controllers/application_controller.rb'
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
|
||||||
# Offense count: 11
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: PreferredDelimiters.
|
# Configuration parameters: PreferredDelimiters.
|
||||||
Style/PercentLiteralDelimiters:
|
Style/PercentLiteralDelimiters:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/serializers/event_serializer.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Configuration parameters: NamePrefixBlacklist.
|
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
||||||
|
# NamePrefix: is_, has_, have_
|
||||||
|
# NamePrefixBlacklist: is_, has_, have_
|
||||||
|
# NameWhitelist: is_a?
|
||||||
Style/PredicateName:
|
Style/PredicateName:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/models/comment.rb'
|
||||||
|
- 'app/models/contact.rb'
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 6
|
||||||
# Configuration parameters: SupportedStyles.
|
# Configuration parameters: SupportedStyles.
|
||||||
|
# SupportedStyles: compact, exploded
|
||||||
Style/RaiseArgs:
|
Style/RaiseArgs:
|
||||||
EnforcedStyle: compact
|
EnforcedStyle: compact
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/RedundantBegin:
|
Style/RedundantBegin:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/models/revision_observer.rb'
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/RedundantParentheses:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/base_controller.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowMultipleReturnValues.
|
# Configuration parameters: AllowMultipleReturnValues.
|
||||||
Style/RedundantReturn:
|
Style/RedundantReturn:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
|
||||||
# Offense count: 8
|
# Offense count: 61
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/RedundantSelf:
|
Style/RedundantSelf:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/models/ahoy/program.rb'
|
||||||
|
- 'app/models/call_for_paper.rb'
|
||||||
|
- 'app/models/cfp.rb'
|
||||||
|
- 'app/models/comment.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'app/models/program.rb'
|
||||||
|
- 'app/models/question.rb'
|
||||||
|
- 'app/models/ticket.rb'
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
- 'app/models/venue.rb'
|
||||||
|
|
||||||
# Offense count: 10
|
# Offense count: 2
|
||||||
# Configuration parameters: MaxSlashes.
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
||||||
|
# SupportedStyles: slashes, percent_r, mixed
|
||||||
Style/RegexpLiteral:
|
Style/RegexpLiteral:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'Guardfile'
|
||||||
# Offense count: 1
|
|
||||||
Style/SelfAssignment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
Style/SelfAssignment:
|
||||||
Style/SignalException:
|
Exclude:
|
||||||
Enabled: false
|
- 'app/models/event.rb'
|
||||||
|
- 'db/migrate/20141104131625_generate_username.rb'
|
||||||
|
- 'spec/support/save_feature_failures.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Configuration parameters: Methods.
|
# Cop supports --auto-correct.
|
||||||
Style/SingleLineBlockParams:
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
Enabled: false
|
# SupportedStyles: only_raise, only_fail, semantic
|
||||||
|
Style/SignalException:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/support/flash.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowIfMethodIsEmpty.
|
# Configuration parameters: AllowIfMethodIsEmpty.
|
||||||
Style/SingleLineMethods:
|
Style/SingleLineMethods:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'Guardfile'
|
||||||
|
|
||||||
# Offense count: 285
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/SingleSpaceBeforeFirstArg:
|
# Configuration parameters: EnforcedStyleInsidePipes, SupportedStyles.
|
||||||
Enabled: false
|
# SupportedStyles: space, no_space
|
||||||
|
Style/SpaceAroundBlockParameters:
|
||||||
# Offense count: 4
|
Exclude:
|
||||||
# Cop supports --auto-correct.
|
- 'app/helpers/application_helper.rb'
|
||||||
Style/SpaceAfterComma:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 4
|
# Offense count: 4
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
Style/SpaceAroundEqualsInParameterDefault:
|
Style/SpaceAroundEqualsInParameterDefault:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 12
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowForAlignment.
|
||||||
Style/SpaceAroundOperators:
|
Style/SpaceAroundOperators:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/application_controller.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/datatable.rb'
|
||||||
|
- 'app/models/event.rb'
|
||||||
|
- 'app/models/target.rb'
|
||||||
|
- 'app/models/ticket.rb'
|
||||||
|
- 'db/migrate/20141128073306_migrate_data_remove_column_include_cfp_in_splash_add_column_include_cfp.rb'
|
||||||
|
- 'db/migrate/20150417050953_add_url_to_commercial.rb'
|
||||||
|
- 'db/migrate/20151018152439_create_programs_table.rb'
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 223
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
|
Style/SpaceBeforeBlockBraces:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: AllowForAlignment.
|
||||||
Style/SpaceBeforeBlockBraces:
|
Style/SpaceBeforeFirstArg:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/controllers/conference_registrations_controller.rb'
|
||||||
|
- 'spec/factories/splashpages.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/SpaceBeforeSemicolon:
|
Style/SpaceBeforeSemicolon:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'Guardfile'
|
||||||
|
|
||||||
# Offense count: 6
|
# Offense count: 36
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
Style/SpaceInsideBlockBraces:
|
Style/SpaceInsideBlockBraces:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 4
|
# Offense count: 17
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/SpaceInsideBrackets:
|
Style/SpaceInsideBrackets:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'app/controllers/admin/schedules_controller.rb'
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
- 'spec/controllers/admin/conferences_controller_spec.rb'
|
||||||
|
- 'spec/views/admin/events/index.html.haml_spec.rb'
|
||||||
|
|
||||||
# Offense count: 6
|
# Offense count: 14
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
Style/SpaceInsideHashLiteralBraces:
|
Style/SpaceInsideHashLiteralBraces:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
Style/Tab:
|
# Cop supports --auto-correct.
|
||||||
Enabled: false
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
|
Style/SpaceInsideStringInterpolation:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/user.rb'
|
||||||
|
|
||||||
# Offense count: 24
|
# Offense count: 10
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: IgnoredMethods.
|
||||||
|
# IgnoredMethods: respond_to
|
||||||
|
Style/SymbolProc:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/admin/comments_controller.rb'
|
||||||
|
- 'app/controllers/admin/questions_controller.rb'
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'app/models/ability.rb'
|
||||||
|
- 'db/migrate/20140730104658_migrate_roles_for_cancancan.rb'
|
||||||
|
- 'spec/controllers/admin/conferences_controller_spec.rb'
|
||||||
|
- 'spec/support/flash.rb'
|
||||||
|
|
||||||
|
# Offense count: 23
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/Tab:
|
||||||
|
Exclude:
|
||||||
|
- 'db/migrate/20141031225545_add_require_handicapped_access_to_questions.rb'
|
||||||
|
- 'db/migrate/20141031225606_add_attending_with_partner_to_questions.rb'
|
||||||
|
- 'db/migrate/20141031225620_add_staying_at_suggested_hotel_to_questions.rb'
|
||||||
|
- 'db/migrate/20141031225635_add_attending_social_events_to_questions.rb'
|
||||||
|
- 'db/migrate/20141118162030_change_lodging_association_to_conference.rb'
|
||||||
|
- 'spec/features/campaign_spec.rb'
|
||||||
|
- 'spec/features/event_types_spec.rb'
|
||||||
|
|
||||||
|
# Offense count: 26
|
||||||
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
||||||
Style/TrailingComma:
|
# SupportedStyles: comma, consistent_comma, no_comma
|
||||||
Enabled: false
|
Style/TrailingCommaInLiteral:
|
||||||
|
Exclude:
|
||||||
|
- 'Guardfile'
|
||||||
|
- 'app/models/target.rb'
|
||||||
|
- 'db/migrate/20140701123203_add_events_per_week_to_conference.rb'
|
||||||
|
- 'spec/controllers/admin/conferences_controller_spec.rb'
|
||||||
|
- 'spec/models/conference_spec.rb'
|
||||||
|
|
||||||
# Offense count: 8
|
# Offense count: 8
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/WordArray:
|
Style/UnneededInterpolation:
|
||||||
MinSize: 5
|
Exclude:
|
||||||
|
- 'app/controllers/admin/events_controller.rb'
|
||||||
|
- 'app/helpers/application_helper.rb'
|
||||||
|
- 'spec/controllers/admin/conferences_controller_spec.rb'
|
||||||
|
- 'spec/views/admin/volunteers/index.html.haml_spec.rb'
|
||||||
|
|
||||||
Style/AccessorMethodName:
|
# Offense count: 3
|
||||||
Enabled: false
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: SupportedStyles, WordRegex.
|
||||||
|
# SupportedStyles: percent, brackets
|
||||||
|
Style/WordArray:
|
||||||
|
EnforcedStyle: percent
|
||||||
|
MinSize: 3
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/ZeroLengthPredicate:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/conference.rb'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
##
|
##
|
||||||
# This class represents a conference
|
# This class represents a conference
|
||||||
# rubocop:disable Style/ClassLength
|
|
||||||
class Conference < ActiveRecord::Base
|
class Conference < ActiveRecord::Base
|
||||||
require 'uri'
|
require 'uri'
|
||||||
serialize :events_per_week, Hash
|
serialize :events_per_week, Hash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue