diff --git a/.rubocop.yml b/.rubocop.yml index 3f18c985..31f92f4b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,5 @@ +Rails: + Enabled: true inherit_from: .rubocop_todo.yml Style/HashSyntax: @@ -24,10 +26,6 @@ Style/EmptyLines: Style/EmptyLinesAroundAccessModifier: 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 Style/EmptyLiteral: Enabled: true @@ -93,13 +91,9 @@ Style/AndOr: Enabled: true # avoid deep blocks nesting -Style/BlockNesting: +Metrics/BlockNesting: 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 Style/BracesAroundHashParameters: Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9624f5f8..984ff321 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,137 +1,476 @@ -# This configuration was generated by `rubocop --auto-gen-config` -# on 2014-07-21 12:48:09 +0200 using RuboCop version 0.24.1. +# This configuration was generated by +# `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 # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # 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. +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. -Style/ClassCheck: +# SupportedStyles: strict, flexible +Rails/Date: Enabled: false -# Offense count: 8 -# Configuration parameters: CountComments. -Style/ClassLength: - Max: 524 +# Offense count: 1 +# Cop supports --auto-correct. +Rails/Delegate: + 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 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 # Cop supports --auto-correct. -# Configuration parameters: PreferredMethods. -Style/CollectionMethods: - Enabled: false +Style/ColonMethodCall: + Exclude: + - 'app/models/commercial.rb' + - 'app/models/contact.rb' # Offense count: 1 # Cop supports --auto-correct. -Style/ColonMethodCall: - Enabled: false - -# Offense count: 4 # Configuration parameters: Keywords. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW Style/CommentAnnotation: - Enabled: false + Exclude: + - 'app/models/event_user.rb' -# Offense count: 4 +# Offense count: 17 # Cop supports --auto-correct. 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 -Style/CyclomaticComplexity: - Max: 16 - -# Offense count: 5 +# Offense count: 7 # Cop supports --auto-correct. -Style/DeprecatedHashMethods: - Enabled: false +# Configuration parameters: SingleLineConditionsOnly. +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: Enabled: false -# Offense count: 150 +# Offense count: 74 +# Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: leading, trailing Style/DotPosition: Enabled: false -# Offense count: 9 +# Offense count: 5 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 # Offense count: 1 -# Configuration parameters: Exclude. -Style/FileName: +# Cop supports --auto-correct. +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 -# Offense count: 8 +# Offense count: 6 # Configuration parameters: MinBodyLength. 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. Style/IfUnlessModifier: Enabled: false # Offense count: 2 # Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_brackets Style/IndentArray: Enabled: false -# Offense count: 8 +# Offense count: 5 # 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: Enabled: false -# Offense count: 2 +# Offense count: 3 # Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: normal, rails 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. +# Configuration parameters: Width. 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 # 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. +# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline Style/MethodDefParentheses: Enabled: false -# Offense count: 68 -# Configuration parameters: CountComments. -Style/MethodLength: - Max: 134 - -# Offense count: 14 +# Offense count: 5 # 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 -# Offense count: 18 -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Offense count: 26 +# 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: Enabled: false @@ -140,132 +479,249 @@ Style/Next: Style/NumericLiterals: MinDigits: 15 -# Offense count: 1 +# Offense count: 3 +Style/OptionalArguments: + Exclude: + - 'app/models/event.rb' + +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: AllowSafeAssignment. 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. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: - Enabled: false + Exclude: + - 'app/serializers/event_serializer.rb' # Offense count: 2 -# Configuration parameters: NamePrefixBlacklist. +# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. +# NamePrefix: is_, has_, have_ +# NamePrefixBlacklist: is_, has_, have_ +# NameWhitelist: is_a? Style/PredicateName: - Enabled: false + Exclude: + - 'app/models/comment.rb' + - 'app/models/contact.rb' -# Offense count: 3 +# Offense count: 6 # Configuration parameters: SupportedStyles. +# SupportedStyles: compact, exploded Style/RaiseArgs: EnforcedStyle: compact -# Offense count: 3 +# Offense count: 1 # Cop supports --auto-correct. 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. # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: - Enabled: false + Exclude: + - 'app/helpers/application_helper.rb' -# Offense count: 8 +# Offense count: 61 # Cop supports --auto-correct. 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 -# Configuration parameters: MaxSlashes. +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. +# SupportedStyles: slashes, percent_r, mixed Style/RegexpLiteral: - Enabled: false - -# Offense count: 1 -Style/SelfAssignment: - Enabled: false + Exclude: + - 'Guardfile' # Offense count: 3 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/SignalException: - Enabled: false +Style/SelfAssignment: + Exclude: + - 'app/models/event.rb' + - 'db/migrate/20141104131625_generate_username.rb' + - 'spec/support/save_feature_failures.rb' # Offense count: 1 -# Configuration parameters: Methods. -Style/SingleLineBlockParams: - Enabled: false +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: only_raise, only_fail, semantic +Style/SignalException: + Exclude: + - 'spec/support/flash.rb' # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: AllowIfMethodIsEmpty. Style/SingleLineMethods: - Enabled: false + Exclude: + - 'Guardfile' -# Offense count: 285 +# Offense count: 1 # Cop supports --auto-correct. -Style/SingleSpaceBeforeFirstArg: - Enabled: false - -# Offense count: 4 -# Cop supports --auto-correct. -Style/SpaceAfterComma: - Enabled: false +# Configuration parameters: EnforcedStyleInsidePipes, SupportedStyles. +# SupportedStyles: space, no_space +Style/SpaceAroundBlockParameters: + Exclude: + - 'app/helpers/application_helper.rb' # Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: space, no_space Style/SpaceAroundEqualsInParameterDefault: Enabled: false -# Offense count: 5 +# Offense count: 12 # Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. 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 # Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/SpaceBeforeBlockBraces: - Enabled: false +# Configuration parameters: AllowForAlignment. +Style/SpaceBeforeFirstArg: + Exclude: + - 'app/controllers/conference_registrations_controller.rb' + - 'spec/factories/splashpages.rb' # Offense count: 1 # Cop supports --auto-correct. Style/SpaceBeforeSemicolon: - Enabled: false + Exclude: + - 'Guardfile' -# Offense count: 6 +# Offense count: 36 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. +# SupportedStyles: space, no_space Style/SpaceInsideBlockBraces: Enabled: false -# Offense count: 4 +# Offense count: 17 # Cop supports --auto-correct. 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. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles. +# SupportedStyles: space, no_space Style/SpaceInsideHashLiteralBraces: Enabled: false # Offense count: 1 -Style/Tab: - Enabled: false +# Cop supports --auto-correct. +# 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. -Style/TrailingComma: - Enabled: false +# SupportedStyles: comma, consistent_comma, no_comma +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 # Cop supports --auto-correct. -Style/WordArray: - MinSize: 5 +Style/UnneededInterpolation: + 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: - Enabled: false +# Offense count: 3 +# 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' diff --git a/Gemfile.lock b/Gemfile.lock index 3a8441ae..669b82ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -65,7 +65,7 @@ GEM user_agent_parser uuidtools arel (6.0.3) - ast (2.0.0) + ast (2.2.0) autoprefixer-rails (5.1.9) execjs json @@ -286,9 +286,8 @@ GEM cocaine (~> 0.5.5) mime-types mimemagic (= 0.3.0) - parser (2.2.0.pre.3) - ast (>= 1.1, < 3.0) - slop (~> 3.4, >= 3.4.5) + parser (2.3.0.3) + ast (~> 2.2) pdf-core (0.2.5) phantomjs (1.9.7.1) piwik_analytics (1.0.2) @@ -300,7 +299,7 @@ GEM cliver (~> 0.3.1) multi_json (~> 1.0) websocket-driver (>= 0.2.0) - powerpack (0.0.9) + powerpack (0.1.1) prawn (1.0.0) pdf-core (~> 0.2.2) ttfunk (~> 1.1.1) @@ -357,7 +356,7 @@ GEM activesupport (= 4.2.5.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.0.0) + rainbow (2.1.0) rake (10.5.0) rb-fsevent (0.9.4) rb-inotify (0.9.4) @@ -402,15 +401,15 @@ GEM rspec-mocks (~> 3.0.0) rspec-support (~> 3.0.0) rspec-support (3.0.2) - rubocop (0.24.1) - json (>= 1.7.7, < 2) - parser (>= 2.2.0.pre.3, < 3.0) - powerpack (~> 0.0.6) + rubocop (0.37.0) + parser (>= 2.3.0.2, < 3.0) + powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.4) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 0.3) ruby-oembed (0.8.14) ruby-openid (2.5.0) - ruby-progressbar (1.5.1) + ruby-progressbar (1.7.5) rubyzip (1.0.0) sass (3.2.19) sass-rails (4.0.4) @@ -457,6 +456,7 @@ GEM uglifier (2.5.0) execjs (>= 0.3.0) json (>= 1.8.0) + unicode-display_width (0.3.1) user_agent_parser (2.1.5) uuidtools (2.1.5) warden (1.2.4) diff --git a/app/models/conference.rb b/app/models/conference.rb index 5b595f5e..ac0a849f 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -1,6 +1,5 @@ ## # This class represents a conference -# rubocop:disable Style/ClassLength class Conference < ActiveRecord::Base require 'uri' serialize :events_per_week, Hash diff --git a/spec/features/omniauth_spec.rb b/spec/features/omniauth_spec.rb index 93ccd4a4..94949d58 100644 --- a/spec/features/omniauth_spec.rb +++ b/spec/features/omniauth_spec.rb @@ -46,7 +46,7 @@ feature Openid do click_link 'omniauth-google' end - expect(flash).to eq("Could not authenticate you from Google because \"Invalid credentials\".") + expect(flash).to eq('Could not authenticate you from Google because "Invalid credentials".') end scenario 'adds openid to existing user' do