diff --git a/.github/workflows/build_app.yml b/.github/workflows/build_app.yml index c45a6fdc..78cf3a38 100644 --- a/.github/workflows/build_app.yml +++ b/.github/workflows/build_app.yml @@ -3,12 +3,12 @@ on: inputs: ruby_version: description: 'Ruby Version' - default: "3.2.2" + default: "3.3.4" type: string required: false node_version: description: 'Node version' - default: '18.17.1' + default: '22.14.0' required: false type: string jobs: @@ -55,6 +55,10 @@ jobs: - run: bundle exec rake test_app name: Create test app shell: "bash" + - run: | + rm -f ./spec/decidim_dummy_app/app/services/dummy_signature_handler.rb + rm -f ./spec/decidim_dummy_app/app/services/dummy_sms_mobile_phone_validator.rb + name: Remove Initiative-dependent dummy files - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots name: Create the screenshots folder shell: "bash" diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 97217cb1..aea16b31 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -6,6 +6,7 @@ on: - main - release/* - "*-stable" + - "*bump*" pull_request: branches-ignore: - "chore/l10n*" @@ -15,8 +16,8 @@ on: env: CI: "true" - RUBY_VERSION: 3.2.2 - NODE_VERSION: 18.17.1 + RUBY_VERSION: 3.3.4 + NODE_VERSION: 22.14.0 concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/test_app.yml b/.github/workflows/test_app.yml index fa96241f..aa05ce42 100644 --- a/.github/workflows/test_app.yml +++ b/.github/workflows/test_app.yml @@ -3,7 +3,7 @@ on: inputs: ruby_version: description: 'Ruby Version' - default: "3.2.2" + default: "3.3.4" required: false type: string test_command: diff --git a/.rubocop.yml b/.rubocop.yml index b901a133..3c248c62 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,12 @@ -inherit_from: https://raw.githubusercontent.com/decidim/decidim/release/0.28-stable/.rubocop.yml +plugins: + - rubocop-factory_bot + +inherit_from: + - .rubocop_ruby.yml + - .rubocop_rails.yml AllCops: + TargetRubyVersion: 3.3 Include: - "**/*.rb" - "**/*.rake" @@ -8,13 +14,12 @@ AllCops: - "**/Gemfile" - "**/Rakefile" Exclude: - - "development_app/**/*" - - "spec/decidim_dummy_app/**/*" - - "bin/**/*" - "node_modules/**/*" - "db/schema.rb" - "vendor/**/*" + - "spec/decidim_dummy_app/**/*" + - "development_app/**/*" -RSpec/FilePath: +RSpec/DescribeClass: Exclude: - - "spec/serializers/user_export_serializer_spec.rb" + - spec/system/* \ No newline at end of file diff --git a/.rubocop_rails.yml b/.rubocop_rails.yml new file mode 100644 index 00000000..2d81effa --- /dev/null +++ b/.rubocop_rails.yml @@ -0,0 +1,97 @@ +plugins: + - rubocop-rails + +Rails: + Enabled: true + +Rails/ActionFilter: + Include: + - decidim-*/app/controllers/**/*.rb + +Rails/ContentTag: + Enabled: false + +Rails/CreateTableWithTimestamps: + Enabled: false + +Rails/EnumUniqueness: + Include: + - decidim-*/app/models/**/*.rb + +Rails/Exit: + Include: + - decidim-*/app/**/*.rb + - decidim-*/config/**/*.rb + - decidim-*/lib/**/*.rb + Exclude: + - decidim-*/lib/**/*.rake + +Rails/FindBy: + Include: + - "**/*.rb" + +Rails/FindEach: + Include: + - decidim-*/app/models/**/*.rb + +Rails/HasAndBelongsToMany: + Include: + - decidim-*/app/models/**/*.rb + +Rails/HasManyOrHasOneDependent: + Include: + - decidim-*/app/models/**/*.rb + +Rails/InverseOf: + Enabled: false + +Rails/LexicallyScopedActionFilter: + Include: + - decidim-*/app/controllers/**/*.rb + +Rails/NotNullColumn: + Enabled: false + +Rails/Output: + Include: + - decidim-*/app/**/*.rb + - decidim-*/config/**/*.rb + - decidim-*/db/**/*.rb + - decidim-*/lib/**/*.rb + Exclude: + - decidim-core/db/seeds.rb + - decidim-core/lib/decidim/core.rb + - decidim-core/lib/decidim/component_manifest.rb + - decidim-core/lib/decidim/participatory_space_manifest.rb + - decidim-system/db/seeds.rb + - decidim-templates/db/seeds.rb + +Rails/OutputSafety: + Enabled: false + +Rails/Pluck: + Enabled: false + +Rails/RakeEnvironment: + Enabled: false + +Rails/ReadWriteAttribute: + Include: + - decidim-*/app/models/**/*.rb + +Rails/ReversibleMigration: + Enabled: false + +Rails/ScopeArgs: + Include: + - decidim-*/app/models/**/*.rb + +Rails/SkipsModelValidations: + Enabled: true + +Rails/Validation: + Include: + - decidim-*/app/models/**/*.rb + +FactoryBot/FactoryAssociationWithStrategy: + Enabled: false diff --git a/.rubocop_ruby.yml b/.rubocop_ruby.yml new file mode 100644 index 00000000..cdc0aae4 --- /dev/null +++ b/.rubocop_ruby.yml @@ -0,0 +1,1762 @@ +plugins: + - rubocop-rspec + - rubocop-faker + +# Common configuration. +AllCops: + Include: + - .simplecov + - "**/*.rb" + - "**/*.rake" + - "**/*.gemspec" + - "**/*.ru" + - "**/Gemfile" + - "**/Rakefile" + Exclude: + - "**/vendor/**/*" + - "development_app/**/*" + - "decidim_app-design/node_modules/**/*" + - "spec/decidim_dummy_app/**/*" + - "node_modules/**/*" + # Default formatter will be used if no -f/--format option is given. + DefaultFormatter: progress + # Cop names are not displayed in offense messages by default. Change behavior + # by overriding DisplayCopNames, or by giving the -D/--display-cop-names + # option. + DisplayCopNames: true + # Style guide URLs are not displayed in offense messages by default. Change + # behavior by overriding DisplayStyleGuide, or by giving the + # -S/--display-style-guide option. + DisplayStyleGuide: false + # Extra details are not displayed in offense messages by default. Change + # behavior by overriding ExtraDetails, or by giving the + # -E/--extra-details option. + ExtraDetails: false + NewCops: enable + # Additional cops that do not reference a style guide rule may be enabled by + # default. Change behavior by overriding StyleGuideCopsOnly, or by giving + # the --only-guide-cops option. + StyleGuideCopsOnly: false + # All cops except the ones in disabled.yml are enabled by default. Change + # this behavior by overriding DisabledByDefault. When DisabledByDefault is + # true, all cops in the default configuration are disabled, and and only cops + # in user configuration are enabled. This makes cops opt-in instead of + # opt-out. Note that when DisabledByDefault is true, cops in user + # configuration will be enabled even if they don't set the Enabled parameter. + DisabledByDefault: false + # Enables the result cache if true. Can be overridden by the --cache command + # line option. + UseCache: true + # Threshold for how many files can be stored in the result cache before some + # of the files are automatically removed. + MaxFilesInCache: 20000 + # The cache will be stored in "rubocop_cache" under this directory. The name + # "/tmp" is special and will be converted to the system temporary directory, + # which is "/tmp" on Unix-like systems, but could be something else on other + # systems. + CacheRootDirectory: /tmp + # The default cache root directory is /tmp, which on most systems is + # writable by any system user. This means that it is possible for a + # malicious user to anticipate the location of Rubocop's cache directory, + # and create a symlink in its place that could cause Rubocop to overwrite + # unintended files, or read malicious input. If you are certain that your + # cache location is secure from this kind of attack, and wish to use a + # symlinked cache location, set this value to "true". + AllowSymlinksInCacheRootDirectory: true + # What MRI version of the Ruby interpreter is the inspected code intended to + # run on? (If there is more than one, set this to the lowest version.) + # If a value is specified for TargetRubyVersion then it is used. + # Else if .ruby-version exists and it contains an MRI version it is used. + # Otherwise we fallback to the oldest officially supported Ruby version (2.0). + TargetRubyVersion: 3.3.4 + +# Indent private/protected/public as deep as method definitions +Layout/AccessModifierIndentation: + EnforcedStyle: indent + SupportedStyles: + - outdent + - indent + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +Style/Alias: + EnforcedStyle: prefer_alias + SupportedStyles: + - prefer_alias + - prefer_alias_method + +# Align the elements of a hash literal if they span more than one line. +Layout/HashAlignment: + # Alignment of entries using hash rocket as separator. Valid values are: + # + # key - left alignment of keys + # "a" => 2 + # "bb" => 3 + # separator - alignment of hash rockets, keys are right aligned + # "a" => 2 + # "bb" => 3 + # table - left alignment of keys, hash rockets, and values + # "a" => 2 + # "bb" => 3 + EnforcedHashRocketStyle: key + # Alignment of entries using colon as separator. Valid values are: + # + # key - left alignment of keys + # a: 0 + # bb: 1 + # separator - alignment of colons, keys are right aligned + # a: 0 + # bb: 1 + # table - left alignment of keys and values + # a: 0 + # bb: 1 + EnforcedColonStyle: key + # Select whether hashes that are the last argument in a method call should be + # inspected? Valid values are: + # + # always_inspect - Inspect both implicit and explicit hashes. + # Registers an offense for: + # function(a: 1, + # b: 2) + # Registers an offense for: + # function({a: 1, + # b: 2}) + # always_ignore - Ignore both implicit and explicit hashes. + # Accepts: + # function(a: 1, + # b: 2) + # Accepts: + # function({a: 1, + # b: 2}) + # ignore_implicit - Ignore only implicit hashes. + # Accepts: + # function(a: 1, + # b: 2) + # Registers an offense for: + # function({a: 1, + # b: 2}) + # ignore_explicit - Ignore only explicit hashes. + # Accepts: + # function({a: 1, + # b: 2}) + # Registers an offense for: + # function(a: 1, + # b: 2) + EnforcedLastArgumentHashStyle: always_inspect + SupportedLastArgumentHashStyles: + - always_inspect + - always_ignore + - ignore_implicit + - ignore_explicit + +Layout/ParameterAlignment: + # Alignment of parameters in multi-line method calls. + # + # The `with_first_parameter` style aligns the following lines along the same + # column as the first parameter. + # + # method_call(a, + # b) + # + # The `with_fixed_indentation` style aligns the following lines with one + # level of indentation relative to the start of the line with the method call. + # + # method_call(a, + # b) + EnforcedStyle: with_first_parameter + SupportedStyles: + - with_first_parameter + - with_fixed_indentation + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +Style/ArrayCoercion: + Description: >- + Use Array() instead of explicit Array check or [*var], when dealing + with a variable you want to treat as an Array, but you're not certain it's an array. + StyleGuide: '#array-coercion' + Safe: false + Enabled: false + VersionAdded: '0.88' + +Style/AndOr: + # Whether `and` and `or` are banned only in conditionals (conditionals) + # or completely (always). + EnforcedStyle: always + SupportedStyles: + - always + - conditionals + +Style/AsciiComments: + Enabled: false + +# Checks if usage of %() or %Q() matches configuration. +Style/BarePercentLiterals: + EnforcedStyle: bare_percent + SupportedStyles: + - percent_q + - bare_percent + +Style/BlockDelimiters: + EnforcedStyle: line_count_based + SupportedStyles: + # The `line_count_based` style enforces braces around single line blocks and + # do..end around multi-line blocks. + - line_count_based + # The `semantic` style enforces braces around functional blocks, where the + # primary purpose of the block is to return a value and do..end for + # procedural blocks, where the primary purpose of the block is its + # side-effects. + # + # This looks at the usage of a block's method to determine its type (e.g. is + # the result of a `map` assigned to a variable or passed to another + # method) but exceptions are permitted in the `ProceduralMethods`, + # `FunctionalMethods` and `IgnoredMethods` sections below. + - semantic + # The `braces_for_chaining` style enforces braces around single line blocks + # and do..end around multi-line blocks, except for multi-line blocks whose + # return value is being chained with another method (in which case braces + # are enforced). + - braces_for_chaining + ProceduralMethods: + # Methods that are known to be procedural in nature but look functional from + # their usage, e.g. + # + # time = Benchmark.realtime do + # foo.bar + # end + # + # Here, the return value of the block is discarded but the return value of + # `Benchmark.realtime` is used. + - benchmark + - bm + - bmbm + - create + - each_with_object + - measure + - new + - realtime + - tap + - with_object + FunctionalMethods: + # Methods that are known to be functional in nature but look procedural from + # their usage, e.g. + # + # let(:foo) { Foo.new } + # + # Here, the return value of `Foo.new` is used to define a `foo` helper but + # doesn't appear to be used from the return value of `let`. + - let + - let! + - subject + - watch + AllowedMethods: + # Methods that can be either procedural or functional and cannot be + # categorised from their usage alone, e.g. + # + # foo = lambda do |x| + # puts "Hello, #{x}" + # end + # + # foo = lambda do |x| + # x * 100 + # end + # + # Here, it is impossible to tell from the return value of `lambda` whether + # the inner block's return value is significant. + - lambda + - proc + - it + +Style/ExplicitBlockArgument: + Enabled: false + +Style/HashEachMethods: + Enabled: false + +Style/HashLikeCase: + MinBranchesCount: 5 + +# Indentation of `when`. +Layout/CaseIndentation: + EnforcedStyle: case + SupportedStyles: + - case + - end + IndentOneStep: false + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + # This only matters if IndentOneStep is true + IndentationWidth: ~ + +Style/ClassAndModuleChildren: + Enabled: false + # Checks the style of children definitions at classes and modules. + # + # Basically there are two different styles: + # + # `nested` - have each child on a separate line + # class Foo + # class Bar + # end + # end + # + # `compact` - combine definitions as much as possible + # class Foo::Bar + # end + # + # The compact style is only forced, for classes / modules with one child. + EnforcedStyle: nested + SupportedStyles: + - nested + - compact + +Style/ClassCheck: + EnforcedStyle: is_a? + SupportedStyles: + - is_a? + - kind_of? + +# Align with the style guide. +Style/CollectionMethods: + # Mapping from undesired method to desired_method + # e.g. to use `detect` over `find`: + # + # CollectionMethods: + # PreferredMethods: + # find: detect + PreferredMethods: + collect: "map" + collect!: "map!" + inject: "reduce" + detect: "find" + find_all: "select" + +# Use ` or %x around command literals. +Style/CommandLiteral: + EnforcedStyle: backticks + # backticks: Always use backticks. + # percent_x: Always use %x. + # mixed: Use backticks on single-line commands, and %x on multi-line commands. + SupportedStyles: + - backticks + - percent_x + - mixed + # If false, the cop will always recommend using %x if one or more backticks + # are found in the command string. + AllowInnerBackticks: false + +# Checks formatting of special comments +Style/CommentAnnotation: + Keywords: + - TODO + - FIXME + - OPTIMIZE + - HACK + - REVIEW + +Style/ConditionalAssignment: + EnforcedStyle: assign_to_condition + SupportedStyles: + - assign_to_condition + - assign_inside_condition + # When configured to `assign_to_condition`, `SingleLineConditionsOnly` + # will only register an offense when all branches of a condition are + # a single line. + # When configured to `assign_inside_condition`, `SingleLineConditionsOnly` + # will only register an offense for assignment to a condition that has + # at least one multiline branch. + SingleLineConditionsOnly: true + +# Checks that you have put a copyright in a comment before any code. +# +# You can override the default Notice in your .rubocop.yml file. +# +# In order to use autocorrect, you must supply a value for the +# AutocorrectNotice key that matches the regexp Notice. A blank +# AutocorrectNotice will cause an error during autocorrect. +# +# Autocorrect will add a copyright notice in a comment at the top +# of the file immediately after any shebang or encoding comments. +# +# Example rubocop.yml: +# +# Style/Copyright: +# Enabled: true +# Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc' +# AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc." +# +Style/Copyright: + Notice: '^Copyright (\(c\) )?2[0-9]{3} .+' + AutocorrectNotice: "" + +Style/DocumentationMethod: + RequireForNonPublicMethods: false + +# Multi-line method chaining should be done with leading dots. +Layout/DotPosition: + EnforcedStyle: leading + SupportedStyles: + - leading + - trailing + +# Warn on empty else statements +# empty - warn only on empty else +# nil - warn on else with nil in it +# both - warn on empty else and else with nil in it +Style/EmptyElse: + EnforcedStyle: both + SupportedStyles: + - empty + - nil + - both + +# Use empty lines between defs. +Layout/EmptyLineBetweenDefs: + # If true, this parameter means that single line method definitions don't + # need an empty line between them. + AllowAdjacentOneLineDefs: false + +Layout/EmptyLinesAroundBlockBody: + EnforcedStyle: no_empty_lines + SupportedStyles: + - empty_lines + - no_empty_lines + +Layout/EmptyLinesAroundClassBody: + EnforcedStyle: no_empty_lines + SupportedStyles: + - empty_lines + - no_empty_lines + +Layout/EmptyLinesAroundModuleBody: + EnforcedStyle: no_empty_lines + SupportedStyles: + - empty_lines + - no_empty_lines + +# Checks whether the source file has a utf-8 encoding comment or not +# AutoCorrectEncodingComment must match the regex +# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/ +Style/Encoding: + Enabled: true + +Layout/ExtraSpacing: + # When true, allows most uses of extra spacing if the intent is to align + # things with the previous or next line, not counting empty lines or comment + # lines. + AllowForAlignment: false + # When true, forces the alignment of = in assignments on consecutive lines. + ForceEqualSignAlignment: false + +Naming/FileName: + Exclude: + - "**/Gemfile" + - "**/Rakefile" + - "**/*.gemspec" + - "decidim-dev/lib/decidim-dev.rb" + # When true, requires that each source file should define a class or module + # with a name which matches the file name (converted to ... case). + # It further expects it to be nested inside modules which match the names + # of subdirectories in its path. + ExpectMatchingDefinition: false + # If non-nil, expect all source file names to match the following regex. + # Only the file name itself is matched, not the entire file path. + # Use anchors as necessary if you want to match the entire name rather than + # just a part of it. + Regex: ~ + # With `IgnoreExecutableScripts` set to `true`, this cop does not + # report offending filenames for executable scripts (i.e. source + # files with a shebang in the first line). + IgnoreExecutableScripts: true + +Layout/FirstArgumentIndentation: + EnforcedStyle: special_for_inner_method_call_in_parentheses + SupportedStyles: + # The first parameter should always be indented one step more than the + # preceding line. + - consistent + # The first parameter should normally be indented one step more than the + # preceding line, but if it's a parameter for a method call that is itself + # a parameter in a method call, then the inner parameter should be indented + # relative to the inner method. + - special_for_inner_method_call + # Same as special_for_inner_method_call except that the special rule only + # applies if the outer method call encloses its arguments in parentheses. + - special_for_inner_method_call_in_parentheses + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +# Checks use of for or each in multiline loops. +Style/For: + EnforcedStyle: each + SupportedStyles: + - for + - each + +# Enforce the method used for string formatting. +Style/FormatString: + EnforcedStyle: format + SupportedStyles: + - format + - sprintf + - percent + +Style/FormatStringToken: + EnforcedStyle: template + +Style/FrozenStringLiteralComment: + EnforcedStyle: always + SupportedStyles: + - never + # `always` will always add the frozen string literal comment to a file + # regardless of the Ruby version or if `freeze` or `<<` are called on a + # string literal. If you run code against multiple versions of Ruby, it is + # possible that this will create errors in Ruby 2.3.0+. + - always + +# Built-in global variables are allowed by default. +Style/GlobalVars: + AllowedVariables: [] + +# `MinBodyLength` defines the number of lines of the a body of an if / unless +# needs to have to trigger this cop +Style/GuardClause: + MinBodyLength: 6 + +Style/HashSyntax: + Exclude: + - app/jobs/decidim/cleaner/clean_inactive_users_job.rb + EnforcedStyle: ruby19 + SupportedStyles: + # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys + - ruby19 + # checks for hash rocket syntax for all hashes + - hash_rockets + # forbids mixed key syntaxes (e.g. {a: 1, :b => 2}) + - no_mixed_keys + # enforces both ruby19 and no_mixed_keys styles + - ruby19_no_mixed_keys + # Force hashes that have a symbol value to use hash rockets + UseHashRocketsWithSymbolValues: false + # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style + PreferHashRocketsForNonAlnumEndingSymbols: false + +Layout/IndentationConsistency: + # The difference between `rails` and `normal` is that the `rails` style + # prescribes that in classes and modules the `protected` and `private` + # modifier keywords shall be indented the same as public methods and that + # protected and private members shall be indented one step more than the + # modifiers. Other than that, both styles mean that entities on the same + # logical depth shall have the same indentation. + EnforcedStyle: normal + SupportedStyles: + - normal + - rails + +Layout/IndentationWidth: + # Number of spaces for each indentation level. + Width: 2 + +# Checks the indentation of the first element in an array literal. +Layout/FirstArrayElementIndentation: + # The value `special_inside_parentheses` means that array literals with + # brackets that have their opening bracket on the same line as a surrounding + # opening round parenthesis, shall have their first element indented relative + # to the first position inside the parenthesis. + # + # The value `consistent` means that the indentation of the first element shall + # always be relative to the first position of the line where the opening + # bracket is. + # + # The value `align_brackets` means that the indentation of the first element + # shall always be relative to the position of the opening bracket. + EnforcedStyle: special_inside_parentheses + SupportedStyles: + - special_inside_parentheses + - consistent + - align_brackets + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +# Checks the indentation of assignment RHS, when on a different line from LHS +Layout/AssignmentIndentation: + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +# Checks the indentation of the first key in a hash literal. +Layout/FirstHashElementIndentation: + # The value `special_inside_parentheses` means that hash literals with braces + # that have their opening brace on the same line as a surrounding opening + # round parenthesis, shall have their first key indented relative to the + # first position inside the parenthesis. + # + # The value `consistent` means that the indentation of the first key shall + # always be relative to the first position of the line where the opening + # brace is. + # + # The value `align_braces` means that the indentation of the first key shall + # always be relative to the position of the opening brace. + EnforcedStyle: special_inside_parentheses + SupportedStyles: + - special_inside_parentheses + - consistent + - align_braces + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +Style/Lambda: + EnforcedStyle: line_count_dependent + SupportedStyles: + - line_count_dependent + - lambda + - literal + Exclude: + - "**/types/**/*" + - "**/*_interface.rb" + +Style/LambdaCall: + EnforcedStyle: call + SupportedStyles: + - call + - braces + +Style/Next: + # With `always` all conditions at the end of an iteration needs to be + # replaced by next - with `skip_modifier_ifs` the modifier if like this one + # are ignored: [1, 2].each { |a| return "yes" if a == 1 } + EnforcedStyle: skip_modifier_ifs + # `MinBodyLength` defines the number of lines of the a body of an if / unless + # needs to have to trigger this cop + MinBodyLength: 3 + SupportedStyles: + - skip_modifier_ifs + - always + +Style/NonNilCheck: + # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for + # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is + # **usually** OK, but might change behavior. + # + # With `IncludeSemanticChanges` set to `false`, this cop does not report + # offenses for `!x.nil?` and does no changes that might change behavior. + IncludeSemanticChanges: false + +Style/NumericPredicate: + EnforcedStyle: predicate + SupportedStyles: + - predicate + - comparison + +Style/MethodDefParentheses: + EnforcedStyle: require_parentheses + SupportedStyles: + - require_parentheses + - require_no_parentheses + - require_no_parentheses_except_multiline + +Naming/MethodName: + EnforcedStyle: snake_case + SupportedStyles: + - snake_case + - camelCase + +Style/ModuleFunction: + EnforcedStyle: module_function + SupportedStyles: + - module_function + - extend_self + +Layout/MultilineArrayBraceLayout: + EnforcedStyle: symmetrical + SupportedStyles: + # symmetrical: closing brace is positioned in same way as opening brace + # new_line: closing brace is always on a new line + # same_line: closing brace is always on the same line as last element + - symmetrical + - new_line + - same_line + +Layout/MultilineAssignmentLayout: + # The types of assignments which are subject to this rule. + SupportedTypes: + - block + - case + - class + - if + - kwbegin + - module + EnforcedStyle: new_line + SupportedStyles: + # Ensures that the assignment operator and the rhs are on the same line for + # the set of supported types. + - same_line + # Ensures that the assignment operator and the rhs are on separate lines + # for the set of supported types. + - new_line + +Layout/MultilineHashBraceLayout: + EnforcedStyle: symmetrical + SupportedStyles: + # symmetrical: closing brace is positioned in same way as opening brace + # new_line: closing brace is always on a new line + # same_line: closing brace is always on same line as last element + - symmetrical + - new_line + - same_line + +Layout/MultilineMethodCallBraceLayout: + EnforcedStyle: symmetrical + SupportedStyles: + # symmetrical: closing brace is positioned in same way as opening brace + # new_line: closing brace is always on a new line + # same_line: closing brace is always on the same line as last argument + - symmetrical + - new_line + - same_line + +Layout/MultilineMethodCallIndentation: + EnforcedStyle: aligned + SupportedStyles: + - aligned + - indented + - indented_relative_to_receiver + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +Layout/MultilineMethodDefinitionBraceLayout: + EnforcedStyle: symmetrical + SupportedStyles: + # symmetrical: closing brace is positioned in same way as opening brace + # new_line: closing brace is always on a new line + # same_line: closing brace is always on the same line as last parameter + - symmetrical + - new_line + - same_line + +Layout/MultilineOperationIndentation: + EnforcedStyle: aligned + SupportedStyles: + - aligned + - indented + # By default, the indentation width from Style/IndentationWidth is used + # But it can be overridden by setting this parameter + IndentationWidth: ~ + +Style/NumericLiterals: + MinDigits: 5 + +Style/NumericLiteralPrefix: + EnforcedOctalStyle: zero_with_o + SupportedOctalStyles: + - zero_with_o + - zero_only + +Style/OptionHash: + # A list of parameter names that will be flagged by this cop. + SuspiciousParamNames: + - options + - opts + - args + - params + - parameters + +# Allow safe assignment in conditions. +Style/ParenthesesAroundCondition: + AllowSafeAssignment: true + +Style/PercentLiteralDelimiters: + PreferredDelimiters: + "%": () + "%i": () + "%q": () + "%Q": () + "%r": "{}" + "%s": () + "%w": () + "%W": () + "%x": () + +Style/PercentQLiterals: + EnforcedStyle: lower_case_q + SupportedStyles: + - lower_case_q # Use %q when possible, %Q when necessary + - upper_case_q # Always use %Q + +Style/SlicingWithRange: + Enabled: false + +Naming/PredicatePrefix: + # Predicate name prefixes. + NamePrefix: + - is_ + - has_ + - have_ + # Predicate name prefixes that should be removed. + ForbiddenPrefixes: + - is_ + - have_ + # Predicate names which, despite having a blacklisted prefix, or no ?, + # should still be accepted + AllowedMethods: + - is_a? + # Exclude Rspec specs because there is a strong convetion to write spec + # helpers in the form of `have_something` or `be_something`. + Exclude: + - "**/spec/**/*" + - "**/test/**/*" + +Style/PreferredHashMethods: + Enabled: true + EnforcedStyle: verbose + +Style/DateTime: + Enabled: true + +Style/Documentation: + Enabled: false + +Style/RaiseArgs: + EnforcedStyle: exploded + SupportedStyles: + - compact # raise Exception.new(msg) + - exploded # raise Exception, msg + +Style/RedundantReturn: + # When true allows code like `return x, y`. + AllowMultipleReturnValues: false + +# Use / or %r around regular expressions. +Style/RegexpLiteral: + EnforcedStyle: slashes + # slashes: Always use slashes. + # percent_r: Always use %r. + # mixed: Use slashes on single-line regexes, and %r on multi-line regexes. + SupportedStyles: + - slashes + - percent_r + - mixed + # If false, the cop will always recommend using %r if one or more slashes + # are found in the regexp string. + AllowInnerSlashes: false + +Style/SafeNavigation: + Enabled: false + +Style/Semicolon: + # Allow ; to separate several expressions on the same line. + AllowAsExpressionSeparator: false + +Style/SignalException: + EnforcedStyle: only_raise + SupportedStyles: + - only_raise + - only_fail + - semantic + +Style/SingleLineBlockParams: + Methods: + - reduce: + - a + - e + - inject: + - a + - e + +Style/SingleLineMethods: + AllowIfMethodIsEmpty: true + +Layout/SpaceBeforeFirstArg: + # When true, allows most uses of extra spacing if the intent is to align + # things with the previous or next line, not counting empty lines or comment + # lines. + AllowForAlignment: true + +Style/SpecialGlobalVars: + EnforcedStyle: use_english_names + SupportedStyles: + - use_perl_names + - use_english_names + +Style/StabbyLambdaParentheses: + EnforcedStyle: require_parentheses + SupportedStyles: + - require_parentheses + - require_no_parentheses + +Style/StringLiterals: + EnforcedStyle: double_quotes + SupportedStyles: + - single_quotes + - double_quotes + # If true, strings which span multiple lines using \ for continuation must + # use the same type of quotes on each line. + ConsistentQuotesInMultiline: false + +Style/StringLiteralsInInterpolation: + EnforcedStyle: double_quotes + SupportedStyles: + - single_quotes + - double_quotes + +Style/StringMethods: + # Mapping from undesired method to desired_method + # e.g. to use `to_sym` over `intern`: + # + # StringMethods: + # PreferredMethods: + # intern: to_sym + PreferredMethods: + intern: to_sym + +Layout/SpaceAroundBlockParameters: + EnforcedStyleInsidePipes: no_space + +Layout/SpaceAroundEqualsInParameterDefault: + EnforcedStyle: space + SupportedStyles: + - space + - no_space + +Layout/SpaceAroundOperators: + # When true, allows most uses of extra spacing if the intent is to align + # with an operator on the previous or next line, not counting empty lines + # or comment lines. + AllowForAlignment: true + +Layout/SpaceBeforeBlockBraces: + EnforcedStyle: space + SupportedStyles: + - space + - no_space + +Layout/SpaceInsideBlockBraces: + EnforcedStyle: space + SupportedStyles: + - space + - no_space + # Valid values are: space, no_space + EnforcedStyleForEmptyBraces: no_space + # Space between { and |. Overrides EnforcedStyle if there is a conflict. + SpaceBeforeBlockParameters: true + +Layout/SpaceInsideHashLiteralBraces: + EnforcedStyle: space + EnforcedStyleForEmptyBraces: no_space + SupportedStyles: + - space + - no_space + # "compact" normally requires a space inside hash braces, with the exception + # that successive left braces or right braces are collapsed together + - compact + +Layout/SpaceInsideStringInterpolation: + EnforcedStyle: no_space + SupportedStyles: + - space + - no_space + +Style/AccessModifierDeclarations: + Enabled: false + +Style/SymbolArray: + EnforcedStyle: brackets + SupportedStyles: + - percent + - brackets + +Style/SymbolProc: + # A list of method names to be ignored by the check. + # The names should be fairly unique, otherwise you'll end up ignoring lots of code. + Enabled: true + Exclude: + - respond_to + - define_method + +Style/TernaryParentheses: + EnforcedStyle: require_no_parentheses + SupportedStyles: + - require_parentheses + - require_no_parentheses + AllowSafeAssignment: true + +Layout/TrailingEmptyLines: + EnforcedStyle: final_newline + SupportedStyles: + - final_newline + - final_blank_line + +Style/TrailingCommaInArguments: + # If `comma`, the cop requires a comma after the last argument, but only for + # parenthesized method calls where each argument is on its own line. + # If `consistent_comma`, the cop requires a comma after the last argument, + # for all parenthesized method calls with arguments. + EnforcedStyleForMultiline: no_comma + +Style/TrailingCommaInArrayLiteral: + # If `comma`, the cop requires a comma after the last item in an array or + # hash, but only when each item is on its own line. + # If `consistent_comma`, the cop requires a comma after the last item of all + # non-empty array and hash literals. + EnforcedStyleForMultiline: no_comma + +Style/TrailingCommaInHashLiteral: + # If `comma`, the cop requires a comma after the last item in an array or + # hash, but only when each item is on its own line. + # If `consistent_comma`, the cop requires a comma after the last item of all + # non-empty array and hash literals. + EnforcedStyleForMultiline: no_comma + +# TrivialAccessors requires exact name matches and doesn't allow +# predicated methods by default. +Style/TrivialAccessors: + # When set to false the cop will suggest the use of accessor methods + # in situations like: + # + # def name + # @other_name + # end + # + # This way you can uncover "hidden" attributes in your code. + ExactNameMatch: true + AllowPredicates: true + # Allows trivial writers that don't end in an equal sign. e.g. + # + # def on_exception(action) + # @on_exception=action + # end + # on_exception :restart + # + # Commonly used in DSLs + AllowDSLWriters: false + IgnoreClassMethods: false + 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 + +Naming/VariableName: + EnforcedStyle: snake_case + SupportedStyles: + - snake_case + - camelCase + +Naming/VariableNumber: + EnforcedStyle: normalcase + SupportedStyles: + - snake_case + - normalcase + - non_integer + +# WordArray enforces how array literals of word-like strings should be expressed. +Style/WordArray: + EnforcedStyle: percent + SupportedStyles: + # percent style: %w(word1 word2) + - percent + # bracket style: ["word1", "word2"] + - brackets + # The MinSize option causes the WordArray rule to be ignored for arrays + # smaller than a certain size. The rule is only applied to arrays + # whose element count is greater than or equal to MinSize. + MinSize: 2 + # The regular expression WordRegex decides what is considered a word. + WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/' + +##################### Metrics ################################## + +Metrics/AbcSize: + # The ABC size is a calculated magnitude, so this number can be an Integer or + # a Float. + Max: 15 + Enabled: false + +Metrics/BlockNesting: + Max: 3 + +Metrics/ClassLength: + CountComments: false # count full line comments? + Max: 100 + Enabled: false + +Metrics/ModuleLength: + CountComments: false # count full line comments? + Max: 100 + Enabled: false + +# Avoid complex methods. +Metrics/CyclomaticComplexity: + Max: 9 + Exclude: + - "bin/bundle" + - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb" + - "**/*/dummy_authorization_handler.rb" + - "**/*/permissions.rb" + +Metrics/MethodLength: + CountComments: false # count full line comments? + Max: 15 + Enabled: false + +Metrics/ParameterLists: + Max: 5 + CountKeywordArgs: true + Exclude: + - "decidim-core/lib/decidim/filter_form_builder.rb" + +Metrics/PerceivedComplexity: + Max: 10 + Exclude: + - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb" + - "**/*/dummy_authorization_handler.rb" + - "**/*/permissions.rb" + +##################### Lint ################################## + +Lint/AmbiguousBlockAssociation: + Enabled: true + Exclude: + - "**/abilities/**/*" + +# Allow safe assignment in conditions. +Lint/AssignmentInCondition: + AllowSafeAssignment: true + +Lint/ConstantDefinitionInBlock: + Enabled: false + +# Call super to initialize state of the parent class. +Lint/MissingSuper: + Enabled: false + +# checks whether the end keywords are aligned properly for `do` `end` blocks. +Layout/BlockAlignment: + # The value `start_of_block` means that the `end` should be aligned with line + # where the `do` keyword appears. + # The value `start_of_line` means it should be aligned with the whole + # expression's starting line. + # The value `either` means both are allowed. + EnforcedStyleAlignWith: either + +# Align ends correctly. +Layout/EndAlignment: + # The value `keyword` means that `end` should be aligned with the matching + # keyword (if, while, etc.). + # The value `variable` means that in assignments, `end` should be aligned + # with the start of the variable on the left hand side of `=`. In all other + # situations, `end` should still be aligned with the keyword. + # The value `start_of_line` means that `end` should be aligned with the start + # of the line which the matching keyword appears on. + EnforcedStyleAlignWith: keyword + AutoCorrect: false + +Layout/DefEndAlignment: + # The value `def` means that `end` should be aligned with the def keyword. + # The value `start_of_line` means that `end` should be aligned with method + # calls like `private`, `public`, etc, if present in front of the `def` + # keyword on the same line. + EnforcedStyleAlignWith: start_of_line + AutoCorrect: false + +Lint/InheritException: + # The default base class in favour of `Exception`. + EnforcedStyle: runtime_error + SupportedStyles: + - runtime_error + - standard_error + +Layout/LineLength: + Max: 180 + # To make it possible to copy or click on URIs in the code, we allow lines + # containing a URI to be longer than Max. + AllowHeredoc: true + AllowURI: true + URISchemes: + - http + - https + Exclude: + - "**/spec/**/*" + +# Checks for unused block arguments +Lint/UnusedBlockArgument: + IgnoreEmptyBlocks: true + AllowUnusedKeywordArguments: false + +# Checks for unused method arguments. +Lint/UnusedMethodArgument: + AllowUnusedKeywordArguments: false + IgnoreEmptyMethods: true + +##################### Performance ############################ + +Metrics/BlockLength: + Enabled: false + +RSpec/BeforeAfterAll: + Enabled: true + +RSpec/ContextWording: + Enabled: true + Prefixes: + - when + - with + - without + - and + +RSpec/DescribeClass: + Exclude: + - spec/gemfiles_spec.rb + - spec/webpacker_spec.rb + - spec/i18n_spec.rb + - "**/*/spec/**/*_badge_spec.rb" + - decidim-core/spec/lib/global_engines_spec.rb + - "**/tasks/**/*" + +RSpec/EmptyExampleGroup: + Exclude: + - decidim-core/spec/lib/participatory_space_manifest_spec.rb + +RSpec/ExampleLength: + Max: 49 + +RSpec/ExpectInHook: + Enabled: false + +RSpec/IteratedExpectation: + Enabled: true + +RSpec/LetSetup: + Enabled: false + +RSpec/MessageSpies: + Enabled: false + +RSpec/MultipleExpectations: + Enabled: false + +RSpec/MultipleMemoizedHelpers: + Max: 35 + Exclude: + - decidim-assemblies/spec/forms/assembly_form_spec.rb + +RSpec/NestedGroups: + Max: 7 + +RSpec/NamedSubject: + Enabled: false + +RSpec/RepeatedExampleGroupDescription: + Enabled: false + +RSpec/RepeatedExampleGroupBody: + Enabled: false +RSpec/VerifiedDoubles: + Enabled: false + +RSpec/LeakyConstantDeclaration: + Enabled: false + +RSpec/DescribedClass: + Enabled: false + +# This is the default configuration file. + +Faker/DeprecatedArguments: + Description: 'Checks that Faker arguments style is based on Faker 2.' + Enabled: true + VersionAdded: '0.1' + Reference: 'https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md#v20-2019-31-07' + ArgumentKeywords: + # + # FakerClassName: + # method_name: + # - keyword_name_for_first_argument + # - keyword_name_for_second_argument + # - keyword_name_for_third_argument + # + Faker::Dune: + quote: + - character + saying: + - source + Faker::Books::Lovecraft: + fhtagn: + - number + sentence: + - word_count + - random_words_to_add + words: + - number + - spaces_allowed + sentences: + - number + paragraph: + - sentence_count + - random_sentences_to_add + paragraphs: + - number + paragraph_by_chars: + - characters + Faker::Address: + city: + - options + street_address: + - include_secondary + zip_code: + - state_abbreviation + country_by_code: + - code + country_name_to_code: + - name + Faker::Alphanumeric: + alpha: + - number + alphanumeric: + - number + Faker::App: + semantic_version: + - major + - minor + - patch + Faker::Avatar: + image: + - slug + - size + - format + - set + - bgset + Faker::Bank: + account_number: + - digits + iban: + - country_code + Faker::Boolean: + boolean: + - true_ratio + Faker::ChileRut: + rut: + - min_rut + - fixed + full_rut: + - min_rut + - fixed + Faker::Code: + isbn: + - base + ean: + - base + nric: + - min_age + - max_age + Faker::Commerce: + promotion_code: + - digits + department: + - max + - fixed_amount + price: + - range + - as_string + Faker::Company: + polish_register_of_national_economy: + - length + brazilian_company_number: + - formatted + Faker::CryptoCoin: + coin_name: + - coin + acronym: + - coin + url_logo: + - coin + Faker::Date: + between: + - from + - to + between_except: + - from + - to + - excepted + forward: + - days + backward: + - days + birthday: + - min_age + - max_age + Faker::Demographic: + height: + - unit + Faker::DrivingLicence: + british_driving_licence: + - last_name + - initials + - gender + - date_of_birth + Faker::File: + dir: + - segment_count + - root + - directory_separator + file_name: + - dir + - name + - ext + - directory_separator + Faker::Fillmurray: + image: + - grayscale + - width + - height + Faker::Finance: + vat_number: + - country + Faker::Hipster: + words: + - number + - supplemental + - spaces_allowed + sentence: + - word_count + - supplemental + - random_words_to_add + sentences: + - number + - supplemental + paragraph: + - sentence_count + - supplemental + - random_sentences_to_add + paragraphs: + - number + - supplemental + paragraph_by_chars: + - characters + - supplemental + Faker::IDNumber: + brazilian_citizen_number: + - formatted + brazilian_id: + - formatted + Faker::Internet: + email: + - name + - separators + free_email: + - name + safe_email: + - name + username: + - specifier + - separators + password: + - min_length + - max_length + - mix_case + - special_characters + domain_name: + - subdomain + fix_umlauts: + - string + mac_address: + - prefix + url: + - host + - path + - scheme + slug: + - words + - glue + user_agent: + - vendor + Faker::Invoice: + amount_between: + - from + - to + creditor_reference: + - ref + reference: + - ref + Faker::Json: + shallow_json: + - width + - options + add_depth_to_json: + - json + - width + - options + Faker::Lorem: + words: + - number + - supplemental + characters: + - number + sentence: + - word_count + - supplemental + - random_words_to_add + sentences: + - number + - supplemental + paragraph: + - sentence_count + - supplemental + - random_sentences_to_add + paragraphs: + - number + - supplemental + paragraph_by_chars: + - number + - supplemental + question: + - word_count + - supplemental + - random_words_to_add + questions: + - number + - supplemental + Faker::LoremFlickr: + image: + - size + - search_terms + - match_all + grayscale_image: + - size + - search_terms + - match_all + pixelated_image: + - size + - search_terms + - match_all + colorized_image: + - size + - color + - search_terms + - match_all + Faker::LoremPixel: + image: + - size + - is_gray + - category + - number + - text + - secure + Faker::Markdown: + sandwich: + - sentences + - repeat + Faker::Measurement: + height: + - amount + length: + - amount + volume: + - amount + weight: + - amount + metric_height: + - amount + metric_length: + - amount + metric_volume: + - amount + metric_weight: + - amount + Faker::Name: + initials: + - number + Faker::NationalHealthService: + check_digit: + - number + Faker::Number: + number: + - digits + leading_zero_number: + - digits + decimal_part: + - digits + decimal: + - l_digits + - r_digits + hexadecimal: + - digits + normal: + - mean + - standard_deviation + between: + - from + - to + within: + - range + positive: + - from + - to + negative: + - from + - to + Faker::Omniauth: + google: + - name + - email + - uid + facebook: + - name + - email + - username + - uid + twitter: + - name + - nickname + - uid + linkedin: + - name + - email + - uid + github: + - name + - email + - uid + Faker::PhoneNumber: + subscriber_number: + - length + Faker::Placeholdit: + image: + - size + - format + - background_color + - text_color + - text + Faker::Relationship: + familial: + - connection + Faker::Source: + hello_world: + - lang + print: + - str + - lang + print_1_to_10: + - lang + Faker::String: + random: + - length + Faker::Stripe: + valid_card: + - card_type + valid_token: + - card_type + invalid_card: + - card_error + ccv: + - card_type + Faker::Time: + between: + - from + - to + - format + between_dates: + - from + - to + - period + - format + forward: + - days + - period + - format + backward: + - days + - period + - format + Faker::Twitter: + user: + - include_status + - include_email + status: + - include_user + - include_photo + status_entities: + - include_photo + Faker::Types: + rb_string: + - words + rb_integer: + - from + - to + rb_hash: + - number + - type + complex_rb_hash: + - number + rb_array: + - len + Faker::Vehicle: + model: + - make_of_model + mileage: + - min + - max + license_plate: + - state_abbreviation + Faker::WorldCup: + group: + - group + roster: + - country + - type + Faker::Dota: + quote: + - hero + Faker::Movies::StarWars: + quote: + - character + Decidim::Faker::Localized: + words: + - number + - supplemental + characters: + - number + sentence: + - word_count + - supplemental + - random_words_to_add + sentences: + - number + - supplemental + paragraph: + - sentence_count + - supplemental + - random_sentences_to_add + paragraphs: + - number + - supplemental + paragraph_by_chars: + - number + - supplemental + question: + - word_count + - supplemental + - random_words_to_add + questions: + - number + - supplemental diff --git a/.ruby-version b/.ruby-version index be94e6f5..a0891f56 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 +3.3.4 diff --git a/Gemfile.lock b/Gemfile.lock index 8d440a42..645793d6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,82 +1,90 @@ PATH remote: . specs: - decidim-extra_user_fields (0.29.0) + decidim-extra_user_fields (0.31.0) country_select (~> 9.0) - decidim-core (>= 0.29) + decidim-core (>= 0.31) deface (~> 1.5) GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) + actioncable (7.2.3) + actionpack (= 7.2.3) + activesupport (= 7.2.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.0.8.7) - actionpack (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activesupport (= 7.0.8.7) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8.7) - actionview (= 7.0.8.7) - activesupport (= 7.0.8.7) - rack (~> 2.0, >= 2.2.4) + zeitwerk (~> 2.6) + actionmailbox (7.2.3) + actionpack (= 7.2.3) + activejob (= 7.2.3) + activerecord (= 7.2.3) + activestorage (= 7.2.3) + activesupport (= 7.2.3) + mail (>= 2.8.0) + actionmailer (7.2.3) + actionpack (= 7.2.3) + actionview (= 7.2.3) + activejob (= 7.2.3) + activesupport (= 7.2.3) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (7.2.3) + actionview (= 7.2.3) + activesupport (= 7.2.3) + cgi + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.3) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.7) - actionpack (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (7.2.3) + actionpack (= 7.2.3) + activerecord (= 7.2.3) + activestorage (= 7.2.3) + activesupport (= 7.2.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.7) - activesupport (= 7.0.8.7) + actionview (7.2.3) + activesupport (= 7.2.3) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) + cgi + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) active_link_to (1.0.5) actionpack addressable - activejob (7.0.8.7) - activesupport (= 7.0.8.7) + activejob (7.2.3) + activesupport (= 7.2.3) globalid (>= 0.3.6) - activemodel (7.0.8.7) - activesupport (= 7.0.8.7) - activerecord (7.0.8.7) - activemodel (= 7.0.8.7) - activesupport (= 7.0.8.7) - activestorage (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activesupport (= 7.0.8.7) + activemodel (7.2.3) + activesupport (= 7.2.3) + activerecord (7.2.3) + activemodel (= 7.2.3) + activesupport (= 7.2.3) + timeout (>= 0.4.0) + activestorage (7.2.3) + actionpack (= 7.2.3) + activejob (= 7.2.3) + activerecord (= 7.2.3) + activesupport (= 7.2.3) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8.7) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (7.2.3) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) acts_as_list (1.2.4) activerecord (>= 6.1) activesupport (>= 6.1) @@ -84,8 +92,9 @@ GEM public_suffix (>= 2.0.2, < 7.0) ast (2.4.3) base64 (0.2.0) - batch-loader (1.5.0) + batch-loader (2.0.6) bcrypt (3.1.20) + benchmark (0.5.0) better_html (2.1.1) actionview (>= 6.0) activesupport (>= 6.0) @@ -97,9 +106,9 @@ GEM bindex (0.8.1) bootsnap (1.18.4) msgpack (~> 1.2) - browser (2.7.1) + browser (6.2.0) builder (3.3.0) - bullet (7.1.6) + bullet (8.0.8) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -123,11 +132,16 @@ GEM cells-rails (0.1.6) actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) + cgi (0.5.1) charlock_holmes (0.7.9) + chartkick (5.1.5) childprocess (5.1.0) logger (~> 1.5) + chunky_png (1.4.0) + cmdparse (3.0.7) commonmarker (0.23.11) concurrent-ruby (1.3.4) + connection_pool (3.0.2) countries (6.0.1) unaccent (~> 0.3) country_select (9.0.0) @@ -139,123 +153,134 @@ GEM css_parser (1.21.1) addressable csv (3.3.3) - dartsass (1.49.8) + data_migrate (11.3.1) + activerecord (>= 6.1) + railties (>= 6.1) date (3.4.1) date_validator (0.12.0) activemodel (>= 3) activesupport (>= 3) - decidim (0.29.2) - decidim-accountability (= 0.29.2) - decidim-admin (= 0.29.2) - decidim-api (= 0.29.2) - decidim-assemblies (= 0.29.2) - decidim-blogs (= 0.29.2) - decidim-budgets (= 0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - decidim-debates (= 0.29.2) - decidim-forms (= 0.29.2) - decidim-generators (= 0.29.2) - decidim-meetings (= 0.29.2) - decidim-pages (= 0.29.2) - decidim-participatory_processes (= 0.29.2) - decidim-proposals (= 0.29.2) - decidim-sortitions (= 0.29.2) - decidim-surveys (= 0.29.2) - decidim-system (= 0.29.2) - decidim-verifications (= 0.29.2) - decidim-accountability (0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - decidim-admin (0.29.2) + decidim (0.31.0) + decidim-accountability (= 0.31.0) + decidim-admin (= 0.31.0) + decidim-api (= 0.31.0) + decidim-assemblies (= 0.31.0) + decidim-blogs (= 0.31.0) + decidim-budgets (= 0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-debates (= 0.31.0) + decidim-forms (= 0.31.0) + decidim-generators (= 0.31.0) + decidim-meetings (= 0.31.0) + decidim-pages (= 0.31.0) + decidim-participatory_processes (= 0.31.0) + decidim-proposals (= 0.31.0) + decidim-sortitions (= 0.31.0) + decidim-surveys (= 0.31.0) + decidim-system (= 0.31.0) + decidim-verifications (= 0.31.0) + decidim-accountability (0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-admin (0.31.0) active_link_to (~> 1.0) - decidim-core (= 0.29.2) + decidim-core (= 0.31.0) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-api (0.29.2) - decidim-core (= 0.29.2) - graphql (~> 2.2.6) - graphql-docs (~> 4.0) + decidim-api (0.31.0) + decidim-core (= 0.31.0) + devise-jwt (~> 0.12.1) + graphql (~> 2.4.0, >= 2.4.17) + graphql-docs (~> 5.0) rack-cors (~> 1.0) - decidim-assemblies (0.29.2) - decidim-core (= 0.29.2) - decidim-blogs (0.29.2) - decidim-admin (= 0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - decidim-budgets (0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - decidim-comments (0.29.2) - decidim-core (= 0.29.2) + decidim-assemblies (0.31.0) + decidim-core (= 0.31.0) + decidim-blogs (0.31.0) + decidim-admin (= 0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-budgets (0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-comments (0.31.0) + decidim-core (= 0.31.0) redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.29.2) + decidim-core (0.31.0) active_link_to (~> 1.0) acts_as_list (~> 1.0) - batch-loader (~> 1.2) - browser (~> 2.7) + batch-loader (~> 2.0) + browser (~> 6.2.0) cells-erb (~> 0.1.0) cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) - concurrent-ruby (= 1.3.4) + chartkick (~> 5.1.2) + concurrent-ruby (~> 1.3.0) + data_migrate (~> 11.3) date_validator (~> 0.12.0) devise (~> 4.7) - devise-i18n (~> 1.2, < 1.11.1) + devise-i18n (~> 1.2) diffy (~> 3.3) doorkeeper (~> 5.6, >= 5.6.6) doorkeeper-i18n (~> 4.0) file_validators (~> 3.0) fog-local (~> 0.6) - foundation_rails_helper (~> 4.0) geocoder (~> 1.8) hashdiff (>= 0.4.0, < 2.0.0) + hexapdf (~> 1.1.0) image_processing (~> 1.2) invisible_captcha (~> 0.12) kaminari (~> 1.2, >= 1.2.1) loofah (~> 2.19, >= 2.19.1) mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) - net-smtp (~> 0.3.1) + net-smtp (~> 0.5.0) nokogiri (~> 1.16, >= 1.16.2) omniauth (~> 2.0) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 1.0) omniauth-rails_csrf_protection (~> 1.0) omniauth-twitter (~> 1.4) - paper_trail (~> 12.0) - pg (~> 1.4.0, < 2) + paper_trail (~> 16.0) + paranoia (~> 3.0.0) + pg (~> 1.5.0, < 2) pg_search (~> 2.2) premailer-rails (~> 1.10) - psych (~> 4.0) rack (~> 2.2, >= 2.2.8.1) rack-attack (~> 6.0) - rails (~> 7.0.8) + rails (~> 7.2.0, >= 7.2.2.2) rails-i18n (~> 7.0) - ransack (~> 3.2.1) + ransack (~> 4.2.0) redis (~> 4.1) - request_store (~> 1.5.0) + request_store (~> 1.7.0) + rqrcode (~> 2.2.0) rubyXL (~> 3.4) rubyzip (~> 2.0) - shakapacker (~> 7.1.0) - valid_email2 (~> 4.0) + shakapacker (~> 8.3.0) + valid_email2 (~> 7.0) web-push (~> 3.0) - wisper (~> 2.0) - decidim-debates (0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - decidim-dev (0.29.2) - bullet (~> 7.1.6) + wisper (~> 3.0) + decidim-debates (0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-dev (0.31.0) + bullet (~> 8.0.0) byebug (~> 11.0) capybara (~> 3.39) - decidim (= 0.29.2) - erb_lint (~> 0.4.0) + decidim-admin (= 0.31.0) + decidim-api (= 0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-generators (= 0.31.0) + decidim-verifications (= 0.31.0) + erb_lint (~> 0.8.0) factory_bot_rails (~> 6.2) faker (~> 3.2) i18n-tasks (~> 1.0) nokogiri (~> 1.16, >= 1.16.2) parallel_tests (~> 4.2) - puma (~> 6.2, >= 6.3.1) + puma (~> 6.5) rails-controller-testing (~> 1.0) rspec (~> 3.12) rspec-cells (~> 0.3.7) @@ -263,15 +288,16 @@ GEM rspec-rails (~> 6.0) rspec-retry (~> 0.6.2) rspec_junit_formatter (~> 0.6.0) - rubocop (~> 1.65.0) - rubocop-capybara (~> 2.21) - rubocop-factory_bot (~> 2.26) - rubocop-faker (~> 1.1) - rubocop-performance (~> 1.21) - rubocop-rails (~> 2.25) - rubocop-rspec (~> 3.0) - rubocop-rspec_rails (~> 2.30) - rubocop-rubycw (~> 0.1) + rubocop (~> 1.78.0) + rubocop-capybara (~> 2.22.0, >= 2.22.1) + rubocop-factory_bot (~> 2.27.0) + rubocop-faker (~> 1.3, >= 1.3.0) + rubocop-graphql (~> 1.5, >= 1.5.6) + rubocop-performance (~> 1.25, >= 1.25.0) + rubocop-rails (~> 2.32.0, >= 2.32.0) + rubocop-rspec (~> 3.0, >= 3.6.0) + rubocop-rspec_rails (~> 2.31.0) + rubocop-rubycw (~> 0.2.0) selenium-webdriver (~> 4.9) simplecov (~> 0.22.0) simplecov-cobertura (~> 2.1.0) @@ -280,40 +306,39 @@ GEM w3c_rspec_validators (~> 0.3.0) webmock (~> 3.18) wisper-rspec (~> 1.0) - decidim-forms (0.29.2) - decidim-core (= 0.29.2) - wicked_pdf (~> 2.1) - decidim-generators (0.29.2) - decidim-core (= 0.29.2) - decidim-meetings (0.29.2) - decidim-core (= 0.29.2) - decidim-forms (= 0.29.2) + decidim-forms (0.31.0) + decidim-core (= 0.31.0) + decidim-generators (0.31.0) + decidim-core (= 0.31.0) + decidim-meetings (0.31.0) + decidim-core (= 0.31.0) + decidim-forms (= 0.31.0) icalendar (~> 2.5) - decidim-pages (0.29.2) - decidim-core (= 0.29.2) - decidim-participatory_processes (0.29.2) - decidim-core (= 0.29.2) - decidim-proposals (0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - doc2text (~> 0.4.7) + decidim-pages (0.31.0) + decidim-core (= 0.31.0) + decidim-participatory_processes (0.31.0) + decidim-core (= 0.31.0) + decidim-proposals (0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + doc2text (~> 0.4.0, >= 0.4.8) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.29.2) - decidim-admin (= 0.29.2) - decidim-comments (= 0.29.2) - decidim-core (= 0.29.2) - decidim-proposals (= 0.29.2) - decidim-surveys (0.29.2) - decidim-core (= 0.29.2) - decidim-forms (= 0.29.2) - decidim-system (0.29.2) + decidim-sortitions (0.31.0) + decidim-admin (= 0.31.0) + decidim-comments (= 0.31.0) + decidim-core (= 0.31.0) + decidim-proposals (= 0.31.0) + decidim-surveys (0.31.0) + decidim-core (= 0.31.0) + decidim-forms (= 0.31.0) + decidim-system (0.31.0) active_link_to (~> 1.0) - decidim-core (= 0.29.2) + decidim-core (= 0.31.0) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0, >= 2.0.9) - decidim-verifications (0.29.2) - decidim-core (= 0.29.2) + decidim-verifications (0.31.0) + decidim-core (= 0.31.0) declarative-builder (0.2.0) trailblazer-option (~> 0.1.0) declarative-option (0.1.0) @@ -331,6 +356,9 @@ GEM warden (~> 1.2.3) devise-i18n (1.11.0) devise (>= 4.9.0) + devise-jwt (0.12.1) + devise (~> 4.0) + warden-jwt_auth (~> 0.10) devise_invitable (2.0.10) actionmailer (>= 5.0) devise (>= 4.6) @@ -343,12 +371,24 @@ GEM doorkeeper (5.8.2) railties (>= 5) doorkeeper-i18n (4.0.1) - erb_lint (0.4.0) + drb (2.2.3) + dry-auto_inject (1.1.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-configurable (1.3.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-core (1.2.0) + concurrent-ruby (~> 1.0) + logger + zeitwerk (~> 2.6) + erb (6.0.1) + erb_lint (0.8.0) activesupport better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow - rubocop + rubocop (>= 1) smart_properties erbse (0.1.4) temple @@ -379,6 +419,7 @@ GEM ffi (1.17.1-x86_64-darwin) ffi (1.17.1-x86_64-linux-gnu) ffi (1.17.1-x86_64-linux-musl) + fiber-storage (1.0.1) file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) @@ -390,29 +431,55 @@ GEM fog-local (0.9.0) fog-core (>= 1.27, < 3.0) formatador (1.1.0) - foundation_rails_helper (4.0.1) - actionpack (>= 4.1, < 7.1) - activemodel (>= 4.1, < 7.1) - activesupport (>= 4.1, < 7.1) - railties (>= 4.1, < 7.1) gemoji (3.0.1) geocoder (1.8.5) base64 (>= 0.1.0) csv (>= 3.0.0) + geom2d (0.4.1) globalid (1.2.1) activesupport (>= 6.1) - graphql (2.2.17) + google-protobuf (4.33.2) + bigdecimal + rake (>= 13) + google-protobuf (4.33.2-aarch64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.33.2-aarch64-linux-musl) + bigdecimal + rake (>= 13) + google-protobuf (4.33.2-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.33.2-x86_64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.33.2-x86_64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.33.2-x86_64-linux-musl) + bigdecimal + rake (>= 13) + graphql (2.4.17) base64 - graphql-docs (4.0.0) + fiber-storage + logger + graphql-docs (5.2.0) commonmarker (~> 0.23, >= 0.23.6) - dartsass (~> 1.49) escape_utils (~> 1.2) extended-markdown-filter (~> 0.4) gemoji (~> 3.0) graphql (~> 2.0) html-pipeline (~> 2.14, >= 2.14.3) + logger (~> 1.6) + ostruct (~> 0.6) + sass-embedded (~> 1.58) hashdiff (1.1.2) hashie (5.0.0) + hexapdf (1.1.1) + cmdparse (~> 3.0, >= 3.0.3) + geom2d (~> 0.4, >= 0.4.1) + openssl (>= 2.2.1) + strscan (>= 3.1.2) highline (3.1.2) reline html-pipeline (2.14.3) @@ -442,6 +509,10 @@ GEM invisible_captcha (0.13.0) rails (>= 3.2.0) io-console (0.8.0) + irb (1.16.0) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) json (2.10.2) jwt (2.10.1) base64 @@ -469,6 +540,7 @@ GEM letter_opener (~> 1.7) railties (>= 5.2) rexml + lint_roller (1.1.0) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -483,7 +555,6 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - method_source (1.1.0) mime-types (3.6.2) logger mime-types-data (~> 3.2015) @@ -503,7 +574,7 @@ GEM net-protocol net-protocol (0.2.2) timeout - net-smtp (0.3.4) + net-smtp (0.5.1) net-protocol nio4r (2.7.4) nokogiri (1.18.7-aarch64-linux-gnu) @@ -562,20 +633,25 @@ GEM openssl (3.3.0) orm_adapter (0.5.0) ostruct (0.6.1) - paper_trail (12.3.0) - activerecord (>= 5.2) - request_store (~> 1.1) + package_json (0.2.0) + paper_trail (16.0.0) + activerecord (>= 6.1) + request_store (~> 1.4) parallel (1.26.3) parallel_tests (4.10.1) parallel + paranoia (3.0.1) + activerecord (>= 6, < 8.1) parser (3.3.7.4) ast (~> 2.4.1) racc - pg (1.4.6) + pg (1.5.9) pg_search (2.3.7) activerecord (>= 6.1) activesupport (>= 6.1) polyglot (0.3.5) + pp (0.6.3) + prettyprint premailer (1.27.0) addressable css_parser (>= 1.19.0) @@ -584,6 +660,7 @@ GEM actionmailer (>= 3) net-smtp premailer (~> 1.7, >= 1.7.9) + prettyprint (0.2.0) prism (1.4.0) psych (4.0.6) stringio @@ -601,22 +678,27 @@ GEM rack (~> 2.2, >= 2.2.4) rack-proxy (0.7.7) rack + rack-session (1.0.2) + rack (< 3) rack-test (2.2.0) rack (>= 1.3) - rails (7.0.8.7) - actioncable (= 7.0.8.7) - actionmailbox (= 7.0.8.7) - actionmailer (= 7.0.8.7) - actionpack (= 7.0.8.7) - actiontext (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activemodel (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.2.3) + actioncable (= 7.2.3) + actionmailbox (= 7.2.3) + actionmailer (= 7.2.3) + actionpack (= 7.2.3) + actiontext (= 7.2.3) + actionview (= 7.2.3) + activejob (= 7.2.3) + activemodel (= 7.2.3) + activerecord (= 7.2.3) + activestorage (= 7.2.3) + activesupport (= 7.2.3) bundler (>= 1.15.0) - railties (= 7.0.8.7) + railties (= 7.2.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -631,33 +713,44 @@ GEM rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) - method_source + railties (7.2.3) + actionpack (= 7.2.3) + activesupport (= 7.2.3) + cgi + irb (~> 1.13) + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - ransack (3.2.1) + ransack (4.2.1) activerecord (>= 6.1.5) activesupport (>= 6.1.5) i18n rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) + rdoc (7.0.3) + erb + psych (>= 4.0.0) + tsort redcarpet (3.6.1) redis (4.8.1) regexp_parser (2.10.0) reline (0.6.0) io-console (~> 0.5) - request_store (1.5.1) + request_store (1.7.0) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) rexml (3.4.1) + rqrcode (2.2.0) + chunky_png (~> 1.0) + rqrcode_core (~> 1.0) + rqrcode_core (1.2.0) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -689,42 +782,53 @@ GEM rspec-support (3.13.2) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.65.1) + rubocop (1.78.0) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.45.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.44.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.48.0) parser (>= 3.3.7.2) prism (~> 1.4) - rubocop-capybara (2.21.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.26.1) - rubocop (~> 1.61) - rubocop-faker (1.2.0) + rubocop-capybara (2.22.1) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-factory_bot (2.27.1) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-faker (1.3.0) faker (>= 2.12.0) - rubocop (>= 1.13.0) - rubocop-performance (1.23.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.29.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-graphql (1.5.6) + lint_roller (~> 1.1) + rubocop (>= 1.72.1, < 2) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rails (2.32.0) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.4.0) - rubocop (~> 1.61) - rubocop-rspec_rails (2.30.0) - rubocop (~> 1.61) - rubocop-rspec (~> 3, >= 3.0.1) - rubocop-rubycw (0.1.6) - rubocop (~> 1.0) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) + rubocop-rspec (3.7.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec_rails (2.31.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec (~> 3.5) + rubocop-rubycw (0.2.2) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) ruby-progressbar (1.13.0) ruby-vips (2.2.3) ffi (~> 1.12) @@ -733,6 +837,23 @@ GEM nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) + sass-embedded (1.97.2-aarch64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-aarch64-linux-musl) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-arm-linux-gnueabihf) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-arm-linux-musleabihf) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-arm64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-x86_64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-x86_64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.97.2-x86_64-linux-musl) + google-protobuf (~> 4.31) + securerandom (0.4.1) selenium-webdriver (4.30.1) base64 (~> 0.2) logger (~> 1.4) @@ -740,8 +861,9 @@ GEM rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) semantic_range (3.1.0) - shakapacker (7.1.0) + shakapacker (8.3.0) activesupport (>= 5.2) + package_json rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) @@ -763,6 +885,7 @@ GEM listen (>= 2.7, < 4.0) spring (>= 4) stringio (3.1.6) + strscan (3.1.7) temple (0.10.3) terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) @@ -770,6 +893,7 @@ GEM tilt (2.6.0) timeout (0.4.3) trailblazer-option (0.1.2) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) @@ -777,8 +901,9 @@ GEM unicode-display_width (2.6.0) uniform_notifier (1.16.0) uri (1.0.3) - valid_email2 (4.0.6) - activemodel (>= 3.2) + useragent (0.16.11) + valid_email2 (7.0.13) + activemodel (>= 6.0) mail (~> 2.5) version_gem (1.1.6) w3c_rspec_validators (0.3.0) @@ -791,6 +916,11 @@ GEM rexml (~> 3.2) warden (1.2.9) rack (>= 2.0.9) + warden-jwt_auth (0.12.0) + dry-auto_inject (>= 0.8, < 2) + dry-configurable (>= 0.13, < 2) + jwt (>= 2.1, < 4) + warden (~> 1.2) web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -803,15 +933,13 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.9.2) websocket (1.2.11) websocket-driver (0.7.7) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked_pdf (2.8.2) - activesupport - ostruct - wisper (2.0.1) + wisper (3.0.0) wisper-rspec (1.1.0) xpath (3.2.0) nokogiri (~> 1.8) @@ -846,7 +974,7 @@ DEPENDENCIES web-console (~> 4.2) RUBY VERSION - ruby 3.2.2p53 + ruby 3.3.4p94 BUNDLED WITH 2.5.22 diff --git a/app/commands/concerns/decidim/extra_user_fields/omniauth_commands_overrides.rb b/app/commands/concerns/decidim/extra_user_fields/omniauth_commands_overrides.rb index 1cfe9733..0d866329 100644 --- a/app/commands/concerns/decidim/extra_user_fields/omniauth_commands_overrides.rb +++ b/app/commands/concerns/decidim/extra_user_fields/omniauth_commands_overrides.rb @@ -14,11 +14,12 @@ def call verify_oauth_signature! begin - if existing_identity - user = existing_identity.user - verify_user_confirmed(user) + if (@identity = existing_identity) + @user = existing_identity.user + verify_user_confirmed(@user) - return broadcast(:ok, user) + trigger_omniauth_event("decidim.user.omniauth_login") + return broadcast(:ok, @user) end return broadcast(:invalid) if form.invalid? @@ -27,7 +28,7 @@ def call send_email_to_statutory_representative @identity = create_identity end - trigger_omniauth_registration + trigger_omniauth_event broadcast(:ok, @user) rescue ActiveRecord::RecordInvalid => e @@ -57,20 +58,36 @@ def create_or_find_user @user.newsletter_notifications_at = nil @user.password = generated_password @user.password_confirmation = generated_password - if form.avatar_url.present? - url = URI.parse(form.avatar_url) - filename = File.basename(url.path) - file = url.open - @user.avatar.attach(io: file, filename:) - end + + # Attach avatar with error handling + attach_avatar_if_present + + @user.tos_agreement = form.tos_agreement + @user.accepted_tos_version = Time.current + raise NeedTosAcceptance if @user.tos_agreement.blank? + @user.skip_confirmation! if verified_email end - @user.tos_agreement = "1" @user.extended_data = extended_data @user.save! end + def attach_avatar_if_present + return if form.avatar_url.blank? + + begin + url = URI.parse(form.avatar_url) + filename = File.basename(url.path) + file = url.open + @user.avatar.attach(io: file, filename:) + rescue OpenURI::HTTPError, SocketError, Timeout::Error => e + # Silently fail avatar attachment if URL is unreachable + # Log the error but continue with user creation + Rails.logger.warn("Failed to attach avatar from #{form.avatar_url}: #{e.message}") + end + end + def extended_data @extended_data ||= (@user&.extended_data || {}).merge( country: form.country, diff --git a/app/forms/concerns/decidim/extra_user_fields/forms_definitions.rb b/app/forms/concerns/decidim/extra_user_fields/forms_definitions.rb index d35b8bbc..53dd4c63 100644 --- a/app/forms/concerns/decidim/extra_user_fields/forms_definitions.rb +++ b/app/forms/concerns/decidim/extra_user_fields/forms_definitions.rb @@ -91,7 +91,9 @@ def phone_number? def phone_number_format? return false unless phone_number? - current_organization.extra_user_field_configuration(:phone_number)["pattern"].present? + pattern = current_organization.extra_user_field_configuration(:phone_number)["pattern"] + + pattern.present? end def location? @@ -120,14 +122,14 @@ def birth_date_under_limit age = calculate_age(date_of_birth) - validate_age(age) + validate_age?(age) end def calculate_age(date_of_birth) Time.zone.today.year - date_of_birth.year - (Time.zone.today.yday < date_of_birth.yday ? 1 : 0) end - def validate_age(age) + def validate_age?(age) errors.add(:date_of_birth, :underage) unless underage_within_limit?(age) underage_within_limit?(age) end diff --git a/app/helpers/decidim/extra_user_fields/admin/application_helper.rb b/app/helpers/decidim/extra_user_fields/admin/application_helper.rb index 2d47155d..66a742ba 100644 --- a/app/helpers/decidim/extra_user_fields/admin/application_helper.rb +++ b/app/helpers/decidim/extra_user_fields/admin/application_helper.rb @@ -3,16 +3,15 @@ module Decidim module ExtraUserFields module Admin - # Custom helpers, scoped to the meetings admin engine. - # module ApplicationHelper def extra_user_fields_export_users_dropdown - content_tag(:ul, class: "vertical menu add-components") do + content_tag(:ul, style: "list-style: none; margin: 0; padding: 0;") do Decidim::ExtraUserFields::AdminEngine::DEFAULT_EXPORT_FORMATS.map do |format| - content_tag(:li, class: "exports--format--#{format.downcase} export--users") do + content_tag(:li) do link_to( t("decidim.admin.exports.export_as", name: t("decidim.extra_user_fields.admin.exports.users"), export_format: format.upcase), - AdminEngine.routes.url_helpers.extra_user_fields_export_users_path(format:) + AdminEngine.routes.url_helpers.extra_user_fields_export_users_path(format:), + style: "display: block; padding: 0.75rem 1rem; color: inherit; text-decoration: none; font-size: 0.875rem;" ) end end.join.html_safe diff --git a/app/jobs/decidim/extra_user_fields/admin/export_participants_job.rb b/app/jobs/decidim/extra_user_fields/admin/export_participants_job.rb index a28a9d25..0cf0278b 100644 --- a/app/jobs/decidim/extra_user_fields/admin/export_participants_job.rb +++ b/app/jobs/decidim/extra_user_fields/admin/export_participants_job.rb @@ -5,12 +5,17 @@ module ExtraUserFields module Admin class ExportParticipantsJob < ApplicationJob queue_as :exports + include Decidim::PrivateDownloadHelper def perform(organization, user, format) collection = organization.users.not_deleted export_data = Decidim::Exporters.find_exporter(format).new(collection, Decidim::ExtraUserFields::UserExportSerializer).export - ExportMailer.export(user, "participants", export_data).deliver_now + name = "participants" + + private_export = attach_archive(export_data, name, user) + + ExportMailer.export(user, private_export).deliver_now end end end diff --git a/app/overrides/decidim/devise/registrations/new/extra_user_fields.html.erb.deface b/app/overrides/decidim/devise/registrations/new/extra_user_fields.html.erb.deface index 4e24bb80..d48be6a5 100644 --- a/app/overrides/decidim/devise/registrations/new/extra_user_fields.html.erb.deface +++ b/app/overrides/decidim/devise/registrations/new/extra_user_fields.html.erb.deface @@ -1,3 +1,2 @@ - - + <%= render partial: "/decidim/extra_user_fields/registration_form", locals: { f: f } %> diff --git a/app/packs/src/decidim/extra_user_fields/accessible_datepicker.js b/app/packs/src/decidim/extra_user_fields/accessible_datepicker.js index 8955c8a1..a5456e76 100644 --- a/app/packs/src/decidim/extra_user_fields/accessible_datepicker.js +++ b/app/packs/src/decidim/extra_user_fields/accessible_datepicker.js @@ -1,14 +1,47 @@ -$(document).ready(function() { - const accountInput = $('#user_date_of_birth_date'); - const registrationInput = $('#registration_user_date_of_birth_date') - const button = $('.datepicker__calendar-button'); - if (accountInput && !accountInput.attr('aria-label')){ - accountInput.attr('aria-label', "user date of birth") +// Wait for Web Components to be fully loaded before modifying attributes +function initializeDatepickerAccessibility() { + if (window.customElements && window.customElements.whenDefined) { + Promise.all([ + customElements.whenDefined('wc-datepicker'), + new Promise(resolve => setTimeout(resolve, 100)) + ]).then(() => { + applyAccessibilityAttributes(); + }).catch((error) => { + console.warn('Datepicker component not found, applying attributes anyway:', error); + // Fallback to immediate application + setTimeout(applyAccessibilityAttributes, 500); + }); + } else { + setTimeout(applyAccessibilityAttributes, 500); } - if (registrationInput && !registrationInput.attr('aria-label')){ - registrationInput.attr('aria-label', "user date of birth") +} + +function applyAccessibilityAttributes() { + const accountInput = document.getElementById('user_date_of_birth_date'); + const registrationInput = document.getElementById('registration_user_date_of_birth_date'); + const button = document.querySelector('.datepicker__calendar-button'); + + if (accountInput && !accountInput.getAttribute('aria-label')) { + accountInput.setAttribute('aria-label', 'user date of birth'); + console.log('Applied aria-label to account input'); } - if (button && !button.attr('aria-label')){ - button.attr('aria-label', "datepicker button") + + if (registrationInput && !registrationInput.getAttribute('aria-label')) { + registrationInput.setAttribute('aria-label', 'user date of birth'); + console.log('Applied aria-label to registration input'); } -}); + + if (button && !button.getAttribute('aria-label')) { + button.setAttribute('aria-label', 'datepicker button'); + console.log('Applied aria-label to datepicker button'); + } +} + +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initializeDatepickerAccessibility); +} else { + initializeDatepickerAccessibility(); +} + +document.addEventListener('turbo:load', initializeDatepickerAccessibility); +document.addEventListener('turbolinks:load', initializeDatepickerAccessibility); diff --git a/app/views/decidim/extra_user_fields/_profile_form.html.erb b/app/views/decidim/extra_user_fields/_profile_form.html.erb index 492a0f02..af7c21b0 100644 --- a/app/views/decidim/extra_user_fields/_profile_form.html.erb +++ b/app/views/decidim/extra_user_fields/_profile_form.html.erb @@ -18,7 +18,12 @@ <% end %> <% if current_organization.activated_extra_field?(:phone_number) %> - <%= f.telephone_field :phone_number, placeholder: translated_attribute(f.object.phone_number_extra_user_field_placeholder), pattern: f.object.phone_number_extra_user_field_pattern %> + <%= f.text_field :phone_number, + input_html: { + type: "tel", + placeholder: translated_attribute(f.object.phone_number_extra_user_field_placeholder), + pattern: f.object.phone_number_extra_user_field_pattern + } %> <% end %> <% if current_organization.activated_extra_field?(:location) %> diff --git a/app/views/decidim/extra_user_fields/_registration_form.html.erb b/app/views/decidim/extra_user_fields/_registration_form.html.erb index 1445088a..22a1ab56 100644 --- a/app/views/decidim/extra_user_fields/_registration_form.html.erb +++ b/app/views/decidim/extra_user_fields/_registration_form.html.erb @@ -21,7 +21,12 @@ <% end %> <% if current_organization.activated_extra_field?(:phone_number) %> - <%= f.telephone_field :phone_number, placeholder: translated_attribute(f.object.phone_number_extra_user_field_placeholder), pattern: f.object.phone_number_extra_user_field_pattern %> + <%= f.text_field :phone_number, + input_html: { + type: "tel", + placeholder: translated_attribute(f.object.phone_number_extra_user_field_placeholder), + pattern: f.object.phone_number_extra_user_field_pattern + } %> <% end %> <% if current_organization.activated_extra_field?(:location) %> diff --git a/app/views/decidim/extra_user_fields/admin/export_users/_dropdown.html.erb b/app/views/decidim/extra_user_fields/admin/export_users/_dropdown.html.erb index 032a1fba..43eeb90f 100644 --- a/app/views/decidim/extra_user_fields/admin/export_users/_dropdown.html.erb +++ b/app/views/decidim/extra_user_fields/admin/export_users/_dropdown.html.erb @@ -1,7 +1,13 @@ - -