Skip to content

Commit

Permalink
Merge branch 'master' of github.com:AjuntamentdeBarcelona/decidim-bar…
Browse files Browse the repository at this point in the history
…celona into fix/signatures-pdf-by-rows
  • Loading branch information
fblupi committed Oct 17, 2024
2 parents 41d80aa + f778abc commit c97e087
Show file tree
Hide file tree
Showing 551 changed files with 193,500 additions and 30,834 deletions.
7 changes: 7 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--exclude-exts=.min.css
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
30 changes: 30 additions & 0 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@decidim"
}
27 changes: 4 additions & 23 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
<!--
1. Please check if an issue already exists so there are no duplicates
2. Fill out the whole template so we have a good overview on the issue
3. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue
4. Please follow the template, otherwise we'll have to ask you to update it
-->
#### :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***:
File renamed without changes.
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
19 changes: 10 additions & 9 deletions .github/workflows/decidim_ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
49 changes: 49 additions & 0 deletions .github/workflows/test_census_sms.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
49 changes: 49 additions & 0 deletions .github/workflows/test_stats.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
49 changes: 49 additions & 0 deletions .github/workflows/test_valid_auth.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ node_modules
yarn-debug.log*
.yarn-integrity
.rbenv-vars

public/sw.js*

coverage/

.nvmrc
tailwind.config.js
13 changes: 13 additions & 0 deletions .mdl_style.rb
Original file line number Diff line number Diff line change
@@ -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: ".,;:!"
1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style ".mdl_style.rb"
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.1
29 changes: 26 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -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/**/*"
Loading

0 comments on commit c97e087

Please sign in to comment.