Skip to content

Commit

Permalink
Bump decidim from 0.21.0 to 0.26.9 (#62)
Browse files Browse the repository at this point in the history
* chore: update packages to be able to install 0.21

* chore: bump decidim version to 0.22

* Fix decidim-module-term_customizer gem git repo and branch

* Fix FEDER footer

* Update decidim-direct_verifications

* Bump decidim from 0.22.0 to 0.23.6

* Bump decidim from 0.23.6 to 0.24.3

* Update faker fixing specs

* Remove unused tests

* Bump decidim from 0.24.3 to 0.25.2

* Configure linters and add CI workflows

* Replace legacy migration

* Bump decidim from 0.25.2 to 0.26.9

* Change chamber for figaro

* Add rbenv to capistrano

* Remove dockerization

* Update README.md

* Update node dependencies and fix capistrano settings

* Add nvm to capistrano and change migration order

* Fix migrations order

* Fix CI

* Allow GET as OmniAuth request method

* Remove compiled packs from git source

* Configure SAML with env vars and remove useless settings.yml

---------

Co-authored-by: Leonardo Diez <[email protected]>
  • Loading branch information
fblupi and leio10 authored Jan 29, 2024
1 parent 075b1e1 commit 9375427
Show file tree
Hide file tree
Showing 278 changed files with 20,331 additions and 1,306 deletions.
9 changes: 0 additions & 9 deletions .chamber.pub.pem

This file was deleted.

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
15 changes: 15 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**/*{.,-}min.js
decidim-*/vendor/**/*.js
spec/decidim_dummy_app/**/*.js
development_app
**/node_modules/**
bundle.js
karma.conf.js
webpack.config.js
webpack.config.babel.js
entry.test.js
entry.js
*_manifest.js
coverage
decidim-dev/**/*/test/**/*.js
vendor/bundle
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@decidim"
}
47 changes: 47 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lint

on:
push:
branches:
- main
pull_request:

env:
RUBY_VERSION: 2.7.3
NODE_VERSION: 16.9.1

jobs:
lint:
name: Lint code
runs-on: ubuntu-20.04
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 app/{overrides,views}/**/*.{erb,deface}
name: Lint ERB files

- run: npm run stylelint
name: Lint SCSS files

- run: npm run lint
name: Lint JS files
62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test

on:
push:
branches:
- main
pull_request:

env:
RUBY_VERSION: 2.7.3
NODE_VERSION: 16.9.1

jobs:
test:
name: Test
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- name: Bundle Install
run: bundle install

- name: Setup & create Database
run: bundle exec rake db:test:prepare
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres

- name: Precompile assets
run: |
npm install
bundle exec rake assets:precompile
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres

- name: Run RSpec
run: SIMPLECOV=1 CODECOV=1 bundle exec rspec
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/storage/*
!/storage/.keep

/node_modules
node_modules
/yarn-error.log

/public/assets
Expand All @@ -41,3 +41,13 @@ config/*-development.yml

.rspec
.rspec-failures

/public/decidim-packs
/public/packs
/public/packs-test
yarn-debug.log*
.yarn-integrity
.rubocop-https*

.rbenv-vars
config/application.yml
15 changes: 15 additions & 0 deletions .mdl_style.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

all

exclude_rule "first-line-h1"

exclude_rule "line-length"

exclude_rule "no-bare-urls"

exclude_rule "no-inline-html"

exclude_rule "ol-prefix"

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"
21 changes: 21 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
inherit_from: https://raw.githubusercontent.com/decidim/decidim/release/0.26-stable/.rubocop.yml

AllCops:
Include:
- "**/*.rb"
- "**/*.rake"
- "**/*.ru"
- "**/Gemfile"
- "**/Rakefile"
Exclude:
- "development_app/**/*"
- "**/development_app/**/*"
- "spec/decidim_dummy_app/**/*"
- "**/spec/decidim_dummy_app/**/*"
- "bin/**/*"
- "node_modules/**/*"
- "**/node_modules/**/*"
- "db/schema.rb"
- "db/migrate/*"
- "vendor/**/*"
- "**/vendor/**/*"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.5.3
ruby-2.7.3
6 changes: 2 additions & 4 deletions Capfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Load DSL and set up stages
require 'chamber'
require 'capistrano/setup'

# Include default deployment tasks
Expand All @@ -17,13 +16,12 @@ require 'capistrano/deploy'
# https://github.com/capistrano/passenger
#
# require 'capistrano/rvm'
# require 'capistrano/rbenv'
# require 'capistrano/chruby'
# require 'capistrano/bundler'
# require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
# require 'capistrano/passenger'

require 'capistrano/rbenv'
require 'capistrano/nvm'
require 'capistrano/rails'
require 'capistrano-db-tasks'
require 'airbrussh/capistrano'
Expand Down
1 change: 0 additions & 1 deletion Dockerfile

This file was deleted.

75 changes: 39 additions & 36 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,59 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

ruby RUBY_VERSION

DECIDIM_VERSION = { git: 'https://github.com/decidim/decidim.git', branch: '0.21-stable' }
DECIDIM_VERSION = { git: "https://github.com/decidim/decidim.git", branch: "release/0.26-stable" }.freeze

gem 'activerecord-session_store'
gem 'chamber', '~> 2.10.1'
# Change term_customizer dependency to ruby-gems' when term-customizer is compatible with DECIDIM_VERSION
gem 'decidim-term_customizer', git: "https://github.com/CodiTramuntana/decidim-module-term_customizer"
gem "activerecord-session_store"

gem 'decidim', DECIDIM_VERSION
gem 'decidim-consultations', DECIDIM_VERSION
gem 'decidim-direct_verifications', '0.17.8'
gem 'omniauth-saml'
gem "decidim", DECIDIM_VERSION
gem "decidim-consultations", DECIDIM_VERSION
gem "decidim-direct_verifications", "~> 1.2.0"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer", branch: "release/0.26-stable"
gem "omniauth-saml", "~> 2.0"

# Metrics require a queue system and a daily cron
gem 'delayed_job_active_record'
gem "delayed_job_active_record"
# daemons: required to manage the delayed_job background process
gem 'daemons'
gem 'whenever', require: false
gem "daemons"
gem "whenever", require: false

gem 'bootsnap', '~> 1.3'
gem "bootsnap", "~> 1.3"

gem 'rails', '< 6'
gem "puma", "~> 5.0"
gem "uglifier", "~> 4.1"

gem 'puma', '~> 4.3'
gem 'uglifier', '~> 4.1'

gem 'httplog'
gem "deface"
gem "httplog"

group :development, :test do
gem 'byebug', platform: :mri
gem 'rspec-rails'
gem 'decidim-dev', DECIDIM_VERSION
gem 'faker', '~> 1.9'
gem "byebug", platform: :mri
gem "decidim-dev", DECIDIM_VERSION
gem "faker", "~> 2.14"
gem "rspec-rails"
end

group :development do
gem 'airbrussh', require: false
gem 'capistrano', '3.3.5'
gem 'capistrano-bundler', '~> 1.2'
gem 'capistrano-db-tasks', require: false
gem 'capistrano-faster-assets', '~> 1.0'
gem 'capistrano-passenger'
gem 'capistrano-rails'
gem 'capistrano3-delayed-job', '~> 1.0'
gem 'letter_opener_web', '~> 1.3'
gem 'listen', '~> 3.1'
gem 'spring', '~> 2.0'
gem 'spring-watcher-listen', '~> 2.0'
gem 'web-console', '~> 3.5'
gem "airbrussh", require: false
gem "capistrano", "3.3.5"
gem "capistrano3-delayed-job", "~> 1.0"
gem "capistrano-bundler", "~> 1.2"
gem "capistrano-db-tasks", require: false
gem "capistrano-faster-assets", "~> 1.0"
gem "capistrano-nvm"
gem "capistrano-passenger"
gem "capistrano-rails"
gem "capistrano-rbenv"
gem "letter_opener_web", "~> 1.3"
gem "listen", "~> 3.1"
gem "rubocop-faker"
gem "spring", "~> 2.0"
gem "spring-watcher-listen", "~> 2.0"
gem "web-console", "~> 3.5"
end

group :production do
gem "figaro", "~> 1.2"
end
Loading

0 comments on commit 9375427

Please sign in to comment.