diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bc6bff45b..5ca38a76c 100755 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,7 @@ on: - staging - development - g24-patch + - smofcon40 tags: - 'v*' workflow_dispatch: diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..7c90d4770 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,11 @@ +inherit_from: .rubocop_todo.yml + +require: + - rubocop-rails + - rubocop-rspec + +Layout/EndOfLine: + EnforcedStyle: lf + +AllCops: + NewCops: enable \ No newline at end of file diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 000000000..3e6a13ab7 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,2034 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2023-11-27 01:47:51 UTC using RuboCop version 1.56.2. +# 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: 13 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'Gemfile' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +FactoryBot/IdSequence: + Exclude: + - 'spec/factories/session_assignment_role_type.rb' + +# Offense count: 89 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/ArgumentAlignment: + Enabled: false + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleAlignWith. +# SupportedStylesAlignWith: either, start_of_block, start_of_line +Layout/BlockAlignment: + Exclude: + - 'app/models/person_schedule.rb' + +# Offense count: 22 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth. +# SupportedStyles: case, end +Layout/CaseIndentation: + Exclude: + - 'app/models/survey/response.rb' + - 'db/migrate/20220303175113_old_role_to_con_role.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 60 +# This cop supports safe autocorrection (--autocorrect). +Layout/ClosingParenthesisIndentation: + Enabled: false + +# Offense count: 13 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment. +Layout/CommentIndentation: + Exclude: + - 'app/controllers/conflicts/session_conflicts_controller.rb' + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/models/session.rb' + - 'app/serializers/conclar/session_serializer.rb' + - 'app/serializers/session_area_serializer.rb' + - 'db/seeds/development/userdev.seeds.rb' + - 'db/seeds/staging/userstag.seeds.rb' + - 'db/seeds/test/usertest.seeds.rb' + - 'spec/spec_helper.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleAlignWith, Severity. +# SupportedStylesAlignWith: start_of_line, def +Layout/DefEndAlignment: + Exclude: + - 'app/controllers/sessions_controller.rb' + +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: leading, trailing +Layout/DotPosition: + Exclude: + - 'app/controllers/reports_controller.rb' + - 'config/initializers/00_snake_case.rb' + +# Offense count: 8 +# This cop supports safe autocorrection (--autocorrect). +Layout/ElseAlignment: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/publications_controller.rb' + - 'app/services/publication_service.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 29 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowBorderComment, AllowMarginComment. +Layout/EmptyComment: + Enabled: false + +# Offense count: 15 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLineAfterGuardClause: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/integrations_reports_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/policies/survey/submission_policy.rb' + - 'app/services/access_control_service.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLineAfterMagicComment: + Exclude: + - 'app/models/concerns/password_archivable.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines. +Layout/EmptyLineBetweenDefs: + Exclude: + - 'app/controllers/reports/conflict_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/controllers/tags_controller.rb' + - 'app/models/email_address.rb' + - 'app/models/publication_date.rb' + - 'db/migrate/20220510015131_update_rooms_fields.rb' + +# Offense count: 51 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLines: + Enabled: false + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: around, only_before +Layout/EmptyLinesAroundAccessModifier: + Exclude: + - 'app/controllers/people/sessions_controller.rb' + - 'app/controllers/people/unlocks_controller.rb' + - 'lib/strategies/clyde.rb' + +# Offense count: 22 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, no_empty_lines +Layout/EmptyLinesAroundBlockBody: + Enabled: false + +# Offense count: 24 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only +Layout/EmptyLinesAroundClassBody: + Enabled: false + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLinesAroundMethodBody: + Exclude: + - 'app/controllers/mailings_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/session_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'db/migrate/20210626162611_fix_people_name_columns.rb' + - 'db/migrate/20211213180751_merge_template_into_mailing.rb' + - 'db/migrate/20220714124706_create_person_schedule_approvals.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines +Layout/EmptyLinesAroundModuleBody: + Exclude: + - 'app/lib/formatter/person_schedule.rb' + - 'app/services/change_service.rb' + - 'app/services/publication_service.rb' + - 'app/services/reports_service.rb' + - 'app/services/snapshot_service.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleAlignWith, Severity. +# SupportedStylesAlignWith: keyword, variable, start_of_line +Layout/EndAlignment: + Exclude: + - 'app/controllers/auth/omniauth_callbacks_controller.rb' + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/publications_controller.rb' + - 'app/controllers/schedule_workflows_controller.rb' + - 'app/models/survey/response.rb' + - 'app/services/publication_service.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 24 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. +Layout/ExtraSpacing: + Enabled: false + +# Offense count: 80 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses +Layout/FirstArgumentIndentation: + Enabled: false + +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_brackets +Layout/FirstArrayElementIndentation: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/models/session_assignment.rb' + - 'lib/tasks/chicon.rake' + +# Offense count: 131 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_braces +Layout/FirstHashElementIndentation: + Exclude: + - 'app/controllers/availabilities_controller.rb' + - 'app/controllers/person_exclusions_controller.rb' + - 'app/serializers/person_schedule_approval_serializer.rb' + - 'app/serializers/person_serializer.rb' + - 'app/serializers/schedule_workflow_serializer.rb' + - 'app/services/airmeet_api_service.rb' + - 'lib/tasks/chicon_airmeet.rake' + - 'lib/tasks/import.rake' + - 'lib/tasks/rbac.rake' + +# Offense count: 135 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/HashAlignment: + Enabled: false + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: normal, indented_internal_methods +Layout/IndentationConsistency: + Exclude: + - 'app/controllers/sessions_controller.rb' + +# Offense count: 52 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. +Layout/LeadingCommentSpace: + Enabled: false + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Layout/LeadingEmptyLines: + Exclude: + - 'config/initializers/taggable.rb' + - 'db/migrate/20220612135253_room_conflicts_view.rb' + - 'db/migrate/20220613171929_person_sched_conflicts_view.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineArrayBraceLayout: + Exclude: + - 'app/controllers/reports_controller.rb' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineHashBraceLayout: + Exclude: + - 'app/serializers/integration_serializer.rb' + - 'app/services/airmeet_api_service.rb' + - 'lib/tasks/parameters.rake' + +# Offense count: 14 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineMethodCallBraceLayout: + Exclude: + - 'app/controllers/agreements_controller.rb' + - 'app/controllers/availabilities_controller.rb' + - 'app/controllers/integrations_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/person_exclusions_controller.rb' + - 'app/controllers/sessions_controller.rb' + +# Offense count: 297 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented, indented_relative_to_receiver +Layout/MultilineMethodCallIndentation: + Enabled: false + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/MultilineOperationIndentation: + Exclude: + - 'app/controllers/sessions_controller.rb' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Layout/SpaceAfterColon: + Exclude: + - 'app/controllers/login_controller.rb' + - 'app/serializers/person_serializer.rb' + +# Offense count: 42 +# This cop supports safe autocorrection (--autocorrect). +Layout/SpaceAfterComma: + Enabled: false + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Layout/SpaceAfterMethodName: + Exclude: + - 'app/models/survey/question.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleInsidePipes. +# SupportedStylesInsidePipes: space, no_space +Layout/SpaceAroundBlockParameters: + Exclude: + - 'app/services/airmeet_api_service.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +Layout/SpaceAroundEqualsInParameterDefault: + Exclude: + - 'app/models/person.rb' + +# Offense count: 27 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. +# SupportedStylesForExponentOperator: space, no_space +Layout/SpaceAroundOperators: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/reports_service.rb' + - 'config/environments/production.rb' + - 'config/environments/staging.rb' + - 'db/seeds/development/survey.seeds.rb' + - 'db/seeds/test/survey.seeds.rb' + - 'lib/tasks/chicon.rake' + - 'lib/tasks/submission.rake' + +# Offense count: 91 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceBeforeBlockBraces: + Enabled: false + +# Offense count: 12 +# This cop supports safe autocorrection (--autocorrect). +Layout/SpaceBeforeComma: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/services/access_control_service.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/change_service.rb' + - 'app/services/mail_service.rb' + - 'db/migrate/20220213221552_move_bio_to_person.rb' + - 'db/migrate/20220427170202_relax_setup_constraint.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment. +Layout/SpaceBeforeFirstArg: + Exclude: + - 'app/models/person.rb' + - 'app/models/schedule_workflow.rb' + - 'app/models/session_limit.rb' + - 'app/serializers/person_serializer.rb' + +# Offense count: 75 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: require_no_space, require_space +Layout/SpaceInLambdaLiteral: + Enabled: false + +# Offense count: 11 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideArrayLiteralBrackets: + Exclude: + - 'app/controllers/mailings_controller.rb' + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/lib/planorama_devise_failure.rb' + - 'config/environments/production.rb' + - 'config/environments/staging.rb' + - 'lib/tasks/docker.rake' + +# Offense count: 181 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideBlockBraces: + Enabled: false + +# Offense count: 289 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideHashLiteralBraces: + Enabled: false + +# Offense count: 11 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, compact, no_space +Layout/SpaceInsideParens: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/models/published_session.rb' + - 'app/models/session.rb' + - 'app/models/survey/question.rb' + - 'app/services/change_service.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Layout/SpaceInsidePercentLiteralDelimiters: + Exclude: + - 'app/models/session_assignment.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideReferenceBrackets: + Exclude: + - 'app/models/survey/question.rb' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: final_newline, final_blank_line +Layout/TrailingEmptyLines: + Exclude: + - 'db/migrate/20220512004401_update_room_set_field.rb' + - 'db/seeds/area.seeds.rb' + - 'db/seeds/development/format.seeds.rb' + - 'db/seeds/development/room.seeds.rb' + - 'lib/tasks/chicon_airmeet.rake' + +# Offense count: 75 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowInHeredoc. +Layout/TrailingWhitespace: + Enabled: false + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods, AllowedPatterns. +Lint/AmbiguousBlockAssociation: + Exclude: + - 'app/controllers/application_roles_controller.rb' + - 'app/controllers/mailings_controller.rb' + - 'app/controllers/surveys_controller.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Lint/AmbiguousOperator: + Exclude: + - 'lib/tasks/docker.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Lint/AmbiguousOperatorPrecedence: + Exclude: + - 'app/controllers/reports/schedule_reports_controller.rb' + +# Offense count: 35 +# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. +Lint/DuplicateBranch: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/models/survey/response.rb' + - 'app/services/mail_service.rb' + - 'config/initializers/logger.rb' + - 'lib/tasks/submission.rake' + - 'lib/tasks/survey.rake' + +# Offense count: 19 +# Configuration parameters: AllowComments, AllowEmptyLambdas. +Lint/EmptyBlock: + Enabled: false + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Lint/ErbNewArguments: + Exclude: + - 'app/services/mail_service.rb' + +# Offense count: 1 +Lint/IneffectiveAccessModifier: + Exclude: + - 'app/models/survey/response.rb' + +# Offense count: 2 +Lint/LiteralAsCondition: + Exclude: + - 'db/seeds/development/survey.seeds.rb' + - 'db/seeds/test/survey.seeds.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Lint/NonDeterministicRequireOrder: + Exclude: + - 'spec/rails_helper.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Lint/ParenthesesAsGroupedExpression: + Exclude: + - 'app/controllers/reports/integrations_reports_controller.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods. +# AllowedMethods: present?, blank?, presence, presence_in, try, try!, in? +Lint/SafeNavigationChain: + Exclude: + - 'app/services/clyde_service.rb' + +# Offense count: 2 +Lint/ShadowingOuterLocalVariable: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + +# Offense count: 808 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: strict, consistent +Lint/SymbolConversion: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/services/policy_service.rb' + - 'lib/tasks/rbac.rake' + - 'spec/requests/survey_pages_requests_spec.rb' + +# Offense count: 3 +# Configuration parameters: AllowKeywordBlockArguments. +Lint/UnderscorePrefixedVariableName: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 20 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Exclude: + - 'app/models/person_schedule.rb' + - 'app/services/access_control_service.rb' + - 'app/services/change_service.rb' + - 'db/seeds/development/survey.seeds.rb' + - 'db/seeds/development/venue.seeds.rb' + - 'db/seeds/test/survey.seeds.rb' + - 'lib/tasks/docker.rake' + - 'lib/tasks/import.rake' + - 'lib/tasks/submission.rake' + - 'lib/tasks/survey.rake' + +# Offense count: 15 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. +Lint/UnusedMethodArgument: + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/people/unlocks_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/models/person.rb' + - 'app/services/publication_service.rb' + - 'app/services/session_service.rb' + - 'app/services/xml_formatter.rb' + +# Offense count: 1 +Lint/UriEscapeUnescape: + Exclude: + - 'spec/requests/page_contents_spec.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods. +Lint/UselessAccessModifier: + Exclude: + - 'app/models/survey/response.rb' + +# Offense count: 44 +# This cop supports unsafe autocorrection (--autocorrect-all). +Lint/UselessAssignment: + Enabled: false + +# Offense count: 154 +# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. +Metrics/AbcSize: + Max: 169 + +# Offense count: 50 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. +# AllowedMethods: refine +Metrics/BlockLength: + Max: 958 + +# Offense count: 12 +# Configuration parameters: CountBlocks. +Metrics/BlockNesting: + Max: 6 + +# Offense count: 19 +# Configuration parameters: CountComments, CountAsOne. +Metrics/ClassLength: + Max: 514 + +# Offense count: 50 +# Configuration parameters: AllowedMethods, AllowedPatterns. +Metrics/CyclomaticComplexity: + Max: 44 + +# Offense count: 248 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. +Metrics/MethodLength: + Max: 329 + +# Offense count: 11 +# Configuration parameters: CountComments, CountAsOne. +Metrics/ModuleLength: + Max: 595 + +# Offense count: 5 +# Configuration parameters: CountKeywordArgs, MaxOptionalParameters. +Metrics/ParameterLists: + Max: 11 + +# Offense count: 39 +# Configuration parameters: AllowedMethods, AllowedPatterns. +Metrics/PerceivedComplexity: + Max: 46 + +# Offense count: 4 +Naming/AccessorMethodName: + Exclude: + - 'app/controllers/people/sessions_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/lib/erb_namespace.rb' + - 'app/services/airmeet_api_service.rb' + +# Offense count: 2 +# Configuration parameters: EnforcedStyle, AllowedPatterns. +# SupportedStyles: snake_case, camelCase +Naming/MethodName: + Exclude: + - 'app/services/snapshot_service.rb' + +# Offense count: 12 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to +Naming/MethodParameterName: + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/services/airmeet_api_service.rb' + +# Offense count: 2 +# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. +# NamePrefix: is_, has_, have_ +# ForbiddenPrefixes: is_, has_, have_ +# AllowedMethods: is_a? +# MethodDefinitionMacros: define_method, define_singleton_method +Naming/PredicateName: + Exclude: + - 'app/controllers/sessions_controller.rb' + - 'app/policies/session_policy.rb' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: PreferredName. +Naming/RescuedExceptionsVariableName: + Exclude: + - 'app/services/airmeet_api_service.rb' + - 'app/services/mail_service.rb' + - 'app/workers/mailing_worker.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 20 +# Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns. +# SupportedStyles: snake_case, camelCase +Naming/VariableName: + Exclude: + - 'app/models/survey/question.rb' + - 'app/services/airmeet_api_service.rb' + +# Offense count: 5 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/BeEq: + Exclude: + - 'spec/models/survey_spec.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: be, be_nil +RSpec/BeNil: + Exclude: + - 'spec/models/person_spec.rb' + - 'spec/requests/people_requests_spec.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: be_a, be_kind_of +RSpec/ClassCheck: + Exclude: + - 'spec/requests/people_requests_spec.rb' + +# Offense count: 13 +# Configuration parameters: Prefixes, AllowedPatterns. +# Prefixes: when, with, without +RSpec/ContextWording: + Exclude: + - 'spec/models/person_spec.rb' + - 'spec/models/room_spec.rb' + - 'spec/models/session_assignment_role_type_spec.rb' + - 'spec/models/session_spec.rb' + - 'spec/models/survey_spec.rb' + - 'spec/models/venue_spec.rb' + +# Offense count: 14 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: SkipBlocks, EnforcedStyle. +# SupportedStyles: described_class, explicit +RSpec/DescribedClass: + Exclude: + - 'spec/models/session_assignment_role_type_spec.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowConsecutiveOneLiners. +RSpec/EmptyLineAfterExample: + Exclude: + - 'spec/models/person_spec.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +RSpec/Eq: + Exclude: + - 'spec/requests/email_requests_spec.rb' + - 'spec/requests/people_requests_spec.rb' + +# Offense count: 9 +# Configuration parameters: CountAsOne. +RSpec/ExampleLength: + Max: 24 + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples. +# DisallowedExamples: works +RSpec/ExampleWording: + Exclude: + - 'spec/models/person_spec.rb' + +# Offense count: 4 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. +# Include: **/*_spec*rb*, **/spec/**/* +RSpec/FilePath: + Exclude: + - 'spec/models/person_spec.rb' + - 'spec/models/room_spec.rb' + - 'spec/models/session_spec.rb' + - 'spec/models/venue_spec.rb' + +# Offense count: 26 +RSpec/MultipleExpectations: + Max: 7 + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: not_to, to_not +RSpec/NotToNot: + Exclude: + - 'spec/models/person_spec.rb' + - 'spec/models/room_spec.rb' + - 'spec/models/session_assignment_role_type_spec.rb' + - 'spec/models/session_spec.rb' + +# Offense count: 13 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: numeric, symbolic, be_status +RSpec/Rails/HttpStatus: + Exclude: + - 'spec/requests/email_requests_spec.rb' + - 'spec/requests/page_contents_spec.rb' + - 'spec/requests/people_requests_spec.rb' + - 'spec/requests/survey_pages_requests_spec.rb' + - 'spec/requests/survey_requests_spec.rb' + +# Offense count: 8 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Inferences. +RSpec/Rails/InferredSpecType: + Exclude: + - 'spec/helpers/integrations_helper_spec.rb' + - 'spec/models/integration_spec.rb' + - 'spec/requests/email_requests_spec.rb' + - 'spec/requests/integrations_spec.rb' + - 'spec/requests/page_contents_spec.rb' + - 'spec/requests/people_requests_spec.rb' + - 'spec/requests/survey_pages_requests_spec.rb' + - 'spec/requests/survey_requests_spec.rb' + +# Offense count: 4 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - 'spec/models/person_spec.rb' + - 'spec/models/room_spec.rb' + - 'spec/models/session_spec.rb' + - 'spec/models/venue_spec.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/ActiveRecordAliases: + Exclude: + - 'app/models/survey/question.rb' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/ActiveRecordCallbacksOrder: + Exclude: + - 'app/models/person.rb' + - 'app/models/survey.rb' + - 'app/models/survey/answer.rb' + - 'app/models/survey/page.rb' + - 'app/models/survey/question.rb' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Include. +# Include: db/**/*.rb +Rails/AddColumnIndex: + Exclude: + - 'db/migrate/20210626162611_fix_people_name_columns.rb' + - 'db/migrate/20231101143131_add_reg_id_to_person.rb' + +# Offense count: 14 +# This cop supports safe autocorrection (--autocorrect). +Rails/BelongsTo: + Exclude: + - 'app/models/mailing.rb' + - 'app/models/published_session.rb' + - 'app/models/published_session_assignment.rb' + - 'app/models/schedule_workflow.rb' + - 'app/models/session.rb' + - 'app/models/session_assignment.rb' + - 'app/models/survey.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. +Rails/Blank: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + +# Offense count: 33 +# Configuration parameters: Database, Include. +# SupportedDatabases: mysql, postgresql +# Include: db/**/*.rb +Rails/BulkChangeTable: + Enabled: false + +# Offense count: 42 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Whitelist, AllowedMethods, AllowedReceivers. +# Whitelist: find_by_sql, find_by_token_for +# AllowedMethods: find_by_sql, find_by_token_for +# AllowedReceivers: Gem::Specification, page +Rails/DynamicFindBy: + Exclude: + - 'db/seeds/area.seeds.rb' + - 'db/seeds/development/format.seeds.rb' + - 'db/seeds/development/room.seeds.rb' + - 'db/seeds/development/room_service.seeds.rb' + - 'db/seeds/development/session.seeds.rb' + - 'db/seeds/format.seeds.rb' + - 'db/seeds/venue.seeds.rb' + - 'lib/tasks/chicon.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Rails/EagerEvaluationLogMessage: + Exclude: + - 'app/models/survey/response.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: slashes, arguments +Rails/FilePath: + Exclude: + - 'app/services/xml_formatter.rb' + - 'config/environments/development.rb' + - 'config/initializers/logger.rb' + - 'spec/rails_helper.rb' + +# Offense count: 4 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedMethods, AllowedPatterns. +# AllowedMethods: order, limit, select, lock +Rails/FindEach: + Exclude: + - 'app/controllers/settings_controller.rb' + - 'db/migrate/20210819204542_add_jti_columns.rb' + - 'db/migrate/20220303175113_old_role_to_con_role.rb' + - 'lib/tasks/mailing.rake' + +# Offense count: 8 +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/HasAndBelongsToMany: + Exclude: + - 'app/models/application_role.rb' + - 'app/models/exclusion.rb' + - 'app/models/person.rb' + - 'app/models/room_service.rb' + - 'app/models/session.rb' + - 'app/models/survey.rb' + +# Offense count: 39 +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/HasManyOrHasOneDependent: + Enabled: false + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: numeric, symbolic +Rails/HttpStatus: + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/controllers/session_assignments_controller.rb' + +# Offense count: 27 +# Configuration parameters: IgnoreScopes, Include. +# Include: app/models/**/*.rb +Rails/InverseOf: + Exclude: + - 'app/models/parameter_name.rb' + - 'app/models/person.rb' + - 'app/models/person_schedule.rb' + - 'app/models/published_session.rb' + - 'app/models/registration/registration_map_count.rb' + - 'app/models/registration/registration_map_people_count.rb' + - 'app/models/registration/registration_map_reg_count.rb' + - 'app/models/registration/registration_sync_match.rb' + - 'app/models/registration_sync_datum.rb' + - 'app/models/session.rb' + - 'app/models/survey/answer.rb' + - 'app/models/survey/page.rb' + - 'app/models/survey/question.rb' + - 'app/models/survey/response.rb' + - 'app/models/tag_context.rb' + +# Offense count: 2 +# Configuration parameters: Include. +# Include: app/controllers/**/*.rb, app/mailers/**/*.rb +Rails/LexicallyScopedActionFilter: + Exclude: + - 'app/controllers/page_contents_controller.rb' + - 'app/controllers/people/passwords_controller.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/NegateInclude: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/reports/integrations_reports_controller.rb' + +# Offense count: 2 +# Configuration parameters: Database, Include. +# SupportedDatabases: mysql +# Include: db/**/*.rb +Rails/NotNullColumn: + Exclude: + - 'db/migrate/20210620011503_adjust_responses.rb' + - 'db/migrate/20220426010537_add_room_set_to_rooms.rb' + +# Offense count: 61 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Include. +# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb +Rails/Output: + Enabled: false + +# Offense count: 9 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/Pluck: + Exclude: + - 'app/controllers/application_roles_controller.rb' + - 'app/controllers/mailings_controller.rb' + - 'app/controllers/surveys_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/models/survey/response.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: conservative, aggressive +Rails/PluckInWhere: + Exclude: + - 'app/controllers/reports/session_reports_controller.rb' + - 'app/workers/registration_sync_worker.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +Rails/PluralizationGrammar: + Exclude: + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/controllers/schedule_controller.rb' + - 'config/initializers/devise.rb' + +# Offense count: 37 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. +Rails/Present: + Exclude: + - 'app/controllers/auth/omniauth_callbacks_controller.rb' + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/login_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/people_reports_controller.rb' + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/models/survey/response.rb' + - 'app/serializers/conclar/participant_serializer.rb' + - 'app/serializers/person_serializer.rb' + - 'app/services/identity_service.rb' + - 'app/workers/mailing_worker.rb' + +# Offense count: 12 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Include. +# Include: **/Rakefile, **/*.rake +Rails/RakeEnvironment: + Exclude: + - 'lib/tasks/auto_annotate_models.rake' + - 'lib/tasks/db_missing.rake' + - 'lib/tasks/docker.rake' + +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +Rails/RedundantForeignKey: + Exclude: + - 'app/models/survey/answer.rb' + - 'app/models/survey/page.rb' + - 'app/models/survey/question.rb' + - 'app/models/survey/response.rb' + - 'app/models/survey/submission.rb' + +# Offense count: 4 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/RedundantPresenceValidationOnBelongsTo: + Exclude: + - 'app/models/availability.rb' + - 'app/models/person_exclusion.rb' + - 'app/models/session_limit.rb' + +# Offense count: 7 +# Configuration parameters: Include. +# Include: db/**/*.rb +Rails/ReversibleMigration: + Exclude: + - 'db/migrate/20210522203951_remove_survey_groups.rb' + - 'db/migrate/20211213180751_merge_template_into_mailing.rb' + - 'db/migrate/20220208222821_fix_parameter_names.rb' + - 'db/migrate/20220410221341_up_field_sizes.rb' + - 'db/migrate/20220723213605_fix_proofed_col.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/RootPathnameMethods: + Exclude: + - 'lib/tasks/docker.rake' + +# Offense count: 12 +# Configuration parameters: ForbiddenMethods, AllowedMethods. +# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all +Rails/SkipsModelValidations: + Exclude: + - 'app/models/email_address.rb' + - 'app/models/survey.rb' + - 'app/models/survey/page.rb' + - 'app/services/airmeet_api_service.rb' + - 'db/migrate/20210819204542_add_jti_columns.rb' + - 'db/seeds/test/survey.seeds.rb' + - 'lib/tasks/chicon.rake' + +# Offense count: 89 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/SquishedSQLHeredocs: + Enabled: false + +# Offense count: 45 +# Configuration parameters: Include. +# Include: db/**/*.rb +Rails/ThreeStateBooleanColumn: + Enabled: false + +# Offense count: 71 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: strict, flexible +Rails/TimeZone: + Enabled: false + +# Offense count: 1 +# Configuration parameters: TransactionMethods. +Rails/TransactionExitStatement: + Exclude: + - 'lib/tasks/submission.rake' + +# Offense count: 15 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/Validation: + Exclude: + - 'app/models/conflict_exception.rb' + - 'app/models/publication_status.rb' + - 'app/models/publish_snapshot.rb' + - 'app/models/room_set.rb' + - 'app/models/schedule_snapshot.rb' + - 'app/models/session.rb' + - 'app/models/session_area.rb' + - 'app/models/session_assignment.rb' + - 'app/models/survey/question.rb' + - 'app/models/venue.rb' + +# Offense count: 36 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/WhereEquals: + Enabled: false + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: exists, where +Rails/WhereExists: + Exclude: + - 'app/models/concerns/password_archivable.rb' + - 'app/models/format.rb' + +# Offense count: 28 +# This cop supports safe autocorrection (--autocorrect). +Rails/WhereNot: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/reports/session_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/models/email_address.rb' + - 'app/models/person.rb' + - 'app/models/survey/question.rb' + - 'app/services/publication_service.rb' + - 'app/services/reports_service.rb' + - 'app/services/session_service.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: prefer_alias, prefer_alias_method +Style/Alias: + Exclude: + - 'app/models/published_session_assignment.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, conditionals +Style/AndOr: + Exclude: + - 'app/serializers/conclar/participant_serializer.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: percent_q, bare_percent +Style/BarePercentLiterals: + Exclude: + - 'db/migrate/20210123191007_ensure_sort_no_default.rb' + - 'db/migrate/20210320194037_remove_unwanted_sort_default_vals.rb' + +# Offense count: 13 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. +# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces +# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object +# FunctionalMethods: let, let!, subject, watch +# AllowedMethods: lambda, proc, it +Style/BlockDelimiters: + Exclude: + - 'app/serializers/plano/serializer.rb' + - 'app/serializers/survey/submission_xls_serializer.rb' + - 'spec/requests/email_requests_spec.rb' + - 'spec/requests/page_contents_spec.rb' + - 'spec/requests/people_requests_spec.rb' + - 'spec/requests/survey_pages_requests_spec.rb' + - 'spec/requests/survey_requests_spec.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowOnConstant, AllowOnSelfClass. +Style/CaseEquality: + Exclude: + - 'app/serializers/integration_serializer.rb' + - 'app/services/airmeet_api_service.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: MinBranchesCount. +Style/CaseLikeIf: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 59 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: nested, compact +Style/ClassAndModuleChildren: + Enabled: false + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: is_a?, kind_of? +Style/ClassCheck: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods, AllowedPatterns. +# AllowedMethods: ==, equal?, eql? +Style/ClassEqualityComparison: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/policies/base_policy.rb' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +Style/ColonMethodCall: + Exclude: + - 'app/controllers/rbac_controller.rb' + - 'app/controllers/reports/conflict_reports_controller.rb' + - 'app/models/session_assignment.rb' + - 'app/services/mail_service.rb' + - 'db/seeds/development/agreement.seeds.rb' + +# Offense count: 13 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Keywords, RequireColon. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE +Style/CommentAnnotation: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/published_sessions_controller.rb' + - 'app/models/person.rb' + - 'app/models/survey.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/mail_service.rb' + - 'app/services/reports_service.rb' + - 'app/workers/mailing_worker.rb' + - 'db/migrate/20220818200500_create_integrations.rb' + - 'spec/factories/person.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CommentedKeyword: + Exclude: + - 'app/models/survey/question.rb' + - 'app/serializers/person_serializer.rb' + - 'app/serializers/survey/submission_xls_serializer.rb' + +# Offense count: 8 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/ConcatArrayLiterals: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/services/change_service.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. +# SupportedStyles: assign_to_condition, assign_inside_condition +Style/ConditionalAssignment: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/models/application_role.rb' + - 'app/models/survey/response.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/policy_service.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/DefWithParentheses: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 315 +# Configuration parameters: AllowedConstants. +Style/Documentation: + Enabled: false + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Style/EachWithObject: + Exclude: + - 'app/services/airmeet_api_service.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Style/EmptyCaseCondition: + Exclude: + - 'db/seeds/development/survey.seeds.rb' + - 'db/seeds/test/survey.seeds.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, AllowComments. +# SupportedStyles: empty, nil, both +Style/EmptyElse: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/models/survey/response.rb' + - 'app/serializers/conclar/participant_serializer.rb' + - 'app/serializers/conclar/session_serializer.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 8 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: compact, expanded +Style/EmptyMethod: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'db/migrate/20220614014103_fix_conflict_view.rb' + +# Offense count: 21 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedVars. +Style/FetchEnvVar: + Exclude: + - 'app/controllers/login_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/settings_controller.rb' + - 'app/mailers/application_mailer.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/url_service.rb' + - 'app/workers/registration_sync_worker.rb' + - 'config/initializers/devise.rb' + - 'config/initializers/mailer.rb' + - 'config/initializers/omniauth.rb' + - 'lib/tasks/docker.rake' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: each, for +Style/For: + Exclude: + - 'app/workers/registration_sync_worker.rb' + +# Offense count: 552 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, always_true, never +Style/FrozenStringLiteralComment: + Enabled: false + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/GlobalStdStream: + Exclude: + - 'config/environments/production.rb' + - 'config/environments/staging.rb' + +# Offense count: 44 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. +Style/GuardClause: + Enabled: false + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowSplatArgument. +Style/HashConversion: + Exclude: + - 'app/models/survey/question.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedReceivers. +# AllowedReceivers: Thread.current +Style/HashEachMethods: + Exclude: + - 'db/seeds/development/agreement.seeds.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +# SupportedShorthandSyntax: always, never, either, consistent +Style/HashSyntax: + Exclude: + - 'app/models/survey/question.rb' + - 'db/migrate/20220301184226_fields_for_people.rb' + - 'lib/tasks/docker.rake' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/IdenticalConditionalBranches: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowIfModifier. +Style/IfInsideElse: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/policies/planner_policy.rb' + - 'app/services/change_service.rb' + +# Offense count: 60 +# This cop supports safe autocorrection (--autocorrect). +Style/IfUnlessModifier: + Enabled: false + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +Style/KeywordParametersOrder: + Exclude: + - 'app/services/access_control_service.rb' + - 'app/services/mail_service.rb' + +# Offense count: 83 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: line_count_dependent, lambda, literal +Style/Lambda: + Enabled: false + +# Offense count: 23 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods, AllowedPatterns. +Style/MethodCallWithoutArgsParentheses: + Exclude: + - 'app/controllers/agreements_controller.rb' + - 'app/controllers/availabilities_controller.rb' + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/conflicts/session_conflicts_controller.rb' + - 'app/controllers/integrations_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/person_exclusions_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/reports_service.rb' + - 'db/seeds/development/survey.seeds.rb' + - 'db/seeds/test/survey.seeds.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/MultilineIfThen: + Exclude: + - 'app/controllers/login_controller.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowMethodComparison, ComparisonsThreshold. +Style/MultipleComparison: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 10 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: literals, strict +Style/MutableConstant: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/controllers/publication_dates_controller.rb' + - 'app/controllers/rooms_controller.rb' + - 'app/controllers/schedule_workflows_controller.rb' + - 'app/controllers/submission/responses_controller.rb' + - 'app/controllers/survey/page/question/answers_controller.rb' + - 'app/controllers/survey/pages_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'config/initializers/sidekiq.rb' + +# Offense count: 30 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: both, prefix, postfix +Style/NegatedIf: + Enabled: false + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +Style/NegatedIfElseCondition: + Exclude: + - 'app/controllers/auth/omniauth_callbacks_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/integrations_reports_controller.rb' + - 'lib/tasks/import.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods. +# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with +Style/NestedParenthesizedCalls: + Exclude: + - 'app/services/reports_service.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, MinBodyLength. +# SupportedStyles: skip_modifier_ifs, always +Style/Next: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/integrations_reports_controller.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/services/change_service.rb' + - 'lib/tasks/chicon.rake' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: predicate, comparison +Style/NilComparison: + Exclude: + - 'app/controllers/login_controller.rb' + - 'app/models/session_limit.rb' + - 'app/services/publication_service.rb' + - 'app/workers/publication_worker.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: IncludeSemanticChanges. +Style/NonNilCheck: + Exclude: + - 'app/services/mail_service.rb' + +# Offense count: 23 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns. +Style/NumericLiterals: + MinDigits: 7 + +# Offense count: 41 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns. +# SupportedStyles: predicate, comparison +Style/NumericPredicate: + Enabled: false + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AlwaysCorrectToMultiline. +Style/OneLineConditional: + Exclude: + - 'app/controllers/reports_controller.rb' + +# Offense count: 1 +Style/OptionalArguments: + Exclude: + - 'app/lib/active_model/xls_serializer_methods.rb' + +# Offense count: 3 +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'app/services/airmeet_api_service.rb' + - 'app/workers/mailing_worker.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/OrAssignment: + Exclude: + - 'lib/tasks/mailing.rake' + +# Offense count: 11 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. +Style/ParenthesesAroundCondition: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/login_controller.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'app/workers/registration_sync_worker.rb' + +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Exclude: + - 'Guardfile' + - 'app/models/session_assignment.rb' + - 'db/migrate/20210613204940_create_versions.rb' + - 'db/migrate/20220404140435_add_people_versions.rb' + - 'db/migrate/20220404140458_add_survey_versions.rb' + - 'db/migrate/20220404142002_add_session_versions.rb' + - 'db/migrate/20220404142017_add_published_session_versions.rb' + - 'db/migrate/20220501200956_person_role_to_app_role.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: short, verbose +Style/PreferredHashMethods: + Exclude: + - 'app/controllers/sessions_controller.rb' + +# Offense count: 22 +# This cop supports safe autocorrection (--autocorrect). +Style/Proc: + Exclude: + - 'app/mailers/application_mailer.rb' + - 'app/serializers/conflicts/session_conflict_serializer.rb' + - 'app/serializers/email_address_serializer.rb' + - 'app/serializers/mailing_serializer.rb' + - 'app/serializers/person_serializer.rb' + - 'app/serializers/plano/serializer.rb' + - 'app/serializers/session_assignment_serializer.rb' + - 'app/serializers/session_limit_serializer.rb' + - 'app/serializers/session_serializer.rb' + - 'app/serializers/survey/response_serializer.rb' + - 'app/serializers/survey_serializer.rb' + +# Offense count: 805 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: same_as_string_literals, single_quotes, double_quotes +Style/QuotedSymbols: + Exclude: + - 'app/services/airmeet_api_service.rb' + - 'lib/tasks/rbac.rake' + - 'spec/requests/survey_pages_requests_spec.rb' + +# Offense count: 8 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantAssignment: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/services/clyde_service.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantBegin: + Exclude: + - 'app/services/airmeet_api_service.rb' + - 'lib/tasks/db_missing.rake' + +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantCondition: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/reports/session_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'app/services/access_control_service.rb' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantConstantBase: + Exclude: + - 'config/environments/production.rb' + - 'config/environments/staging.rb' + - 'spec/rails_helper.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: SafeForConstants. +Style/RedundantFetchBlock: + Exclude: + - 'config/initializers/mailer.rb' + - 'config/puma.rb' + +# Offense count: 35 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/RedundantInterpolation: + Exclude: + - 'app/controllers/agreements_controller.rb' + - 'app/controllers/availabilities_controller.rb' + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/conflicts/session_conflicts_controller.rb' + - 'app/controllers/integrations_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/person_exclusions_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'app/models/survey/response.rb' + - 'spec/factories/person.rb' + - 'spec/requests/survey_pages_requests_spec.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantParentheses: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'app/models/room_set.rb' + - 'app/policies/base_policy.rb' + +# Offense count: 14 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantPercentQ: + Exclude: + - 'app/controllers/reports/people_reports_controller.rb' + - 'db/migrate/20201229161025_add_people_generated_cols.rb' + - 'db/migrate/20210123191007_ensure_sort_no_default.rb' + - 'db/migrate/20210320194037_remove_unwanted_sort_default_vals.rb' + - 'db/migrate/20210607020926_fix_people_generated_cols.rb' + - 'db/migrate/20220202144414_make_open_bool.rb' + - 'db/migrate/20220213221552_move_bio_to_person.rb' + +# Offense count: 30 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantRegexpArgument: + Exclude: + - 'app/controllers/publications_controller.rb' + +# Offense count: 63 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantRegexpEscape: + Exclude: + - 'app/controllers/publications_controller.rb' + +# Offense count: 25 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowMultipleReturnValues. +Style/RedundantReturn: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + - 'app/controllers/people/sessions_controller.rb' + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/controllers/session_assignments_controller.rb' + - 'app/controllers/survey/submissions_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/lib/formatter/person_schedule.rb' + - 'app/policies/submission/response_policy.rb' + - 'app/policies/survey/submission_policy.rb' + - 'app/policies/survey_policy.rb' + - 'app/services/access_control_service.rb' + - 'app/services/change_service.rb' + - 'app/services/mail_service.rb' + - 'app/services/session_service.rb' + +# Offense count: 106 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantSelf: + Enabled: false + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/RedundantSelfAssignment: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 17 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, AllowInnerSlashes. +# SupportedStyles: slashes, percent_r, mixed +Style/RegexpLiteral: + Exclude: + - 'app/controllers/publications_controller.rb' + - 'config/routes.rb' + +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: implicit, explicit +Style/RescueStandardError: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/snapshot_service.rb' + - 'app/workers/mailing_worker.rb' + - 'lib/tasks/db_missing.rake' + - 'lib/tasks/submission.rake' + +# Offense count: 19 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. +# AllowedMethods: present?, blank?, presence, try, try! +Style/SafeNavigation: + Exclude: + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/serializers/conclar/session_serializer.rb' + - 'app/serializers/person_schedule_serializer.rb' + - 'app/serializers/survey/submission_flat_serializer.rb' + - 'app/serializers/survey/submission_serializer.rb' + - 'app/serializers/survey/submission_xls_serializer.rb' + - 'app/services/access_control_service.rb' + - 'app/services/change_service.rb' + - 'app/services/config_service.rb' + - 'app/services/publication_service.rb' + - 'app/workers/mailing_worker.rb' + - 'lib/tasks/parameters.rake' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Style/SelfAssignment: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/services/access_control_service.rb' + +# Offense count: 16 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowAsExpressionSeparator. +Style/Semicolon: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/controllers/published_sessions_controller.rb' + - 'app/services/airmeet_api_service.rb' + - 'db/seeds/development/survey.seeds.rb' + - 'db/seeds/test/survey.seeds.rb' + - 'lib/tasks/import.rake' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/SlicingWithRange: + Exclude: + - 'app/models/survey/response.rb' + +# Offense count: 15 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowModifier. +Style/SoleNestedConditional: + Exclude: + - 'app/controllers/sessions_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/models/session.rb' + - 'app/models/session_assignment.rb' + - 'app/models/session_limit.rb' + - 'app/models/survey/answer.rb' + - 'app/policies/base_policy.rb' + - 'app/policies/survey_policy.rb' + - 'app/services/access_control_service.rb' + - 'app/services/change_service.rb' + - 'app/services/identity_service.rb' + +# Offense count: 15 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Mode. +Style/StringConcatenation: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/lib/active_model/xls_serializer_factory.rb' + - 'db/seeds/development/person.seeds.rb' + - 'db/seeds/development/room.seeds.rb' + - 'db/seeds/development/venue.seeds.rb' + - 'db/seeds/test/person.seeds.rb' + - 'spec/factories/venue.rb' + +# Offense count: 1046 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Enabled: false + +# Offense count: 83 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: . +# SupportedStyles: percent, brackets +Style/SymbolArray: + EnforcedStyle: percent + MinSize: 14 + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +Style/SymbolLiteral: + Exclude: + - 'app/controllers/concerns/resource_methods.rb' + +# Offense count: 20 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments. +# AllowedMethods: define_method, mail, respond_to +Style/SymbolProc: + Exclude: + - 'app/controllers/mailings_controller.rb' + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/settings_controller.rb' + - 'app/lib/active_model/xls_serializer_methods.rb' + - 'app/serializers/session_serializer.rb' + - 'app/services/airmeet_api_service.rb' + - 'app/services/change_service.rb' + - 'app/services/reports_service.rb' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, AllowSafeAssignment. +# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex +Style/TernaryParentheses: + Exclude: + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/models/survey/question.rb' + - 'app/serializers/session_serializer.rb' + - 'app/services/session_service.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInArguments: + Exclude: + - 'app/controllers/reports/conflict_reports_controller.rb' + - 'lib/tasks/submission.rake' + +# Offense count: 17 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInArrayLiteral: + Exclude: + - 'app/controllers/reports/conflict_reports_controller.rb' + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/reports/schedule_reports_controller.rb' + - 'app/controllers/reports/session_reports_controller.rb' + - 'app/controllers/reports_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/controllers/settings_controller.rb' + - 'lib/tasks/chicon.rake' + +# Offense count: 11 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInHashLiteral: + Exclude: + - 'Guardfile' + - 'app/controllers/settings_controller.rb' + - 'app/services/airmeet_api_service.rb' + - 'lib/tasks/rbac.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods. +# AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym +Style/TrivialAccessors: + Exclude: + - 'app/serializers/survey/submission_xls_serializer.rb' + +# Offense count: 45 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: WordRegex. +# SupportedStyles: percent, brackets +Style/WordArray: + EnforcedStyle: percent + MinSize: 6 + +# Offense count: 8 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/ZeroLengthPredicate: + Exclude: + - 'app/controllers/people_controller.rb' + - 'app/controllers/reports/program_ops_reports_controller.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/controllers/settings_controller.rb' + - 'app/models/person.rb' + +# Offense count: 236 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. +# URISchemes: http, https +Layout/LineLength: + Max: 467 diff --git a/Gemfile b/Gemfile index bbc19fd4f..1d735d10b 100644 --- a/Gemfile +++ b/Gemfile @@ -98,9 +98,12 @@ group :development do gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' gem 'rubocop' + gem 'rubocop-rails' + gem 'rubocop-rspec' gem 'guard' gem 'guard-livereload' gem 'rack-livereload' + gem 'annotate' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index c700f667a..ad1406db6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,42 +3,42 @@ GEM specs: aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + actioncable (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionmailbox (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (>= 2.7.1) - actionmailer (6.1.7.3) - actionpack (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionmailer (6.1.7.6) + actionpack (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7.3) - actionview (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionpack (6.1.7.6) + actionview (= 6.1.7.6) + activesupport (= 6.1.7.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actionpack-action_caching (1.2.2) actionpack (>= 4.0.0) - actiontext (6.1.7.3) - actionpack (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actiontext (6.1.7.6) + actionpack (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) nokogiri (>= 1.8.5) - actionview (6.1.7.3) - activesupport (= 6.1.7.3) + actionview (6.1.7.6) + activesupport (= 6.1.7.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -48,25 +48,25 @@ GEM activemodel (>= 4.1, < 7.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (6.1.7.3) - activesupport (= 6.1.7.3) + activejob (6.1.7.6) + activesupport (= 6.1.7.6) globalid (>= 0.3.6) - activemodel (6.1.7.3) - activesupport (= 6.1.7.3) - activerecord (6.1.7.3) - activemodel (= 6.1.7.3) - activesupport (= 6.1.7.3) + activemodel (6.1.7.6) + activesupport (= 6.1.7.6) + activerecord (6.1.7.6) + activemodel (= 6.1.7.6) + activesupport (= 6.1.7.6) activerecord-postgres_enum (2.0.1) activerecord (>= 5.2) pg - activestorage (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activesupport (= 6.1.7.3) + activestorage (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activesupport (= 6.1.7.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.3) + activesupport (6.1.7.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -74,10 +74,14 @@ GEM zeitwerk (~> 2.3) acts-as-taggable-on (9.0.1) activerecord (>= 6.0, < 7.1) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) + annotate (3.2.0) + activerecord (>= 3.2, < 8.0) + rake (>= 10.4, < 14.0) ast (2.4.2) - bcrypt (3.1.18) + base64 (0.1.1) + bcrypt (3.1.19) bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) @@ -87,7 +91,7 @@ GEM bundler (>= 1.2.0, < 3) thor (~> 1.0) byebug (11.1.3) - capybara (3.39.1) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -121,26 +125,28 @@ GEM et-orbi (1.2.7) tzinfo eventmachine (1.2.7) + eventmachine (1.2.7-x64-mingw32) factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (3.2.0) + faker (3.2.1) i18n (>= 1.8.11, < 2) - faraday (2.7.6) + faraday (2.7.10) faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) fast_excel (0.4.1) ffi (> 1.9, < 2) ffi (1.15.5) + ffi (1.15.5-x64-mingw32) formatador (1.1.0) fugit (1.8.1) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) - globalid (1.1.0) - activesupport (>= 5.0) + globalid (1.2.1) + activesupport (>= 6.1) guard (2.18.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) @@ -175,7 +181,7 @@ GEM jsonapi.rb (2.0.1) jsonapi-serializer rack - jwt (2.7.0) + jwt (2.7.1) kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -188,13 +194,14 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) + language_server-protocol (3.17.0.3) listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lumberjack (1.2.8) + lumberjack (1.2.9) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -203,14 +210,14 @@ GEM marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.18.0) - msgpack (1.7.1) + mini_mime (1.1.5) + mini_portile2 (2.8.4) + minitest (5.20.0) + msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) nenv (0.3.0) - net-imap (0.3.4) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -223,12 +230,14 @@ GEM activerecord (>= 4.0.0) activesupport (>= 4.0.0) nio4r (2.5.9) - nokogiri (1.15.2) + nokogiri (1.15.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.2-x86_64-darwin) + nokogiri (1.15.4-x64-mingw32) + racc (~> 1.4) + nokogiri (1.15.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.2-x86_64-linux) + nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -258,60 +267,62 @@ GEM parser (3.2.2.3) ast (~> 2.4.1) racc - pg (1.5.3) + pg (1.5.4) + pg (1.5.4-x64-mingw32) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.1) - puma (6.3.0) + public_suffix (5.0.3) + puma (6.3.1) nio4r (~> 2.0) - pundit (2.3.0) + pundit (2.3.1) activesupport (>= 3.0.0) pwned (2.4.1) raabro (1.4.0) - racc (1.7.0) - rack (2.2.7) + racc (1.7.1) + rack (2.2.8) rack-cors (2.0.1) rack (>= 2.0.0) rack-livereload (0.5.1) rack - rack-protection (3.0.6) - rack - rack-proxy (0.7.6) + rack-protection (3.1.0) + rack (~> 2.2, >= 2.2.4) + rack-proxy (0.7.7) rack rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.3) - actioncable (= 6.1.7.3) - actionmailbox (= 6.1.7.3) - actionmailer (= 6.1.7.3) - actionpack (= 6.1.7.3) - actiontext (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activemodel (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + rails (6.1.7.6) + actioncable (= 6.1.7.6) + actionmailbox (= 6.1.7.6) + actionmailer (= 6.1.7.6) + actionpack (= 6.1.7.6) + actiontext (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activemodel (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) bundler (>= 1.15.0) - railties (= 6.1.7.3) + railties (= 6.1.7.6) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + railties (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) method_source rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) rake (13.0.6) - ranked-model (0.4.8) - activerecord (>= 4.2) + ranked-model (0.4.9) + activerecord (>= 5.2) ransack (4.0.0) activerecord (>= 6.1.5) activesupport (>= 6.1.5) @@ -319,16 +330,16 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - recaptcha (5.14.0) - redis-client (0.14.1) + recaptcha (5.15.0) + redis-client (0.17.0) connection_pool - regexp_parser (2.8.0) + regexp_parser (2.8.1) request_store (1.5.1) rack (>= 1.4) responders (3.1.0) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) + rexml (3.2.6) roo (2.8.3) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) @@ -341,7 +352,7 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-rails (6.0.3) @@ -352,19 +363,33 @@ GEM rspec-expectations (~> 3.12) rspec-mocks (~> 3.12) rspec-support (~> 3.12) - rspec-support (3.12.0) - rubocop (1.52.0) + rspec-support (3.12.1) + rubocop (1.56.2) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) + rubocop-capybara (2.19.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.24.0) + rubocop (~> 1.33) + rubocop-rails (2.22.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) ruby_audit (2.2.0) @@ -376,6 +401,8 @@ GEM sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) ffi (~> 1.9) + sassc (2.4.0-x64-mingw32) + ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) @@ -390,7 +417,7 @@ GEM websocket (~> 1.0) semantic_range (3.0.0) shellany (0.0.1) - sidekiq (7.1.1) + sidekiq (7.1.2) concurrent-ruby (< 2) connection_pool (>= 2.3.0) rack (>= 2.2.4) @@ -408,7 +435,7 @@ GEM spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.2.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) @@ -417,46 +444,50 @@ GEM sprockets (>= 3.0.0) thor (1.2.2) tilt (2.2.0) - timeout (0.3.2) - truemail (3.0.8) + timeout (0.4.0) + truemail (3.0.9) simpleidn (~> 0.2.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + tzinfo-data (1.2023.3) + tzinfo (>= 1.0.0) unf (0.1.4) unf_ext unf_ext (0.0.8.2) + unf_ext (0.0.8.2-x64-mingw32) unicode-display_width (2.4.2) version_gem (1.1.3) warden (1.2.9) rack (>= 2.0.9) - web-console (4.2.0) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdack-uuid_migration (1.4.0) + webdack-uuid_migration (1.5.0) activerecord (>= 4.0) - webdrivers (5.2.0) + webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) + selenium-webdriver (~> 4.0, < 4.11) webpacker (5.4.4) activesupport (>= 5.2) rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) websocket (1.2.9) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) with_advisory_lock (4.6.0) activerecord (>= 4.2) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.11) PLATFORMS ruby + x64-mingw32 x86_64-darwin-20 x86_64-linux x86_64-linux-musl @@ -467,6 +498,7 @@ DEPENDENCIES active_model_serializers (~> 0.10.0) activerecord-postgres_enum acts-as-taggable-on (~> 9.0) + annotate bootsnap (>= 1.4.4) brakeman bundler-audit @@ -508,6 +540,8 @@ DEPENDENCIES rspec rspec-rails rubocop + rubocop-rails + rubocop-rspec ruby_audit sass-rails (>= 6) seedbank diff --git a/README.md b/README.md index e503be2a4..2bd4807d7 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,28 @@ NOTE: the docker image will use the files from the project directory. So editing those files will affect what is running in docker (and most changes can be seen by refreshing the page you are working on) +### Using Task + +If you'd rather not type out docker commands, you can use [Task](https://taskfile.dev/) instead. +First [install](https://taskfile.dev/installation/) it on your machine, then run `task -l` from the repo root +to see all commands available. There are commands for starting and stopping services, as well as for doing various +steps in the ruby dev process like `task bundle-install` and `task migrate-dev`. All these commands are set up to +run in the docker environment. + +### Using Rubocop + +Currently rubocop is only run manually. You can run it manually with either `rubocop` or `task rubocop`. Note: +If you are on windows, and are doing rubocop autocorrect, only use the task version of the commands, otherwise +carriage returns will be inserted. + +Useful commands: +- `task rubocop -- --autocorrect` (`task rubocop -- -a`) +- `task rubocop -- --regenerate-todo` +- `task rubocop` + +Entries in `.rubocop.todo.yml` should (over time) either be corrected or moved to `.rubocop.yml` +if it's a choice we want to keep. + ## Running tests Assuming you have your local environment going, the easiest way is to run them on docker: diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 000000000..4a263fd20 --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,55 @@ +version: '3' + +tasks: + build: + desc: build the planorama container + cmds: + - docker-compose -f docker-compose-dev.yml build planorama + quickstart: + desc: 'start docker services without any building. Call as + task quickstart -- service_name to start just one service' + cmds: + - docker-compose -f docker-compose-dev.yml up -d {{.CLI_ARGS}} + start: + desc: 'build and start docker services. Use as + task start -- service_name + to start a specific service' + cmds: + - docker-compose -f docker-compose-dev.yml up --build -d {{.CLI_ARGS}} + restart: + desc: 'use without arguments to restart all services, or call as + task restart -- service_name + to restart a specific service' + cmds: + - docker-compose -f docker-compose-dev.yml restart {{.CLI_ARGS}} + stop: + desc: 'use without arguments to stop all services, or call as + task stop -- service_name to stop a specific service' + cmds: + - docker-compose -f docker-compose-dev.yml down {{.CLI_ARGS}} + bundle-install: + desc: runs bundle install in a docker container + cmds: + - docker-compose -f docker-compose-dev.yml run --rm --no-deps planorama bundle install + migrate-dev: + desc: Applies any new migrations to dev database + deps: + - task: quickstart + vars: { CLI_ARGS: 'postgres' } + - task: build + cmds: + - docker-compose -f docker-compose-dev.yml run --rm --no-deps planorama bin/rails db:migrate {{.CLI_ARGS}} + psql: + desc: gives you a psql shell against the running dev database + dotenv: + - '.envrc' + cmds: + - docker-compose -f docker-compose-dev.yml exec postgres psql -U $POSTGRES_USER -d planorama_development + rails-console: + desc: runs a rails console in the docker environment + cmds: + - docker-compose -f docker-compose-dev.yml run --rm --no-deps planorama bin/rails c + rubocop: + desc: runs rubocop commands in docker environment + cmds: + - docker-compose -f docker-compose-dev.yml run --rm --no-deps planorama bundle exec rubocop {{.CLI_ARGS}} \ No newline at end of file diff --git a/app/controllers/auth/omniauth_callbacks_controller.rb b/app/controllers/auth/omniauth_callbacks_controller.rb index 2ea33866f..68dc6e349 100644 --- a/app/controllers/auth/omniauth_callbacks_controller.rb +++ b/app/controllers/auth/omniauth_callbacks_controller.rb @@ -17,7 +17,7 @@ def create # Get the Identity based on the Oauth service # Add in other cases as they are created identity = if provider == 'clyde' - IdentityService.from_clyde(auth_info: auth_info, current_person: current_person) + IdentityService.from_clyde(auth_info: auth_info, current_person: current_person) end # sign in as the person for Plano diff --git a/app/controllers/concerns/resource_methods.rb b/app/controllers/concerns/resource_methods.rb index 62df5a612..a979963ce 100644 --- a/app/controllers/concerns/resource_methods.rb +++ b/app/controllers/concerns/resource_methods.rb @@ -287,7 +287,7 @@ def query_part(filter:) key, operation, value = query col_table = if (key.include?('responses.')) - Arel::Table.new('survey_responses') + Arel::Table.new('survey_responses') else get_table(column: key) end diff --git a/app/controllers/people/sessions_controller.rb b/app/controllers/people/sessions_controller.rb index 38f14f98a..c66279ef0 100644 --- a/app/controllers/people/sessions_controller.rb +++ b/app/controllers/people/sessions_controller.rb @@ -9,13 +9,13 @@ def get_session end private - def respond_with(resource, _opts = {}) - super unless resource.id + def respond_with(resource, _opts = {}) + super unless resource.id - if resource.id - render json: { - message: 'You are logged in.' - }, status: :ok - end + if resource.id + render json: { + message: 'You are logged in.' + }, status: :ok end + end end diff --git a/app/controllers/people/unlocks_controller.rb b/app/controllers/people/unlocks_controller.rb index c6ec1a49c..010b0d384 100644 --- a/app/controllers/people/unlocks_controller.rb +++ b/app/controllers/people/unlocks_controller.rb @@ -5,7 +5,7 @@ class People::UnlocksController < Devise::UnlocksController respond_to :json private - def respond_with(resource, _opts = {}) - redirect_to "/#/login" - end + def respond_with(resource, _opts = {}) + redirect_to "/#/login" + end end diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 87044d98d..fce2fdd3e 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -52,12 +52,10 @@ def unlink_registration person = Person.find params[:person_id] raise "No such person" unless person - # Remove the Oauth identity and all registration information + # Remove the Oauth identity person.oauth_identities.delete_all - person.registration_number = nil - person.registered = false - person.registration_type = nil - person.save! + # But we want to keep the Reg info if there is any + # for admin and planners to see (not speakers) render_object(person) end diff --git a/app/controllers/publications_controller.rb b/app/controllers/publications_controller.rb index b16e5e419..5cfc9f41b 100644 --- a/app/controllers/publications_controller.rb +++ b/app/controllers/publications_controller.rb @@ -4,7 +4,7 @@ class PublicationsController < ApplicationController def schedule # use published if any otherwise use live sessions = if PublishedSession.count > 0 - SessionService.published_sessions + SessionService.published_sessions else SessionService.live_sessions end diff --git a/app/controllers/reports/session_reports_controller.rb b/app/controllers/reports/session_reports_controller.rb index 58e2b2d01..4b052d2c9 100644 --- a/app/controllers/reports/session_reports_controller.rb +++ b/app/controllers/reports/session_reports_controller.rb @@ -382,15 +382,15 @@ def invited_accepted_not_scheduled ) people.each do |person| - worksheet.append_row( - [ - person.name, - person.published_name, - person.con_state, - person.attendance_type, - person.bio - ] - ) + worksheet.append_row( + [ + person.name, + person.published_name, + person.con_state, + person.attendance_type, + person.bio + ] + ) end send_data workbook.read_string, diff --git a/app/controllers/schedule_workflows_controller.rb b/app/controllers/schedule_workflows_controller.rb index 63972da90..15f6c0a71 100644 --- a/app/controllers/schedule_workflows_controller.rb +++ b/app/controllers/schedule_workflows_controller.rb @@ -18,11 +18,11 @@ def reset # ie on save def before_save @snapshot = if @object.state == 'draft' - ScheduleSnapshot.create!( - label: 'draft', - created_by: current_person.name, - started_at: Time.now - ) + ScheduleSnapshot.create!( + label: 'draft', + created_by: current_person.name, + started_at: Time.now + ) end @object.created_by = current_person.name diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 67f1aa5db..ee3fbd2ed 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -12,10 +12,10 @@ def schedule_publish render status: :ok, json: {}.to_json, content_type: 'application/json' end -def has_open_for_interest + def has_open_for_interest authorize current_person, policy_class: policy_class - render json: {open_for_interest: Session.where(open_for_interest: true).count() > 0} - end + render json: {open_for_interest: Session.where(open_for_interest: true).count() > 0} + end # Mass update for the sessions (given ids and params) def update_all diff --git a/app/controllers/surveys_controller.rb b/app/controllers/surveys_controller.rb index 313fa195f..b159ec7f4 100644 --- a/app/controllers/surveys_controller.rb +++ b/app/controllers/surveys_controller.rb @@ -127,6 +127,7 @@ def allowed_params allow_submission_edits pages pages_attributes + unique_submission ] # << [ # pages_attributes: %i[ diff --git a/app/javascript/constants/strings.js b/app/javascript/constants/strings.js index f4fd52f69..70068b7f8 100644 --- a/app/javascript/constants/strings.js +++ b/app/javascript/constants/strings.js @@ -192,6 +192,19 @@ module.exports = { willing_to_moderate: "Moderation interest", languages_fluent_in: "Fluent languages", contact_email: "Contact email", + twitter: "Twitter", + facebook: "Facebook", + website: "Website", + instagram: "Instagram", + twitch: "Twitch", + youtube: "YouTube", + tiktok: "TikTok", + linkedin: "LinkedIn", + flickr: "Flickr", + reddit: "Reddit", + othersocialmedia: "Other Social Media", + socialmedia: "Social Media", + can_share: "Permission to share email with participants" }, }, nLines, @@ -231,6 +244,8 @@ module.exports = { youtube: "YouTube", tiktok: "TikTok", linkedin: "LinkedIn", + flickr: "Flickr", + reddit: "Reddit", othersocialmedia: "Other", do_not_assign_with: "Anyone that should not be assigned to be on a panel with participant", is_local: "Local to the event", diff --git a/app/javascript/profile/person_demographics.vue b/app/javascript/profile/person_demographics.vue index 49f9a5bd2..34df6750a 100644 --- a/app/javascript/profile/person_demographics.vue +++ b/app/javascript/profile/person_demographics.vue @@ -4,12 +4,12 @@