Skip to content

Commit

Permalink
Merge branch 'fix/activities-block-follow-button' into feature/redesi…
Browse files Browse the repository at this point in the history
…gn-staging

* fix/activities-block-follow-button: (27 commits)
  Add tests to follow button in processes and assemblies landing page
  Add follow button to participatory spaces last activities content block
  Remove duplication from participatory spaces publications controllers (#11549)
  Fix the a11y tool icons with redesign (#11175)
  Remove duplication from amendments events specs (#11553)
  Remove duplication from elections' user roles forms (#11548)
  Update Node.js from v16.13.0 to v18.17.1 (#11564)
  Remove duplication from stats presenters (#11551)
  Fix Bootsnap configuration (#11483)
  Remove duplication for add questions specs examples (#11559)
  Remove duplication from invites queries (#11552)
  Fix typos and copy-paste errors from comments and examples (#11536)
  Fix conference venues meetings visibility (#11542)
  Add recognition to BrowserStack in the README (#11546)
  Remove unused view hook for `:upcoming_meeting_for_card` (#11543)
  Remove unused dependency: `wicked` (#11150)
  Clean-up initiatives signature URLs and methods (#11545)
  Refactor initiative signing wizard (#10731)
  Fix Permissions screen on budgets throw errors (#11532)
  Redesign: read more literal (#11516)
  ...
  • Loading branch information
entantoencuanto committed Sep 8, 2023
2 parents f12e800 + 3c451a7 commit e9421e8
Show file tree
Hide file tree
Showing 193 changed files with 1,398 additions and 1,237 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/brakeman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
CI: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.13.0
NODE_VERSION: 18.17.1
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: false
node_version:
description: 'Node version'
default: '16.13.0'
default: '18.17.1'
required: false
type: string
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
env:
CI: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.13.0
NODE_VERSION: 18.17.1
DECIDIM_MODULE: decidim-generators
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
NODE_VERSION: 16.13.0
NODE_VERSION: 18.17.1
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CI: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.13.0
NODE_VERSION: 18.17.1
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_performance_metrics_monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
CI: "true"
SIMPLECOV: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.13.0
NODE_VERSION: 18.17.1
RAILS_ENV: development
RAILS_BOOST_PERFORMANCE: "true"
WEBPACKER_RUNTIME_COMPILE: "false"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
CI: "true"
SIMPLECOV: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.13.0
NODE_VERSION: 18.17.1
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN pg_dropcluster $PGVERSION main \
USER gitpod

# Install nvm and Node
ENV NODE_VERSION=16.13.0
ENV NODE_VERSION=18.17.1
RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | PROFILE=/dev/null bash \
&& bash -c ". .nvm/nvm.sh \
&& nvm install v${NODE_VERSION} \
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
18.17.1
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gem "decidim-templates", path: "."

gem "bootsnap", "~> 1.4"

gem "puma", ">= 5.6.2"
gem "puma", ">= 6.3.1"

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri
Expand Down
131 changes: 64 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ PATH
i18n-tasks (~> 1.0)
nokogiri (~> 1.14, >= 1.14.3)
parallel_tests (~> 4.2)
puma (~> 6.2)
puma (~> 6.2, >= 6.3.1)
rails-controller-testing (~> 1.0)
rspec (~> 3.12)
rspec-cells (~> 0.3.7)
Expand Down Expand Up @@ -157,7 +157,6 @@ PATH
decidim-core (= 0.28.0.dev)
decidim-verifications (= 0.28.0.dev)
hexapdf (~> 0.32.0)
wicked (~> 1.3)
wicked_pdf (~> 2.1)
wkhtmltopdf-binary (~> 0.12)
decidim-meetings (0.28.0.dev)
Expand Down Expand Up @@ -197,63 +196,63 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
actioncable (6.1.7.6)
actionpack (= 6.1.7.6)
activesupport (= 6.1.7.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
actionmailbox (6.1.7.6)
actionpack (= 6.1.7.6)
activejob (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
mail (>= 2.7.1)
actionmailer (6.1.7.4)
actionpack (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activesupport (= 6.1.7.4)
actionmailer (6.1.7.6)
actionpack (= 6.1.7.6)
actionview (= 6.1.7.6)
activejob (= 6.1.7.6)
activesupport (= 6.1.7.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.4)
actionview (= 6.1.7.4)
activesupport (= 6.1.7.4)
actionpack (6.1.7.6)
actionview (= 6.1.7.6)
activesupport (= 6.1.7.6)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.4)
actionpack (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
actiontext (6.1.7.6)
actionpack (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
nokogiri (>= 1.8.5)
actionview (6.1.7.4)
activesupport (= 6.1.7.4)
actionview (6.1.7.6)
activesupport (= 6.1.7.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_link_to (1.0.5)
actionpack
addressable
activejob (6.1.7.4)
activesupport (= 6.1.7.4)
activejob (6.1.7.6)
activesupport (= 6.1.7.6)
globalid (>= 0.3.6)
activemodel (6.1.7.4)
activesupport (= 6.1.7.4)
activerecord (6.1.7.4)
activemodel (= 6.1.7.4)
activesupport (= 6.1.7.4)
activestorage (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activesupport (= 6.1.7.4)
activemodel (6.1.7.6)
activesupport (= 6.1.7.6)
activerecord (6.1.7.6)
activemodel (= 6.1.7.6)
activesupport (= 6.1.7.6)
activestorage (6.1.7.6)
actionpack (= 6.1.7.6)
activejob (= 6.1.7.6)
activerecord (= 6.1.7.6)
activesupport (= 6.1.7.6)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.4)
activesupport (6.1.7.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -313,7 +312,7 @@ GEM
cells (>= 4.1.6, < 5.0.0)
charlock_holmes (0.7.7)
cmdparse (3.0.7)
commonmarker (0.23.9)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
crack (0.4.5)
rexml
Expand Down Expand Up @@ -511,9 +510,9 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_magick (4.12.0)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
minitest (5.18.1)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
minitest (5.19.0)
msgpack (1.4.5)
multi_json (1.15.0)
multi_xml (0.6.0)
Expand Down Expand Up @@ -587,10 +586,10 @@ GEM
psych (4.0.3)
stringio
public_suffix (5.0.1)
puma (6.2.2)
puma (6.3.1)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.7)
rack (2.2.8)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
Expand All @@ -601,26 +600,26 @@ GEM
rack
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.4)
actioncable (= 6.1.7.4)
actionmailbox (= 6.1.7.4)
actionmailer (= 6.1.7.4)
actionpack (= 6.1.7.4)
actiontext (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activemodel (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
rails (6.1.7.6)
actioncable (= 6.1.7.6)
actionmailbox (= 6.1.7.6)
actionmailer (= 6.1.7.6)
actionpack (= 6.1.7.6)
actiontext (= 6.1.7.6)
actionview (= 6.1.7.6)
activejob (= 6.1.7.6)
activemodel (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
bundler (>= 1.15.0)
railties (= 6.1.7.4)
railties (= 6.1.7.6)
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)
Expand All @@ -630,9 +629,9 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
railties (6.1.7.6)
actionpack (= 6.1.7.6)
activesupport (= 6.1.7.6)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -799,19 +798,17 @@ GEM
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked (1.4.0)
railties (>= 3.0.7)
wicked_pdf (2.6.3)
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.11)

PLATFORMS
ruby
Expand All @@ -832,7 +829,7 @@ DEPENDENCIES
net-pop (~> 0.1.1)
net-smtp (~> 0.3.1)
parallel_tests (~> 4.2)
puma (>= 5.6.2)
puma (>= 6.3.1)
spring (~> 2.0)
spring-watcher-listen (~> 2.0)
web-console (~> 4.2)
Expand Down
6 changes: 6 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
:uri-blog: https://decidim.org/blog
:uri-browserstack: https://www.browserstack.com
:uri-chat: http://chat.decidim.org
:uri-contributing: xref:CONTRIBUTING.adoc
:uri-demo: https://try.decidim.org
Expand Down Expand Up @@ -72,6 +73,7 @@ All members of the Decidim community agree with {uri-social-contract}[Decidim So
** <<members,🧑 Members>>
** <<partners,💻 Partners>>
* <<learn-more,📖 Learn More>>
* <<credits,🎩 Credits>>

'''

Expand Down Expand Up @@ -202,3 +204,7 @@ image::https://opencollective.com/decidim/tiers/partner.svg?avatarHeight=36&widt
| How to contribute to the Decidim project and code base.

|===

== 🎩 Credits

* This project is tested with {uri-browserstack}[BrowserStack].
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# frozen_string_literal: true

module Decidim
module Admin
# Base controller that can be inherited by other spaces to publish and unpublish the Participatory Space
#
class SpacePublicationsController < Decidim::Admin::ApplicationController
def create
enforce_permission_to_publish

publish_command.call(current_participatory_space, current_user) do
on(:ok) do
flash[:notice] = I18n.t("create.success", scope: i18n_scope)
end

on(:invalid) do
flash.now[:alert] = I18n.t("create.error", scope: i18n_scope)
end

redirect_back(fallback_location:)
end
end

def destroy
enforce_permission_to_publish

unpublish_command.call(current_participatory_space, current_user) do
on(:ok) do
flash[:notice] = I18n.t("destroy.success", scope: i18n_scope)
end

on(:invalid) do
flash.now[:alert] = I18n.t("destroy.error", scope: i18n_scope)
end

redirect_back(fallback_location:)
end
end

private

def current_participatory_space = raise "Not implemented"

def enforce_permission_to_publish = raise "Not implemented"

def publish_command = raise "Not implemented"

def unpublish_command = raise "Not implemented"

def i18n_scope = raise "Not implemented"
end
end
end
Loading

0 comments on commit e9421e8

Please sign in to comment.