diff --git a/.codeclimate.yml b/.codeclimate.yml index 1e5b76981c..65826a4e12 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -55,4 +55,11 @@ exclude_paths: - "decidim-dataviz/app/packs/src/vendor/**/*" - "packages/eslint-config/index.js" - "packages/webpacker/src/override-config.js" +- "packages/webpacker/src/loaders/decidim-sass-loader.js" - "app/assets/stylesheets/decidim/email.css" +- "app/views/static/api/docs/assets/style.css" +- "config/initializers/origami_date.rb" +- "config/initializers/decidim.rb" +- "decidim-ephemeral_participation/app/permissions/decidim/ephemeral_participation/ephemeral_participation_permissions.rb" +- "app/services/decidim_legacy_routes.rb" +- "app/helpers/concerns/decidim/paginate_helper_override.rb" diff --git a/.csslintrc b/.csslintrc new file mode 100644 index 0000000000..aacba956e5 --- /dev/null +++ b/.csslintrc @@ -0,0 +1,2 @@ +--exclude-exts=.min.css +--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes diff --git a/.erb-lint.yml b/.erb-lint.yml new file mode 100644 index 0000000000..3321adde4e --- /dev/null +++ b/.erb-lint.yml @@ -0,0 +1,30 @@ +--- + +linters: + ExtraNewline: + enabled: true + + FinalNewline: + enabled: true + + SpaceAroundErbTag: + enabled: true + + AllowedScriptType: + enabled: true + allowed_types: + - text/javascript + - text/template + + Rubocop: + enabled: true + + rubocop_config: + AllCops: + DisabledByDefault: true + + Style/StringLiterals: + EnforcedStyle: double_quotes + + Layout/SpaceInsideHashLiteralBraces: + Enabled: true diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..8b2cdbe92b --- /dev/null +++ b/.eslintignore @@ -0,0 +1,13 @@ +**/*{.,-}min.js +decidim-*/vendor/**/*.js +**/node_modules/** +bundle.js +karma.conf.js +webpack.config.js +webpack.config.babel.js +entry.test.js +entry.js +*_manifest.js +coverage +vendor/bundle +**/vendor/**/*.js diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000000..08de8c7f32 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "@decidim" +} diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 6b903f8bd6..ac04d6d69c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,31 +1,12 @@ - +#### :tophat: User Story -# This is a (Bug Report / Feature Proposal) -#### :tophat: Description +#### :clipboard: Related documentation -For bug reports: -* What went wrong? -* What did you expect should have happened? -* What was the config you used? -* What stacktrace or error message from your provider did you see? -For feature proposals: -* What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us. -* If there is additional config how would it look +#### :dart: Acceptance criteria + #### :pushpin: Related issues -* #12345 -#### :clipboard: Additional Data -* ***Decidim deployment where you found the issue***: -* ***Browser & version***: -* ***Screenshot***: -* ***Error messages***: -* ***URL to reproduce the error***: diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..3608c94c9d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,39 @@ +name: Lint +on: [push] + +env: + RUBY_VERSION: 3.1.1 + NODE_VERSION: 18.17.1 + +jobs: + lint: + name: Lint code + runs-on: ubuntu:22.04 + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RAILS_ENV: test + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + - uses: actions/setup-node@master + with: + node-version: ${{ env.NODE_VERSION }} + - run: npm ci + name: Install JS deps + - run: bundle exec rubocop -P + name: Lint Ruby files + - run: bundle exec mdl *.md + name: Lint Markdown files + - run: bundle exec erblint {decidim-census_sms/,decidim-dataviz/,decidim-ephemeral_participation/,decidim-stats/,decidim-valid_auth/}app/{cells,views}/**/*.erb + name: Lint ERB files + - run: npm run stylelint + name: Lint SCSS files + - run: npm run lint + name: Lint JS files diff --git a/.github/workflows/decidim_ci.yml b/.github/workflows/test.yml similarity index 80% rename from .github/workflows/decidim_ci.yml rename to .github/workflows/test.yml index 1d40151b81..7a216af1a4 100644 --- a/.github/workflows/decidim_ci.yml +++ b/.github/workflows/test.yml @@ -1,14 +1,14 @@ -name: "[CI] Decidim" +name: Test on: [push] env: - RUBY_VERSION: 2.7.5 - NODE_VERSION: 16.9.1 + RUBY_VERSION: 3.1.1 + NODE_VERSION: 18.17.1 jobs: - tests: - name: Tests - runs-on: ubuntu-latest + test: + name: Test + runs-on: ubuntu:22.04 services: postgres: image: postgres:11 @@ -36,13 +36,14 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - run: bundle exec rubocop -P - name: Lint Ruby files + - uses: nanasess/setup-chromedriver@v2 - run: bundle exec rake db:test:prepare name: Setup database - name: Precompile assets run: | npm install bundle exec rake assets:precompile - - run: bundle exec rspec + - run: | + mkdir node_modules + bundle exec rspec name: Run specs diff --git a/.github/workflows/test_census_sms.yml b/.github/workflows/test_census_sms.yml new file mode 100644 index 0000000000..3156d4f79b --- /dev/null +++ b/.github/workflows/test_census_sms.yml @@ -0,0 +1,49 @@ +name: Test Census SMS +on: [push] + +env: + RUBY_VERSION: 3.1.1 + NODE_VERSION: 18.17.1 + +jobs: + test: + name: Test Census SMS + runs-on: ubuntu:22-04 + services: + postgres: + image: postgres:11 + ports: ["5432:5432"] + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + POSTGRES_PASSWORD: postgres + redis: + image: redis:3.2-alpine + ports: ["6379:6379"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RAILS_ENV: test + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + - uses: nanasess/setup-chromedriver@v2 + - run: bundle exec rake db:test:prepare + name: Setup database + - name: Precompile assets + run: | + npm install + bundle exec rake assets:precompile + - run: | + mkdir node_modules + bundle exec rspec decidim-census_sms + name: Run specs diff --git a/.github/workflows/test_stats.yml b/.github/workflows/test_stats.yml new file mode 100644 index 0000000000..fe33e7c72d --- /dev/null +++ b/.github/workflows/test_stats.yml @@ -0,0 +1,49 @@ +name: Test Stats +on: [push] + +env: + RUBY_VERSION: 3.1.1 + NODE_VERSION: 18.17.1 + +jobs: + test: + name: Test Stats + runs-on: ubuntu:22.04 + services: + postgres: + image: postgres:11 + ports: ["5432:5432"] + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + POSTGRES_PASSWORD: postgres + redis: + image: redis:3.2-alpine + ports: ["6379:6379"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RAILS_ENV: test + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + - uses: nanasess/setup-chromedriver@v2 + - run: bundle exec rake db:test:prepare + name: Setup database + - name: Precompile assets + run: | + npm install + bundle exec rake assets:precompile + - run: | + mkdir node_modules + bundle exec rspec decidim-stats + name: Run specs diff --git a/.github/workflows/test_valid_auth.yml b/.github/workflows/test_valid_auth.yml new file mode 100644 index 0000000000..b471870701 --- /dev/null +++ b/.github/workflows/test_valid_auth.yml @@ -0,0 +1,49 @@ +name: Test Valid Auth +on: [push] + +env: + RUBY_VERSION: 3.1.1 + NODE_VERSION: 18.17.1 + +jobs: + test: + name: Test Valid Auth + runs-on: ubuntu:22-04 + services: + postgres: + image: postgres:11 + ports: ["5432:5432"] + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + POSTGRES_PASSWORD: postgres + redis: + image: redis:3.2-alpine + ports: ["6379:6379"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RAILS_ENV: test + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + - uses: nanasess/setup-chromedriver@v2 + - run: bundle exec rake db:test:prepare + name: Setup database + - name: Precompile assets + run: | + npm install + bundle exec rake assets:precompile + - run: | + mkdir node_modules + bundle exec rspec decidim-valid_auth + name: Run specs diff --git a/.gitignore b/.gitignore index ff28a0f51b..c52db995e7 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,10 @@ node_modules yarn-debug.log* .yarn-integrity .rbenv-vars + +public/sw.js* + +coverage/ + +.nvmrc +tailwind.config.js diff --git a/.mdl_style.rb b/.mdl_style.rb new file mode 100644 index 0000000000..5f530cc7fe --- /dev/null +++ b/.mdl_style.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +all + +exclude_rule "first-line-h1" + +exclude_rule "line-length" + +exclude_rule "no-bare-urls" + +exclude_rule "no-inline-html" + +rule "no-trailing-punctuation", punctuation: ".,;:!" diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000000..27f388245f --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +style ".mdl_style.rb" diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000..4a1f488b6c --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +18.17.1 diff --git a/.rubocop.yml b/.rubocop.yml index 870c0b9fff..c80dd735d8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,26 @@ -inherit_from: - - .rubocop_ruby.yml - - .rubocop_rails.yml +inherit_from: .rubocop_todo.yml + +inherit_gem: + decidim-dev: rubocop-decidim.yml + +inherit_mode: + merge: + - Exclude + +AllCops: + Include: + - "**/*.rb" + - "**/*.rake" + - "**/*.ru" + - "**/Gemfile" + - "**/Rakefile" + Exclude: + - "spec/decidim_dummy_app/**/*" + - "**/spec/decidim_dummy_app/**/*" + - "bin/**/*" + - "node_modules/**/*" + - "**/node_modules/**/*" + - "db/schema.rb" + - "db/migrate/*" + - "vendor/**/*" + - "**/vendor/**/*" diff --git a/.rubocop_rails.yml b/.rubocop_rails.yml deleted file mode 100644 index 0cf3b441c1..0000000000 --- a/.rubocop_rails.yml +++ /dev/null @@ -1,87 +0,0 @@ -require: rubocop-rails - -Rails: - Enabled: true - -Rails/ActionFilter: - Include: - - app/controllers/**/*.rb - -Rails/ContentTag: - Enabled: false - -Rails/CreateTableWithTimestamps: - Enabled: false - -Rails/EnumUniqueness: - Include: - - app/models/**/*.rb - -Rails/Exit: - Include: - - app/**/*.rb - - config/**/*.rb - - lib/**/*.rb - Exclude: - - lib/**/*.rake - -Rails/FindBy: - Include: - - "**/*.rb" - -Rails/FindEach: - Include: - - app/models/**/*.rb - -Rails/HasAndBelongsToMany: - Include: - - app/models/**/*.rb - -Rails/HasManyOrHasOneDependent: - Include: - - app/models/**/*.rb - -Rails/InverseOf: - Enabled: false - -Rails/LexicallyScopedActionFilter: - Include: - - app/controllers/**/*.rb - -Rails/NotNullColumn: - Enabled: false - -Rails/Output: - Include: - - app/**/*.rb - - config/**/*.rb - - db/**/*.rb - - lib/**/*.rb - Exclude: - - db/seeds.rb -Rails/OutputSafety: - Enabled: false - -Rails/Pluck: - Enabled: false - -Rails/RakeEnvironment: - Enabled: false - -Rails/ReadWriteAttribute: - Include: - - app/models/**/*.rb - -Rails/ReversibleMigration: - Enabled: false - -Rails/ScopeArgs: - Include: - - app/models/**/*.rb - -Rails/SkipsModelValidations: - Enabled: true - -Rails/Validation: - Include: - - app/models/**/*.rb diff --git a/.rubocop_ruby.yml b/.rubocop_ruby.yml deleted file mode 100644 index f8d98c6a7d..0000000000 --- a/.rubocop_ruby.yml +++ /dev/null @@ -1,1756 +0,0 @@ -require: - - rubocop-rspec - - rubocop-faker - -# Common configuration. -AllCops: - Include: - - .simplecov - - "**/*.rb" - - "**/*.rake" - - "**/*.gemspec" - - "**/*.ru" - - "**/Gemfile" - - "**/Rakefile" - Exclude: - - "**/vendor/**/*" - - "development_app/**/*" - - "spec/decidim_dummy_app/**/*" - - "node_modules/**/*" - - "db/migrate/*" - - "db/schema.rb" - # 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: 2.7 - - RSpec: - Patterns: - - "(?:^|/)spec/" - - "(?:^|/)test/" - -# 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/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 - IgnoredMethods: - # 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" - # 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: - 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/PredicateName: - # 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. - IgnoredMethods: - - 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" - - "**/*/permissions_override.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" - - "**/*/permissions_override.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/js_bundles_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 - -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/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000000..5445d7832f --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,24 @@ +Metrics/CyclomaticComplexity: + Exclude: + - 'app/permissions/concerns/decidim/initiatives/admin/permissions_override.rb' + +Metrics/PerceivedComplexity: + Exclude: + - 'app/permissions/concerns/decidim/initiatives/admin/permissions_override.rb' + +RSpec/DescribeClass: + Exclude: + - 'decidim-census_sms/spec/system/census_sms_authorization_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/complete_registration_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/ephemeral_participation_button_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/flash_messages_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/session_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/successful_verification_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/user_menu_spec.rb' + - 'decidim-ephemeral_participation/spec/system/user/verification_conflicts_spec.rb' + - 'spec/system/census16_authorization_spec.rb' + +RSpec/PendingWithoutReason: + Exclude: + - 'spec/system/budgets_ephemeral_participation_spec.rb' + - 'spec/system/budget_spec.rb' diff --git a/.ruby-version b/.ruby-version index a603bb50a2..94ff29cc4d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.5 +3.1.1 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 65c05c5748..01b8644f13 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -19,4 +19,4 @@ This code of conduct applies both within project spaces and in public spaces whe Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) \ No newline at end of file +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/Dockerfile b/Dockerfile index a2bed34030..e590c36c7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,9 @@ -# Decidim Application Dockerfile -# This is an image to start an application based on Decidim (https://decidim.org) -# -# +FROM ruby:3.1.1 - -# Starts with a clean ruby image from Debian (slim) -FROM ruby:2.6.6 - -LABEL maintainer="hola@decidim.org" - -# Installs system dependencies ENV DEBIAN_FRONTEND noninteractive +ENV NODE_MAJOR=18 + +# Install system dependencies RUN apt-get update -qq && apt-get install -y \ build-essential \ graphviz \ @@ -20,7 +13,15 @@ RUN apt-get update -qq && apt-get install -y \ nodejs \ && rm -rf /var/lib/apt/lists/* -# Sets workdir as /app +# Install node +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +RUN apt-get update -qq && apt-get install -y \ + nodejs \ + && rm -rf /var/lib/apt/lists/* + +# Create workdir RUN mkdir /app WORKDIR /app @@ -35,11 +36,17 @@ ENV PATH="${BUNDLE_BIN}:${PATH}" # Copy Gemfile and install bundler dependencies ADD Gemfile Gemfile.lock /app/ +ADD ./decidim-census_sms/decidim-census_sms.gemspec /app/decidim-census_sms/decidim-census_sms.gemspec ADD ./decidim-dataviz/decidim-dataviz.gemspec /app/decidim-dataviz/decidim-dataviz.gemspec +ADD ./decidim-ephemeral_participation/decidim-ephemeral_participation.gemspec /app/decidim-ephemeral_participation/decidim-ephemeral_participation.gemspec ADD ./decidim-stats/decidim-stats.gemspec /app/decidim-stats/decidim-stats.gemspec ADD ./decidim-valid_auth/decidim-valid_auth.gemspec /app/decidim-valid_auth/decidim-valid_auth.gemspec -RUN gem install bundler:2.0.1 +RUN gem install bundler:2.4.14 RUN bundle install # Copy all the code to /app ADD . /app + +# Compile assets +RUN npm i +RUN npm i -g yarn diff --git a/Gemfile b/Gemfile index b134e93cda..b518f8f550 100644 --- a/Gemfile +++ b/Gemfile @@ -2,78 +2,76 @@ source "https://rubygems.org" -DECIDIM_VERSION = { git: "https://github.com/AjuntamentdeBarcelona/decidim", branch: "release/0.26-stable-bcn" }.freeze +DECIDIM_VERSION = "0.28.4" ruby RUBY_VERSION -gem "decidim", DECIDIM_VERSION -gem "decidim-census_sms", path: "decidim-census_sms" -gem "decidim-dataviz", path: "decidim-dataviz" -gem "decidim-ephemeral_participation", path: "decidim-ephemeral_participation" +# gem "decidim", DECIDIM_VERSION +gem "decidim", github: "ajuntamentdeBarcelona/decidim", branch: "bcn/0.28-branch" gem "decidim-initiatives", DECIDIM_VERSION -gem "decidim-navigation_maps", "~> 1.3.3" +gem "decidim-internal_evaluation", github: "AjuntamentdeBarcelona/decidim-internal-evaluation-module", branch: "release/0.28-stable" gem "decidim-sortitions", DECIDIM_VERSION +gem "decidim-templates", DECIDIM_VERSION + +gem "decidim-census_sms", path: "decidim-census_sms" +gem "decidim-dataviz", path: "decidim-dataviz" +gem "decidim-ephemeral_participation", path: "decidim-ephemeral_participation" # Installed but not used anymore gem "decidim-stats", path: "decidim-stats" gem "decidim-valid_auth", path: "decidim-valid_auth" -# Change term_customizer dependency to ruby-gems' when term-customizer is compatible with DECIDIM_VERSION -gem "decidim-decidim_awesome", "~> 0.8.3" -gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer", branch: "release/0.26-stable" +gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome" +gem "decidim-kids", git: "https://github.com/AjuntamentdeBarcelona/decidim-module-kids" +gem "decidim-navigation_maps", git: "https://github.com/Platoniq/decidim-module-navigation_maps" +gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer" -gem "virtus-multiparams" -gem "wicked_pdf" +gem "origami" +gem "wicked_pdf", "< 2.8" gem "wkhtmltopdf-binary" -gem "deface" -gem "lograge" -gem "origami" gem "progressbar" gem "puma" -gem "uglifier" - -# Needed to be able to debug Puma status -gem "barnes" group :development, :test do gem "bootsnap" gem "byebug", platform: :mri gem "decidim-dev", DECIDIM_VERSION gem "dotenv-rails" - gem "faker", "~> 2.14" + gem "faker" + gem "mdl" gem "rubocop-faker" end group :development do + gem "foreman" gem "letter_opener_web" gem "listen" - gem "rubocop", "~> 0.92.0" - gem "spring" - gem "spring-commands-rspec" - gem "spring-watcher-listen" + gem "rubocop" gem "web-console" end group :production do - # Used to restart puma workers every 6h and free memory - gem "puma_worker_killer" - # Let's kill long-running requests after the Heroku router has responded to. - # https://devcenter.heroku.com/articles/h12-request-timeout-in-ruby-mri#rack-timeout gem "aws-sdk-s3", require: false + gem "barnes" # Needed to be able to debug Puma status gem "dalli" - gem "fog-aws" # to remove once image migration is complete + gem "lograge" + gem "matrix" + gem "puma_worker_killer" # Used to restart puma workers every 6h and free memory gem "rack_password" gem "rack-ssl-enforcer" - gem "rack-timeout" + gem "rack-timeout" # Let's kill long-running requests after the Heroku router has responded to gem "rails_12factor" gem "rails_autoscale_agent" + gem "rexml" gem "scout_apm" gem "sentry-rails" gem "sentry-ruby" gem "sentry-sidekiq" gem "sidekiq" + gem "stackprof" end group :test do + gem "codecov", require: false gem "database_cleaner" gem "rspec" end diff --git a/Gemfile.lock b/Gemfile.lock index 582fd67fd9..0136fecf8f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,263 +1,254 @@ GIT - remote: https://github.com/AjuntamentdeBarcelona/decidim - revision: f7e6972f63436b6c9be82498a341d5abb36bb283 - branch: release/0.26-stable-bcn + remote: https://github.com/AjuntamentdeBarcelona/decidim-internal-evaluation-module.git + revision: cf5eb7f00f957881ade8360a69655e92d95ceff0 + branch: release/0.28-stable specs: - decidim (0.26.7) - decidim-accountability (= 0.26.7) - decidim-admin (= 0.26.7) - decidim-api (= 0.26.7) - decidim-assemblies (= 0.26.7) - decidim-blogs (= 0.26.7) - decidim-budgets (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-debates (= 0.26.7) - decidim-forms (= 0.26.7) - decidim-generators (= 0.26.7) - decidim-meetings (= 0.26.7) - decidim-pages (= 0.26.7) - decidim-participatory_processes (= 0.26.7) - decidim-proposals (= 0.26.7) - decidim-sortitions (= 0.26.7) - decidim-surveys (= 0.26.7) - decidim-system (= 0.26.7) - decidim-templates (= 0.26.7) - decidim-verifications (= 0.26.7) - decidim-accountability (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-admin (0.26.7) + decidim-internal_evaluation (0.0.1) + decidim-core (~> 0.28.0) + decidim-proposals (~> 0.28.0) + decidim-templates (~> 0.28.0) + deface (~> 1.9) + +GIT + remote: https://github.com/AjuntamentdeBarcelona/decidim-module-kids + revision: df16cf4de13c306348761d850d19815c8221874e + specs: + decidim-kids (0.2.0) + decidim-core (>= 0.28, < 0.29) + decidim-system (>= 0.28, < 0.29) + decidim-verifications (>= 0.28, < 0.29) + deface (>= 1.5) + +GIT + remote: https://github.com/Platoniq/decidim-module-navigation_maps + revision: 7fd50e1368bae4c7955c0ba8ec5ee395273a5329 + specs: + decidim-navigation_maps (1.5.0) + decidim-admin (>= 0.28, < 0.29) + decidim-core (>= 0.28, < 0.29) + +GIT + remote: https://github.com/ajuntamentdeBarcelona/decidim.git + revision: 9c78c1c36bb6c44a855c02acd6f58c70345853c4 + branch: bcn/0.28-branch + specs: + decidim (0.28.4) + decidim-accountability (= 0.28.4) + decidim-admin (= 0.28.4) + decidim-api (= 0.28.4) + decidim-assemblies (= 0.28.4) + decidim-blogs (= 0.28.4) + decidim-budgets (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-debates (= 0.28.4) + decidim-forms (= 0.28.4) + decidim-generators (= 0.28.4) + decidim-meetings (= 0.28.4) + decidim-pages (= 0.28.4) + decidim-participatory_processes (= 0.28.4) + decidim-proposals (= 0.28.4) + decidim-sortitions (= 0.28.4) + decidim-surveys (= 0.28.4) + decidim-system (= 0.28.4) + decidim-verifications (= 0.28.4) + decidim-accountability (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-admin (0.28.4) active_link_to (~> 1.0) - decidim-core (= 0.26.7) + decidim-core (= 0.28.4) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-api (0.26.7) - graphql (~> 1.12, < 1.13) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-api (0.28.4) + commonmarker (~> 0.23.0, >= 0.23.9) + decidim-core (= 0.28.4) + graphql (~> 2.0.0) + graphql-docs (~> 3.0.1) rack-cors (~> 1.0) + decidim-assemblies (0.28.4) + decidim-core (= 0.28.4) + decidim-blogs (0.28.4) + decidim-admin (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-budgets (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-comments (0.28.4) + decidim-core (= 0.28.4) redcarpet (~> 3.5, >= 3.5.1) - decidim-assemblies (0.26.7) - decidim-core (= 0.26.7) - decidim-blogs (0.26.7) - decidim-admin (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-budgets (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-comments (0.26.7) - decidim-core (= 0.26.7) - redcarpet (~> 3.5, >= 3.5.1) - decidim-core (0.26.7) + decidim-core (0.28.4) active_link_to (~> 1.0) - acts_as_list (~> 0.9) + acts_as_list (~> 1.0) batch-loader (~> 1.2) browser (~> 2.7) - carrierwave (~> 2.2.1) + carrierwave (~> 2.2.5, >= 2.2.5) cells-erb (~> 0.1.0) cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) - date_validator (~> 0.9.0) - decidim-api (= 0.26.7) + date_validator (~> 0.12.0) devise (~> 4.7) - devise-i18n (~> 1.2) + devise-i18n (~> 1.2, < 1.11.1) diffy (~> 3.3) - doorkeeper (~> 5.1) + doorkeeper (~> 5.6, >= 5.6.6) doorkeeper-i18n (~> 4.0) - file_validators (~> 2.1) + file_validators (~> 3.0) fog-local (~> 0.6) - foundation_rails_helper - geocoder (~> 1.7.5) + foundation_rails_helper (~> 4.0) + geocoder (~> 1.8) hashdiff (>= 0.4.0, < 2.0.0) invisible_captcha (~> 0.12) kaminari (~> 1.2, >= 1.2.1) - loofah (~> 2.3.1) + loofah (~> 2.19, >= 2.19.1) mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) - mustache (~> 1.1.0) + net-smtp (~> 0.3.1) 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.1.4, < 2) + pg (~> 1.4.0, < 2) pg_search (~> 2.2) premailer-rails (~> 1.10) - rack (~> 2.2, >= 2.2.3) + psych (~> 4.0) + rack (~> 2.2, >= 2.2.6.4) rack-attack (~> 6.0) - rails (~> 6.0.4) + rails (~> 6.1.7, >= 6.1.7.4) rails-i18n (~> 6.0) - ransack (~> 2.4.1) - rectify (~> 0.13.0) + ransack (~> 3.2.1) redis (~> 4.1) request_store (~> 1.5.0) rubyXL (~> 3.4) rubyzip (~> 2.0) - searchlight (~> 4.1) - seven_zip_ruby (~> 1.3) - social-share-button (~> 1.2, >= 1.2.1) - valid_email2 (~> 2.1) - webpacker (= 6.0.0.rc.5) + shakapacker (~> 7.1.0) + valid_email2 (~> 4.0) + web-push (~> 3.0) wisper (~> 2.0) - decidim-debates (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-dev (0.26.7) - axe-core-rspec (~> 4.1.0) - byebug (~> 11.0) - capybara (~> 3.24) - db-query-matchers (~> 0.10.0) - decidim (= 0.26.7) - erb_lint (~> 0.0.35) - factory_bot_rails (~> 4.8) - i18n-tasks (~> 0.9.18) - mdl (~> 0.5) - nokogiri (~> 1.12) - puma (~> 5.0) - rails-controller-testing (~> 1.0) - rspec-cells (~> 0.3.4) - rspec-html-matchers (~> 0.9.1) - rspec-rails (~> 4.0) - rspec-retry (~> 0.6.2) - rspec_junit_formatter (~> 0.3.0) - rubocop (~> 0.92.0) - rubocop-rails (~> 2.8) - rubocop-rspec (= 1.43.2) - selenium-webdriver (~> 3.142) - simplecov (~> 0.19.0) - simplecov-cobertura (~> 1.3.1) - system_test_html_screenshots (~> 0.2) - w3c_rspec_validators (~> 0.3.0) - webmock (~> 3.6) - wisper-rspec (~> 1.0) - decidim-forms (0.26.7) - decidim-core (= 0.26.7) - wicked_pdf (~> 2.1) - wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.26.7) - decidim-core (= 0.26.7) - decidim-initiatives (0.26.7) - decidim-admin (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-verifications (= 0.26.7) - origami (~> 2.1) - virtus-multiparams (~> 0.1) - wicked (~> 1.3) + decidim-debates (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-forms (0.28.4) + decidim-core (= 0.28.4) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.26.7) - decidim-core (= 0.26.7) - decidim-forms (= 0.26.7) + decidim-generators (0.28.4) + decidim-core (= 0.28.4) + decidim-meetings (0.28.4) + decidim-core (= 0.28.4) + decidim-forms (= 0.28.4) icalendar (~> 2.5) - decidim-pages (0.26.7) - decidim-core (= 0.26.7) - decidim-participatory_processes (0.26.7) - decidim-core (= 0.26.7) - decidim-proposals (0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - doc2text (~> 0.4.4) + decidim-pages (0.28.4) + decidim-core (= 0.28.4) + decidim-participatory_processes (0.28.4) + decidim-core (= 0.28.4) + decidim-proposals (0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + doc2text (~> 0.4.6) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.26.7) - decidim-admin (= 0.26.7) - decidim-comments (= 0.26.7) - decidim-core (= 0.26.7) - decidim-proposals (= 0.26.7) - decidim-surveys (0.26.7) - decidim-core (= 0.26.7) - decidim-forms (= 0.26.7) - decidim-templates (= 0.26.7) - decidim-system (0.26.7) + decidim-surveys (0.28.4) + decidim-core (= 0.28.4) + decidim-forms (= 0.28.4) + decidim-system (0.28.4) active_link_to (~> 1.0) - decidim-core (= 0.26.7) + decidim-core (= 0.28.4) devise (~> 4.7) devise-i18n (~> 1.2) - devise_invitable (~> 2.0) - decidim-templates (0.26.7) - decidim-core (= 0.26.7) - decidim-forms (= 0.26.7) - decidim-verifications (0.26.7) - decidim-core (= 0.26.7) + devise_invitable (~> 2.0, >= 2.0.9) + decidim-verifications (0.28.4) + decidim-core (= 0.28.4) + +GIT + remote: https://github.com/decidim-ice/decidim-module-decidim_awesome + revision: 84374037d34a3ac80dc18406834169c65869f11b + specs: + decidim-decidim_awesome (0.11.2) + decidim-admin (>= 0.28.0, < 0.29) + decidim-core (>= 0.28.0, < 0.29) + deface (>= 1.5) + sassc (~> 2.3) GIT remote: https://github.com/mainio/decidim-module-term_customizer - revision: f0d720710822f1231ea249dd71f978143d38a6c4 - branch: release/0.26-stable + revision: 03e6c98e85a00fe47f8db2726f1a1a98e808efda specs: - decidim-term_customizer (0.26.0) - decidim-admin (~> 0.26.0) - decidim-core (~> 0.26.0) + decidim-term_customizer (0.28.0) + decidim-admin (~> 0.28.0) + decidim-core (~> 0.28.0) PATH remote: decidim-census_sms specs: - decidim-census_sms (0.0.1) - decidim-core + decidim-census_sms (0.0.3) + decidim-core (~> 0.28.0) PATH remote: decidim-dataviz specs: - decidim-dataviz (0.0.1) - decidim-core + decidim-dataviz (0.0.3) + decidim-core (~> 0.28.0) PATH remote: decidim-ephemeral_participation specs: - decidim-ephemeral_participation (0.0.2) - decidim-verifications + decidim-ephemeral_participation (0.0.4) + decidim-verifications (~> 0.28.0) PATH remote: decidim-stats specs: - decidim-stats (0.0.1) - decidim-comments - decidim-core - decidim-proposals + decidim-stats (0.0.3) + decidim-comments (~> 0.28.0) + decidim-core (~> 0.28.0) + decidim-proposals (~> 0.28.0) PATH remote: decidim-valid_auth specs: - decidim-valid_auth (0.0.1) - decidim-verifications + decidim-valid_auth (0.0.3) + decidim-verifications (~> 0.28.0) GEM remote: https://rubygems.org/ specs: - actioncable (6.0.6.1) - actionpack (= 6.0.6.1) + actioncable (6.1.7.9) + actionpack (= 6.1.7.9) + activesupport (= 6.1.7.9) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.6.1) - actionpack (= 6.0.6.1) - activejob (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) + actionmailbox (6.1.7.9) + actionpack (= 6.1.7.9) + activejob (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) mail (>= 2.7.1) - actionmailer (6.0.6.1) - actionpack (= 6.0.6.1) - actionview (= 6.0.6.1) - activejob (= 6.0.6.1) + actionmailer (6.1.7.9) + actionpack (= 6.1.7.9) + actionview (= 6.1.7.9) + activejob (= 6.1.7.9) + activesupport (= 6.1.7.9) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.6.1) - actionview (= 6.0.6.1) - activesupport (= 6.0.6.1) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.7.9) + actionview (= 6.1.7.9) + activesupport (= 6.1.7.9) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.6.1) - actionpack (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) + actiontext (6.1.7.9) + actionpack (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) nokogiri (>= 1.8.5) - actionview (6.0.6.1) - activesupport (= 6.0.6.1) + actionview (6.1.7.9) + activesupport (= 6.1.7.9) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -265,86 +256,82 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.0.6.1) - activesupport (= 6.0.6.1) + activejob (6.1.7.9) + activesupport (= 6.1.7.9) globalid (>= 0.3.6) - activemodel (6.0.6.1) - activesupport (= 6.0.6.1) - activerecord (6.0.6.1) - activemodel (= 6.0.6.1) - activesupport (= 6.0.6.1) - activestorage (6.0.6.1) - actionpack (= 6.0.6.1) - activejob (= 6.0.6.1) - activerecord (= 6.0.6.1) + activemodel (6.1.7.9) + activesupport (= 6.1.7.9) + activerecord (6.1.7.9) + activemodel (= 6.1.7.9) + activesupport (= 6.1.7.9) + activestorage (6.1.7.9) + actionpack (= 6.1.7.9) + activejob (= 6.1.7.9) + activerecord (= 6.1.7.9) + activesupport (= 6.1.7.9) marcel (~> 1.0) - activesupport (6.0.6.1) + mini_mime (>= 1.1.0) + activesupport (6.1.7.9) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) - acts_as_list (0.9.19) - activerecord (>= 3.0) - addressable (2.8.4) - public_suffix (>= 2.0.2, < 6.0) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + acts_as_list (1.2.3) + activerecord (>= 6.1) + activesupport (>= 6.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) - aws-eventstream (1.2.0) - aws-partitions (1.665.0) - aws-sdk-core (3.168.1) - aws-eventstream (~> 1, >= 1.0.2) + aws-eventstream (1.3.0) + aws-partitions (1.896.0) + aws-sdk-core (3.191.3) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.59.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-kms (1.77.0) + aws-sdk-core (~> 3, >= 3.191.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.117.1) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-s3 (1.143.0) + aws-sdk-core (~> 3, >= 3.191.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.2) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) - axe-core-api (4.7.0) - dumb_delegator - virtus - axe-core-rspec (4.1.0) - axe-core-api - dumb_delegator - virtus - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) barnes (0.0.9) multi_json (~> 1) statsd-ruby (~> 1.1) + base64 (0.2.0) batch-loader (1.5.0) - bcrypt (3.1.19) - better_html (1.0.16) - actionview (>= 4.0) - activesupport (>= 4.0) + bcrypt (3.1.20) + better_html (2.1.1) + actionview (>= 6.0) + activesupport (>= 6.0) ast (~> 2.0) erubi (~> 1.4) - html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties + bigdecimal (3.1.8) bindex (0.8.1) - bootsnap (1.14.0) + bootsnap (1.18.3) msgpack (~> 1.2) browser (2.7.1) - builder (3.2.4) + builder (3.3.0) + bullet (7.2.0) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.11) byebug (11.1.3) - capybara (3.39.2) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.4) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -363,48 +350,83 @@ GEM cells-rails (0.1.5) actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) - charlock_holmes (0.7.7) - chef-utils (18.2.7) + charlock_holmes (0.7.9) + chef-utils (18.1.0) concurrent-ruby - childprocess (3.0.0) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (5.0.0) - coffee-script (>= 2.2.0) - railties (>= 5.2.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) + cmdparse (3.0.7) + codecov (0.2.12) + json + simplecov colorize (0.8.1) - concurrent-ruby (1.2.2) - connection_pool (2.3.0) - crack (0.4.5) + commonmarker (0.23.10) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.14.0) + css_parser (1.19.1) addressable - dalli (3.2.3) - database_cleaner (2.0.1) - database_cleaner-active_record (~> 2.0.0) - database_cleaner-active_record (2.0.1) + csv (3.3.0) + dalli (3.2.8) + database_cleaner (2.0.2) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.1.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.3) - date_validator (0.9.0) - activemodel - activesupport - db-query-matchers (0.10.0) - activesupport (>= 4.0, < 7) - rspec (~> 3.0) - decidim-decidim_awesome (0.8.3) - decidim-admin (>= 0.25.0, < 0.27) - decidim-core (>= 0.25.0, < 0.27) - sassc (~> 2.3) - decidim-navigation_maps (1.3.4) - decidim-admin (>= 0.25, < 0.27) - decidim-core (>= 0.25, < 0.27) + date (3.3.4) + date_validator (0.12.0) + activemodel (>= 3) + activesupport (>= 3) + decidim-dev (0.28.4) + bullet (~> 7.0) + byebug (~> 11.0) + capybara (~> 3.39) + decidim (= 0.28.4) + erb_lint (~> 0.4.0) + factory_bot_rails (~> 6.2) + faker (~> 3.2) + i18n-tasks (~> 1.0) + nokogiri (~> 1.14, >= 1.14.3) + parallel_tests (~> 4.2) + puma (~> 6.2, >= 6.3.1) + rails-controller-testing (~> 1.0) + rspec (~> 3.12) + rspec-cells (~> 0.3.7) + rspec-html-matchers (~> 0.10) + rspec-rails (~> 6.0) + rspec-retry (~> 0.6.2) + rspec_junit_formatter (~> 0.6.0) + rubocop (~> 1.50.0) + rubocop-faker (~> 1.1) + rubocop-rails (~> 2.19) + rubocop-rspec (~> 2.20) + selenium-webdriver (~> 4.9) + simplecov (~> 0.22.0) + simplecov-cobertura (~> 2.1.0) + spring (~> 2.0) + spring-watcher-listen (~> 2.0) + w3c_rspec_validators (~> 0.3.0) + webmock (~> 3.18) + wisper-rspec (~> 1.0) + decidim-initiatives (0.28.4) + decidim-admin (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-verifications (= 0.28.4) + hexapdf (~> 0.32.0) + wicked_pdf (~> 2.1) + wkhtmltopdf-binary (~> 0.12) + decidim-sortitions (0.28.4) + decidim-admin (= 0.28.4) + decidim-comments (= 0.28.4) + decidim-core (= 0.28.4) + decidim-proposals (= 0.28.4) + decidim-templates (0.28.4) + decidim-core (= 0.28.4) + decidim-forms (= 0.28.4) + decidim-proposals (= 0.28.4) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -414,9 +436,7 @@ GEM polyglot railties (>= 5.2) rainbow (>= 2.1.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.9.2) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -424,110 +444,124 @@ GEM warden (~> 1.2.3) devise-i18n (1.11.0) devise (>= 4.9.0) - devise_invitable (2.0.8) + devise_invitable (2.0.9) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) diffy (3.4.2) - doc2text (0.4.6) - nokogiri (>= 1.13.2, < 1.15.0) + doc2text (0.4.7) + nokogiri (>= 1.13.2, < 1.17.0) rubyzip (~> 2.3.0) docile (1.4.0) - doorkeeper (5.6.6) + doorkeeper (5.7.1) railties (>= 5) doorkeeper-i18n (4.0.1) - dotenv (2.8.1) - dotenv-rails (2.8.1) - dotenv (= 2.8.1) - railties (>= 3.2) - dumb_delegator (1.0.0) - equalizer (0.0.11) - erb_lint (0.0.37) + dotenv (3.1.0) + dotenv-rails (3.1.0) + dotenv (= 3.1.0) + railties (>= 6.1) + erb_lint (0.4.0) activesupport - better_html (~> 1.0.7) - html_tokenizer + better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow rubocop smart_properties erbse (0.1.4) temple - erubi (1.12.0) - excon (0.100.0) - execjs (2.8.1) - factory_bot (4.11.1) - activesupport (>= 3.0.0) - factory_bot_rails (4.11.1) - factory_bot (~> 4.11.1) - railties (>= 3.0.0) - faker (2.23.0) + erubi (1.13.0) + escape_utils (1.2.2) + excon (0.112.0) + extended-markdown-filter (0.7.0) + html-pipeline (~> 2.9) + factory_bot (6.5.0) + activesupport (>= 5.0.0) + factory_bot_rails (6.4.3) + factory_bot (~> 6.4) + railties (>= 5.0.0) + faker (3.2.3) i18n (>= 1.8.11, < 2) - faraday (2.7.10) - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - ffi (1.15.5) - file_validators (2.3.0) + faraday (2.12.0) + faraday-net_http (>= 2.0, < 3.4) + json + logger + faraday-net_http (3.3.0) + net-http + ffi (1.16.3) + file_validators (3.0.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-aws (3.15.0) - fog-core (~> 2.1) - fog-json (~> 1.1) - fog-xml (~> 0.1) - fog-core (2.3.0) + fog-core (2.5.0) builder excon (~> 0.71) formatador (>= 0.2, < 2.0) mime-types - fog-json (1.2.0) - fog-core - multi_json (~> 1.10) fog-local (0.8.0) fog-core (>= 1.27, < 3.0) - fog-xml (0.1.4) - fog-core - nokogiri (>= 1.5.11, < 2.0.0) + foreman (0.87.2) 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) - geocoder (1.7.5) + gemoji (3.0.1) + geocoder (1.8.3) + base64 (>= 0.1.0) + csv (>= 3.0.0) + geom2d (0.4.1) get_process_mem (0.2.7) ffi (~> 1.0) - globalid (1.1.0) - activesupport (>= 5.0) - graphql (1.12.24) - hashdiff (1.0.1) + globalid (1.2.1) + activesupport (>= 6.1) + graphql (2.0.31) + base64 + graphql-docs (3.0.1) + commonmarker (~> 0.16) + escape_utils (~> 1.2.2) + extended-markdown-filter (~> 0.4) + gemoji (~> 3.0) + graphql (~> 2.0) + html-pipeline (~> 2.9) + sass (~> 3.4) + hashdiff (1.1.1) hashie (5.0.0) - highline (2.1.0) - html_tokenizer (0.0.7) + hexapdf (0.32.2) + cmdparse (~> 3.0, >= 3.0.3) + geom2d (~> 0.3) + openssl (>= 2.2.1) + highline (3.1.1) + reline + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) htmlentities (4.3.4) - i18n (1.14.1) + i18n (1.14.6) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.37) + i18n-tasks (1.0.14) activesupport (>= 4.0.2) ast (>= 2.1.0) erubi highline (>= 2.0.0) i18n - parser (>= 2.2.3.0) + parser (>= 3.2.2.1) rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.8.0) + icalendar (2.10.3) ice_cube (~> 0.16) - ice_cube (0.16.4) - ice_nine (0.11.2) - image_processing (1.12.2) + ostruct + ice_cube (0.17.0) + image_processing (1.13.0) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - jmespath (1.6.1) - json (2.6.3) - jwt (2.7.1) + io-console (0.7.2) + jmespath (1.6.2) + json (2.7.2) + jwt (2.9.3) + base64 kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -544,32 +578,33 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - launchy (2.5.0) - addressable (~> 2.7) - letter_opener (1.8.1) + launchy (2.5.2) + addressable (~> 2.8) + letter_opener (1.9.0) launchy (>= 2.2, < 3) letter_opener_web (2.0.0) actionmailer (>= 5.2) letter_opener (~> 1.7) railties (>= 5.2) rexml - listen (3.7.1) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - lograge (0.12.0) + logger (1.6.1) + lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.3.1) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) mdl (0.12.0) kramdown (~> 2.3) @@ -577,35 +612,39 @@ GEM mixlib-cli (~> 2.1, >= 2.1.1) mixlib-config (>= 2.2.1, < 4) mixlib-shellout - method_source (1.0.0) - mime-types (3.4.1) + method_source (1.1.0) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) - mini_magick (4.12.0) - mini_mime (1.1.2) - minitest (5.18.1) + mime-types-data (3.2024.1001) + mini_magick (4.13.2) + mini_mime (1.1.5) + minitest (5.25.1) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb mixlib-shellout (3.2.7) chef-utils - msgpack (1.6.0) + msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) - mustache (1.1.1) - net-imap (0.3.6) + net-http (0.4.1) + uri + net-imap (0.4.17) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.3.4) net-protocol - nio4r (2.5.9) - nokogiri (1.14.5-arm64-darwin) + nio4r (2.7.3) + nokogiri (1.16.7-aarch64-linux) racc (~> 1.4) - nokogiri (1.14.5-x86_64-linux) + nokogiri (1.16.7-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) @@ -620,98 +659,108 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - omniauth (2.1.1) + omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.1.1) - jwt (>= 2.0) - oauth2 (~> 2.0.6) + omniauth-google-oauth2 (1.2.0) + jwt (>= 2.9) + oauth2 (~> 2.0) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) - omniauth-oauth (1.2.0) + omniauth-oauth2 (~> 1.8) + omniauth-oauth (1.2.1) oauth omniauth (>= 1.0, < 3) + rack (>= 1.6.2, < 4) omniauth-oauth2 (1.8.0) oauth2 (>= 1.4, < 3) omniauth (~> 2.0) - omniauth-rails_csrf_protection (1.0.1) + omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack + openssl (3.2.0) origami (2.1.0) colorize (~> 0.7) orm_adapter (0.5.0) + ostruct (0.6.0) paper_trail (12.3.0) activerecord (>= 5.2) request_store (~> 1.1) - parallel (1.22.1) - parser (3.1.2.1) + parallel (1.26.3) + parallel_tests (4.7.2) + parallel + parser (3.3.5.0) ast (~> 2.4.1) - pg (1.1.4) - pg_search (2.3.6) - activerecord (>= 5.2) - activesupport (>= 5.2) + racc + pg (1.4.6) + pg_search (2.3.7) + activerecord (>= 6.1) + activesupport (>= 6.1) polyglot (0.3.5) - premailer (1.21.0) + premailer (1.27.0) addressable - css_parser (>= 1.12.0) + css_parser (>= 1.19.0) htmlentities (>= 4.0.0) premailer-rails (1.12.0) actionmailer (>= 3) net-smtp premailer (~> 1.7, >= 1.7.9) - progressbar (1.11.0) - public_suffix (5.0.3) - puma (5.6.5) + progressbar (1.13.0) + psych (4.0.6) + stringio + public_suffix (6.0.1) + puma (6.4.2) nio4r (~> 2.0) puma_worker_killer (0.3.1) get_process_mem (~> 0.2) puma (>= 2.7) - racc (1.7.1) - rack (2.2.7) - rack-attack (6.6.1) - rack (>= 1.0, < 3) + racc (1.8.1) + rack (2.2.10) + rack-attack (6.7.0) + rack (>= 1.0, < 4) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (3.0.6) - rack - rack-proxy (0.7.6) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rack-proxy (0.7.7) rack rack-ssl-enforcer (0.2.9) rack-test (2.1.0) rack (>= 1.3) rack-timeout (0.6.3) rack_password (1.3) - rails (6.0.6.1) - actioncable (= 6.0.6.1) - actionmailbox (= 6.0.6.1) - actionmailer (= 6.0.6.1) - actionpack (= 6.0.6.1) - actiontext (= 6.0.6.1) - actionview (= 6.0.6.1) - activejob (= 6.0.6.1) - activemodel (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) - bundler (>= 1.3.0) - railties (= 6.0.6.1) + rails (6.1.7.9) + actioncable (= 6.1.7.9) + actionmailbox (= 6.1.7.9) + actionmailer (= 6.1.7.9) + actionpack (= 6.1.7.9) + actiontext (= 6.1.7.9) + actionview (= 6.1.7.9) + activejob (= 6.1.7.9) + activemodel (= 6.1.7.9) + activerecord (= 6.1.7.9) + activestorage (= 6.1.7.9) + activesupport (= 6.1.7.9) + bundler (>= 1.15.0) + railties (= 6.1.7.9) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.1.1) + rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) rails-i18n (6.0.0) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 7) @@ -721,174 +770,177 @@ GEM rails_autoscale_agent (0.12.0) rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (6.0.6.1) - actionpack (= 6.0.6.1) - activesupport (= 6.0.6.1) + railties (6.1.7.9) + actionpack (= 6.1.7.9) + activesupport (= 6.1.7.9) method_source - rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) + rake (>= 12.2) + thor (~> 1.0) rainbow (3.1.1) - rake (13.0.6) - ransack (2.4.2) - activerecord (>= 5.2.4) - activesupport (>= 5.2.4) + rake (13.2.1) + ransack (3.2.1) + activerecord (>= 6.1.5) + activesupport (>= 6.1.5) i18n rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - rectify (0.13.0) - activemodel (>= 4.1.0) - activerecord (>= 4.1.0) - activesupport (>= 4.1.0) - virtus (~> 1.0.5) - wisper (>= 1.6.1) redcarpet (3.6.0) redis (4.8.1) - redis-client (0.11.2) + redis-client (0.21.0) connection_pool - regexp_parser (2.6.1) + regexp_parser (2.9.2) + reline (0.5.10) + io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) - responders (3.1.0) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-cells (0.3.8) + rexml (3.3.8) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-cells (0.3.9) cells (>= 4.0.0, < 6.0.0) - rspec-rails (>= 3.0.0, < 6.1.0) - rspec-core (3.12.0) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + rspec-rails (>= 3.0.0, < 6.2.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-html-matchers (0.9.4) + rspec-support (~> 3.13.0) + rspec-html-matchers (0.10.0) nokogiri (~> 1) - rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.12.0) + rspec (>= 3.0.0.a) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (4.1.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) + rspec-support (~> 3.13.0) + rspec-rails (6.1.5) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.12.0) - rspec_junit_formatter (0.3.0) + rspec-support (3.13.1) + rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.92.0) + rubocop (1.50.2) + json (~> 2.3) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) - rexml - rubocop-ast (>= 0.5.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.23.0) - parser (>= 3.1.1.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.32.3) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) rubocop-faker (1.1.0) faker (>= 2.12.0) rubocop (>= 0.82.0) - rubocop-rails (2.9.1) + rubocop-rails (2.25.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) - rubocop-rspec (1.43.2) - rubocop (~> 0.87) - ruby-progressbar (1.11.0) - ruby-vips (2.1.4) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rspec (2.20.0) + rubocop (~> 1.33) + rubocop-capybara (~> 2.17) + ruby-progressbar (1.13.0) + ruby-vips (2.2.2) ffi (~> 1.12) - ruby2_keywords (0.0.5) - rubyXL (3.4.25) + logger + rubyXL (3.4.27) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sassc (2.4.0) ffi (~> 1.9) - scout_apm (5.3.2) + scout_apm (5.3.7) parser - searchlight (4.1.0) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) + selenium-webdriver (4.25.0) + base64 (~> 0.2) + logger (~> 1.4) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) semantic_range (3.0.0) - sentry-rails (5.6.0) + sentry-rails (5.16.1) railties (>= 5.0) - sentry-ruby (~> 5.6.0) - sentry-ruby (5.6.0) + sentry-ruby (~> 5.16.1) + sentry-ruby (5.16.1) concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-sidekiq (5.6.0) - sentry-ruby (~> 5.6.0) + sentry-sidekiq (5.16.1) + sentry-ruby (~> 5.16.1) sidekiq (>= 3.0) - seven_zip_ruby (1.3.0) - sidekiq (7.0.1) + shakapacker (7.1.0) + activesupport (>= 5.2) + rack-proxy (>= 0.6.1) + railties (>= 5.2) + semantic_range (>= 2.3.0) + sidekiq (7.2.2) concurrent-ruby (< 2) connection_pool (>= 2.3.0) rack (>= 2.2.4) - redis-client (>= 0.9.0) - simplecov (0.19.1) + redis-client (>= 0.19.0) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) - simplecov-cobertura (1.3.1) - simplecov (~> 0.8) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) smart_properties (1.17.0) snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - social-share-button (1.2.4) - coffee-rails - spring (4.1.0) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-watcher-listen (2.1.0) + spring (2.1.1) + spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) - spring (>= 4) - sprockets (4.2.0) + spring (>= 1.2, < 3.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - ssrf_filter (1.1.1) + ssrf_filter (1.1.2) + stackprof (0.2.26) statsd-ruby (1.5.0) - system_test_html_screenshots (0.2.0) - actionpack (>= 5.2, < 6.1.a) - temple (0.10.2) + stringio (3.1.1) + temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.2.2) - thread_safe (0.3.6) - tilt (2.2.0) - timeout (0.4.0) + thor (1.3.2) + tilt (2.4.0) + timeout (0.4.1) tomlrb (2.0.3) - tzinfo (1.2.11) - thread_safe (~> 0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uber (0.1.0) - uglifier (4.2.0) - execjs (>= 0.3.0, < 3) - unicode-display_width (1.8.0) - valid_email2 (2.3.1) + unicode-display_width (2.6.0) + uniform_notifier (1.16.0) + uri (0.13.1) + valid_email2 (4.0.6) activemodel (>= 3.2) mail (~> 2.5) - version_gem (1.1.3) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - virtus-multiparams (0.1.1) - virtus (~> 1.0) + version_gem (1.1.4) w3c_rspec_validators (0.3.0) rails rspec @@ -899,36 +951,35 @@ GEM rexml (~> 3.2) 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) - webmock (3.18.1) + web-push (3.0.1) + jwt (~> 2.0) + openssl (~> 3.0) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webpacker (6.0.0.rc.5) - activesupport (>= 5.2) - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) - websocket-driver (0.7.5) + websocket (1.2.11) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked (1.4.0) - railties (>= 3.0.7) - wicked_pdf (2.6.3) + wicked_pdf (2.7.0) activesupport wisper (2.0.1) wisper-rspec (1.1.0) wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.18) PLATFORMS + aarch64-linux arm64-darwin-21 + arm64-darwin-23 x86_64-linux DEPENDENCIES @@ -936,27 +987,32 @@ DEPENDENCIES barnes bootsnap byebug + codecov dalli database_cleaner decidim! decidim-census_sms! decidim-dataviz! - decidim-decidim_awesome (~> 0.8.3) - decidim-dev! + decidim-decidim_awesome! + decidim-dev (= 0.28.4) decidim-ephemeral_participation! - decidim-initiatives! - decidim-navigation_maps (~> 1.3.3) - decidim-sortitions! + decidim-initiatives (= 0.28.4) + decidim-internal_evaluation! + decidim-kids! + decidim-navigation_maps! + decidim-sortitions (= 0.28.4) decidim-stats! + decidim-templates (= 0.28.4) decidim-term_customizer! decidim-valid_auth! - deface dotenv-rails - faker (~> 2.14) - fog-aws + faker + foreman letter_opener_web listen lograge + matrix + mdl origami progressbar puma @@ -966,25 +1022,22 @@ DEPENDENCIES rack_password rails_12factor rails_autoscale_agent + rexml rspec - rubocop (~> 0.92.0) + rubocop rubocop-faker scout_apm sentry-rails sentry-ruby sentry-sidekiq sidekiq - spring - spring-commands-rspec - spring-watcher-listen - uglifier - virtus-multiparams + stackprof web-console - wicked_pdf + wicked_pdf (< 2.8) wkhtmltopdf-binary RUBY VERSION - ruby 2.7.5p203 + ruby 3.1.1p18 BUNDLED WITH - 2.3.5 + 2.4.14 diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index ac04d6d69c..0000000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,12 +0,0 @@ -#### :tophat: User Story - - -#### :clipboard: Related documentation - - -#### :dart: Acceptance criteria - - -#### :pushpin: Related issues - - diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 0000000000..01fcc9f183 --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,2 @@ +web: bin/rails server -b 0.0.0.0 -p 3000 +shakapacker: bin/shakapacker-dev-server diff --git a/README.md b/README.md index 5e4adebbc3..e0f0df906a 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,23 @@ --- -Citizen Participation and Open Government Application. - -[![Build Status](https://img.shields.io/travis/AjuntamentdeBarcelona/decidim-barcelona/master.svg)](https://travis-ci.org/AjuntamentdeBarcelona/decidim-barcelona) -[![codecov](https://codecov.io/gh/AjuntamentdeBarcelona/decidim-barcelona/branch/master/graph/badge.svg)](https://codecov.io/gh/AjuntamentdeBarcelona/decidim-barcelona) +Citizen Participation and Open Government Application. + +[![[CI] Lint](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/lint.yml/badge.svg)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/lint.yml) +[![[CI] Test](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test.yml/badge.svg)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test.yml) +[![[CI] Test Census SMS](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_census_sms.yml/badge.svg)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_census_sms.yml) +[![[CI] Test Ephemeral Participation](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_ephemeral_participation.yml/badge.svg)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_ephemeral_participation.yml) +[![[CI] Test Stats](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_stats.yml/badge.svg)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_stats.yml) +[![[CI] Test Valid Auth](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_valid_auth.yml/badge.svg)](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/actions/workflows/test_valid_auth.yml) [![Code Climate](https://codeclimate.com/github/AjuntamentdeBarcelona/decidim-barcelona/badges/gpa.svg)](https://codeclimate.com/github/AjuntamentdeBarcelona/decidim-barcelona) -[![Dependency Status](https://gemnasium.com/AjuntamentdeBarcelona/decidim-barcelona.svg)](https://gemnasium.com/AjuntamentdeBarcelona/decidim-barcelona) This is the opensource code repository for "decidim-barcelona", based on [Decidim](https://github.com/AjuntamentdeBarcelona/decidim). -## Upgrade notes - -- `app/views/layouts/decidim/widget.html.erb` modify the embed to remove organization's logo. -- `app/stylesheets/decidim/email.css`, customizes the email template style of Decidim. Be careful in later updates to prevent changes in style. - ## Development environment setup You can setup everything with Docker & Docker compose, run: -``` +```bash docker-compose build docker-compose run --rm app bundle exec rake db:create db:schema:load db:seed docker-compose up diff --git a/Rakefile b/Rakefile index db2ebc6e47..bf012913fa 100644 --- a/Rakefile +++ b/Rakefile @@ -68,7 +68,7 @@ namespace :decidim_surveys_patch do puts "Migrating question #{survey_question.id}..." question = Decidim::Forms::Question.create!( - questionnaire: questionnaire, + questionnaire:, position: survey_question.position, question_type: survey_question.question_type, mandatory: survey_question.mandatory, @@ -84,7 +84,7 @@ namespace :decidim_surveys_patch do AnswerOption.where(decidim_survey_question_id: survey_question.id).find_each do |survey_answer_option| answer_option_mapping[survey_answer_option.id] = Decidim::Forms::AnswerOption.create!( - question: question, + question:, body: survey_answer_option.body, free_text: survey_answer_option.free_text ) @@ -92,8 +92,8 @@ namespace :decidim_surveys_patch do Answer.where(decidim_survey_id: survey.id, decidim_survey_question_id: survey_question.id).find_each do |survey_answer| answer = Decidim::Forms::Answer.new( - questionnaire: questionnaire, - question: question, + questionnaire:, + question:, decidim_user_id: survey_answer.decidim_user_id, body: survey_answer.body, created_at: survey_answer.created_at, diff --git a/app.json b/app.json deleted file mode 100644 index 32a957ed0f..0000000000 --- a/app.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "decidim-barcelona", - "description": "TODO: Add a short description about decidim-barcelona", - "keywords": [], - "addons": [ - "heroku-postgresql:hobby-dev", - "heroku-redis:hobby-dev", - "sendgrid:starter" - ], - "stack": "heroku-18", - "scripts": { - "postdeploy":"DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bundle exec rake db:schema:load db:migrate db:seed" - }, - "env": { - "SECRET_KEY_BASE": { - "description": "A secret used by Rails to identify sessions", - "generator": "secret" - }, - "CENSUS_URL": { - "required": true - }, - "AWS_ACCESS_KEY_ID": { - "required": true - }, - "AWS_SECRET_ACCESS_KEY": { - "required": true - }, - "ANALYTICS": { - "required": true - }, - "HERE_API_KEY": { - "required": true - }, - "HEROKU_APP_NAME": { - "required": true - } - } -} diff --git a/app/cells/census_kids_authorization_metadata_cell.rb b/app/cells/census_kids_authorization_metadata_cell.rb new file mode 100644 index 0000000000..9d01d6bb96 --- /dev/null +++ b/app/cells/census_kids_authorization_metadata_cell.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +# This cell is to render the census authorization metadata in the renew modal +class CensusKidsAuthorizationMetadataCell < CensusAuthorizationMetadataCell +end diff --git a/app/cells/census_sarria_sant_gervasi_authorization_metadata_cell.rb b/app/cells/census_sarria_sant_gervasi_authorization_metadata_cell.rb new file mode 100644 index 0000000000..037a51041c --- /dev/null +++ b/app/cells/census_sarria_sant_gervasi_authorization_metadata_cell.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +# This cell is to render the census authorization metadata in the renew modal +class CensusSarriaSantGervasiAuthorizationMetadataCell < CensusAuthorizationMetadataCell +end diff --git a/app/cells/concerns/decidim/accountability/status_cell_override.rb b/app/cells/concerns/decidim/accountability/status_cell_override.rb new file mode 100644 index 0000000000..f1bc7b4f07 --- /dev/null +++ b/app/cells/concerns/decidim/accountability/status_cell_override.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Decidim + module Accountability + module StatusCellOverride + extend ActiveSupport::Concern + + included do + include Decidim::Accountability::ApplicationHelper + include Decidim::Accountability::BreadcrumbHelper + + def scope + current_scope.presence if defined?(current_scope) + end + end + end + end +end diff --git a/app/cells/concerns/decidim/activities_cell_override.rb b/app/cells/concerns/decidim/activities_cell_override.rb index 4b8d69112a..83a53e0691 100644 --- a/app/cells/concerns/decidim/activities_cell_override.rb +++ b/app/cells/concerns/decidim/activities_cell_override.rb @@ -7,7 +7,17 @@ module ActivitiesCellOverride included do def activities @activities ||= last_activities.select do |activity| - activity.visible_for?(current_user) && (!activity.respond_to?(:component) || activity.component&.published?) + !activity.respond_to?(:component) || activity.component&.published? + end + end + + def last_activities + @last_activities ||= model.map do |activity| + activity.organization_lazy + activity.resource_lazy + activity.participatory_space_lazy + activity.component_lazy + activity end end end diff --git a/app/cells/concerns/decidim/initiatives/initiative_metadata_g_cell_override.rb b/app/cells/concerns/decidim/initiatives/initiative_metadata_g_cell_override.rb new file mode 100644 index 0000000000..fdb428a0a1 --- /dev/null +++ b/app/cells/concerns/decidim/initiatives/initiative_metadata_g_cell_override.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module Decidim + module Initiatives + module InitiativeMetadataGCellOverride + extend ActiveSupport::Concern + + included do + def progress_bar_item + return if %w(created validating discarded).include?(initiative.state) + + type_scope = initiative.votable_initiative_type_scopes[0] + + { + cell: "decidim/progress_bar", + args: [initiative.supports_count_for(type_scope.scope), { + total: initiative.supports_required_for(type_scope.scope), + element_id: "initiative-#{initiative.id}-votes-count", + class: "progress-bar__sm" + }], + icon: nil + } + end + end + end + end +end diff --git a/app/cells/concerns/decidim/user_profile_cell_override.rb b/app/cells/concerns/decidim/user_profile_cell_override.rb new file mode 100644 index 0000000000..c32f9a8493 --- /dev/null +++ b/app/cells/concerns/decidim/user_profile_cell_override.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Decidim + module UserProfileCellOverride + extend ActiveSupport::Concern + + included do + def resource_path + return "#" if user.nickname.blank? + + user.try(:profile_url) || decidim.profile_path(user.nickname) + end + end + end +end diff --git a/app/cells/decidim/accountability/result_l/extra_data.erb b/app/cells/decidim/accountability/result_l/extra_data.erb new file mode 100644 index 0000000000..bdd9e082dc --- /dev/null +++ b/app/cells/decidim/accountability/result_l/extra_data.erb @@ -0,0 +1,3 @@ +<% if component_settings.try(:display_progress_enabled?) && result.progress.present? && !Decidim::Accountability::Result.not_computable_results.include?(result.id) %> +
<%= title %>
+ +<% if component_settings.display_progress_enabled? && progress.present? %> +<%= t("micro_camera_permissions_warning", scope: "decidim.meetings.meetings.show") %>
- <% end %> -<%= t("link_available_soon", scope: "decidim.meetings.meetings.show") %>
+ <% elsif future? %> +<%= t("link_closed", scope: "decidim.meetings.meetings.show") %>
+ <% elsif live? %> +<%= t("live_event", scope: "decidim.meetings.meetings.show") %>
+ + <% if show_embed? %> +<%= t("micro_camera_permissions_warning", scope: "decidim.meetings.meetings.show") %>
+ <% end %> + + <%= link_to t("join_meeting", scope: "decidim.meetings.meetings.meeting"), live_event_url, target: "_blank", class: "button button__xl button__secondary", data: { external_link: "text-only", external_domain_link: false } %> <% end %> -<% else %> -<%= t ".gender_help" %>
-<%= t ".gender_help" %>
+<%= t ".gender_help" %>
-<%= t ".gender_help" %>
+<%= t ".gender_help" %>
+<%= t ".gender_help" %>
++ <%= sort_link(query, :id, t("models.result.fields.id", scope: "decidim.accountability"), default_order: :desc ) %> + | ++ <%= sort_link(query, :title, t("models.result.fields.title", scope: "decidim.accountability")) %> + | ++ <%= sort_link(query, :category_name, t("models.result.fields.category", scope: "decidim.accountability") ) %> + | + <% if resource_with_scopes_enabled? %> ++ <%= sort_link(query, :scope_name, t("models.result.fields.scope", scope: "decidim.accountability") ) %> + | + <% end %> ++ <%= sort_link(query, :status_name, t("models.result.fields.status", scope: "decidim.accountability") ) %> + | ++ <%= sort_link(query, :progress, t("models.result.fields.progress", scope: "decidim.accountability") ) %> + | ++ <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %> + | +<%= t("actions.title", scope: "decidim.accountability") %> | +
---|---|---|---|---|---|---|---|
+ <%= result.id %> + |
+
+ <% if result.parent_id.nil? %>
+ <%= link_to translated_attribute(result.title), results_path(parent_id: result.id) %> + <% else %> + <%= translated_attribute(result.title) %> + <% end %> + |
+ + <% if result.category %> + <%= translated_attribute result.category.name %> + <% end %> + | + <%= td_resource_scope_for(result.scope) %> ++ <% if result.status %> + <%= translated_attribute result.status.name %> + <% end %> + | ++ <%= result.progress&.to_i %> + | ++ <%= l result.created_at, format: :decidim_short %> + | + ++ <% if allowed_to? :update, :result, result: result %> + <%= icon_link_to "pencil-line", edit_result_path(result), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %> + <% end %> + + <% if allowed_to? :create_children, :result, result: result %> + <%= icon_link_to "add-line", results_path(parent_id: result.id), t("actions.new_result", scope: "decidim.accountability"), class: "action-icon--plus" %> + <% end %> + + <% if allowed_to? :update, :result, result: result %> + <%= icon_link_to "time-line", result_timeline_entries_path(result), t("actions.timeline_entries", scope: "decidim.accountability"), class: "action-icon--clock" %> + <% end %> + + <% if allowed_to? :update, :result, result: result %> + <%= icon_link_to "folder-line", result_attachment_collections_path(result), t("actions.attachment_collections", scope: "decidim.accountability"), class: "action-icon--attachment_collections" %> + <% end %> + + <% if allowed_to? :update, :result, result: result %> + <%= icon_link_to "attachment-line", result_attachments_path(result), t("actions.attachments", scope: "decidim.accountability"), class: "action-icon--attachments" %> + <% end %> + + <%= icon_link_to "eye-line", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %> + + <%= resource_permissions_link(result) %> + + <% if allowed_to? :destroy, :result, result: result %> + <%= icon_link_to "delete-bin-line", result_path(result), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")) } %> + <% end %> + | +
<%= translated_attribute(category.name) %>
- -- <%= link_to translated_attribute(category.name),results_path(filter: { category_id: category, scope_id: current_scope }) %>
- - <% if component_settings.display_progress_enabled? && progress_calculator(current_scope, category.id).present? %> -<%= translated_attribute(scope.name) %>
+<%= t("session_token", scope: "decidim.forms.user_answers_serializer") %> | +<%= t("user_status", scope: "decidim.forms.user_answers_serializer") %> | +<%= t("ip_hash", scope: "decidim.forms.user_answers_serializer") %> | +<%= t("completion", scope: "decidim.forms.user_answers_serializer") %> | +<%= t("created_at", scope: "decidim.forms.user_answers_serializer") %> | ++ |
---|---|---|---|---|---|
<%= @participant.session_token %> | +<%= @participant.status %> | +<%= @participant.ip_hash %> | +<%= display_percentage(@participant.completion) %> | +<%= l @participant.answered_at, format: :short %> | +
-<%= t ".help" %> -
-<%= t('.document_hint') %>
-<%= translated_attribute(agenda_item.description).html_safe %>
- <% if agenda_item.agenda_item_children.presence %> - <% parent_start_time = agenda_items_times[index][:start_time] %> - <% agenda_item_children_times = calculate_start_and_end_time_of_agenda_items(agenda_item.agenda_item_children, meeting, parent_start_time) %> - <% agenda_item.agenda_item_children.each_with_index do |agenda_item_child, index_child| %> -<%= translated_attribute(agenda_item_child.description).html_safe %>
- <% end %> + <% agenda_items_times = calculate_start_and_end_time_of_agenda_items(meeting.agenda.agenda_items.first_class, meeting) %> + <% zero_duration = any_zero_duration_event?(meeting.agenda.agenda_items.first_class, meeting) %> + <% meeting.agenda.agenda_items.first_class.each_with_index do |agenda_item, index| %> +