decidim-toggle 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.erb-lint.yml +2134 -0
- data/.github/workflows/website.yml +57 -0
- data/.gitignore +13 -0
- data/.gitlab-ci.yml +165 -0
- data/.node-version +1 -0
- data/.rspec +1 -0
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -0
- data/.simplecov +18 -0
- data/CONTRIBUTING.md +17 -0
- data/Gemfile +33 -0
- data/Gemfile.lock +843 -0
- data/LICENSE.md +661 -0
- data/README.md +90 -0
- data/Rakefile +38 -0
- data/app/commands/decidim/toggle/update_authorizations_command.rb +31 -0
- data/app/commands/decidim/toggle/update_emails_command.rb +30 -0
- data/app/commands/decidim/toggle/update_file_upload_settings_command.rb +31 -0
- data/app/commands/decidim/toggle/update_locale_command.rb +47 -0
- data/app/commands/decidim/toggle/update_module_config_command.rb +31 -0
- data/app/commands/decidim/toggle/update_name_command.rb +31 -0
- data/app/commands/decidim/toggle/update_omniauth_command.rb +30 -0
- data/app/commands/decidim/toggle/update_security_command.rb +31 -0
- data/app/controllers/decidim_toggle/system/settings_tab_controller.rb +64 -0
- data/app/forms/decidim/toggle/update_authorizations_form.rb +54 -0
- data/app/forms/decidim/toggle/update_emails_form.rb +28 -0
- data/app/forms/decidim/toggle/update_file_upload_settings_form.rb +26 -0
- data/app/forms/decidim/toggle/update_locale_form.rb +116 -0
- data/app/forms/decidim/toggle/update_name_form.rb +63 -0
- data/app/forms/decidim/toggle/update_omniauth_form.rb +37 -0
- data/app/forms/decidim/toggle/update_security_form.rb +65 -0
- data/app/helpers/decidim/toggle/javascript_config_helper.rb +11 -0
- data/app/helpers/decidim/toggle/system_settings_tab_helper.rb +59 -0
- data/app/models/decidim/toggle/organization_module_config.rb +15 -0
- data/app/overrides/add_toggle_javascript_admin.rb +11 -0
- data/app/overrides/add_toggle_javascript_public.rb +11 -0
- data/app/packs/entrypoints/decidim_toggle.js +3 -0
- data/app/packs/src/decidim/toggle/organization_settings_tabs.js +114 -0
- data/app/packs/stylesheets/decidim/toggle/organization_settings.scss +160 -0
- data/app/views/decidim/system/organizations/edit.html.erb +20 -0
- data/app/views/decidim_toggle/system/organizations/_default_form_tab.html.erb +5 -0
- data/app/views/decidim_toggle/system/organizations/_encryption_not_configured_callout.html.erb +6 -0
- data/app/views/decidim_toggle/system/organizations/_settings_tab_active_tab_field.html.erb +1 -0
- data/app/views/decidim_toggle/system/organizations/_settings_tab_submit.html.erb +4 -0
- data/app/views/decidim_toggle/system/organizations/_settings_tabs.html.erb +31 -0
- data/app/views/decidim_toggle/system/organizations/tabs/_authorizations_tab.html.erb +9 -0
- data/app/views/decidim_toggle/system/organizations/tabs/_emails_tab.html.erb +5 -0
- data/app/views/decidim_toggle/system/organizations/tabs/_file_upload_tab.html.erb +5 -0
- data/app/views/decidim_toggle/system/organizations/tabs/_language_tab.html.erb +35 -0
- data/app/views/decidim_toggle/system/organizations/tabs/_omniauth_tab.html.erb +5 -0
- data/app/views/decidim_toggle/system/organizations/tabs/_security_tab.html.erb +20 -0
- data/app/views/layouts/decidim/toggle/_javascript_config.html.erb +3 -0
- data/bin/check +10 -0
- data/bin/i18n-tasks +27 -0
- data/bin/postversion +14 -0
- data/config/assets.rb +8 -0
- data/config/locales/decidim_toggle_en.yml +58 -0
- data/crowdin.yml +15 -0
- data/db/migrate/20260321120000_create_decidim_toggle_organization_module_configs.rb +20 -0
- data/decidim-toggle.gemspec +35 -0
- data/docker-compose.yml +41 -0
- data/lib/decidim/toggle/engine.rb +62 -0
- data/lib/decidim/toggle/expose_attributes_to_js.rb +26 -0
- data/lib/decidim/toggle/expose_attributes_to_js_validator.rb +32 -0
- data/lib/decidim/toggle/gem_registry.rb +15 -0
- data/lib/decidim/toggle/informative_callouts.rb +76 -0
- data/lib/decidim/toggle/javascript_config.rb +87 -0
- data/lib/decidim/toggle/module_config.rb +64 -0
- data/lib/decidim/toggle/module_config_form.rb +41 -0
- data/lib/decidim/toggle/module_config_i18n.rb +44 -0
- data/lib/decidim/toggle/module_configuration_presenter.rb +55 -0
- data/lib/decidim/toggle/organization_settings_tabs.rb +69 -0
- data/lib/decidim/toggle/settings_form_builder.rb +200 -0
- data/lib/decidim/toggle/settings_tab_item.rb +37 -0
- data/lib/decidim/toggle/settings_tab_registry.rb +109 -0
- data/lib/decidim/toggle/settings_tabs.rb +56 -0
- data/lib/decidim/toggle/tab_form.rb +20 -0
- data/lib/decidim/toggle/version.rb +14 -0
- data/lib/decidim/toggle.rb +36 -0
- data/lib/tasks/decidim/toggle/toggle_upgrade.rake +13 -0
- data/lib/tasks/decidim/toggle/toggle_webpacker.rake +60 -0
- data/log/.gitignore +2 -0
- data/package.json +18 -0
- data/prettier.config.js +15 -0
- data/spec/commands/decidim/toggle/update_authorizations_command_spec.rb +41 -0
- data/spec/commands/decidim/toggle/update_emails_command_spec.rb +84 -0
- data/spec/commands/decidim/toggle/update_file_upload_settings_command_spec.rb +28 -0
- data/spec/commands/decidim/toggle/update_locale_command_spec.rb +53 -0
- data/spec/commands/decidim/toggle/update_module_config_command_spec.rb +38 -0
- data/spec/commands/decidim/toggle/update_name_command_spec.rb +49 -0
- data/spec/commands/decidim/toggle/update_omniauth_command_spec.rb +80 -0
- data/spec/commands/decidim/toggle/update_security_command_spec.rb +25 -0
- data/spec/decidim/toggle/settings_tab_item_spec.rb +34 -0
- data/spec/decidim/toggle/settings_tab_registry_spec.rb +66 -0
- data/spec/decidim/toggle/settings_tabs_spec.rb +60 -0
- data/spec/forms/concerns/decidim/toggle/informative_callouts_spec.rb +48 -0
- data/spec/forms/decidim/toggle/update_authorizations_form_spec.rb +40 -0
- data/spec/forms/decidim/toggle/update_emails_form_spec.rb +35 -0
- data/spec/forms/decidim/toggle/update_file_upload_settings_form_spec.rb +20 -0
- data/spec/forms/decidim/toggle/update_locale_form_spec.rb +64 -0
- data/spec/forms/decidim/toggle/update_name_form_spec.rb +57 -0
- data/spec/forms/decidim/toggle/update_omniauth_form_spec.rb +56 -0
- data/spec/forms/decidim/toggle/update_security_form_spec.rb +32 -0
- data/spec/helpers/decidim/toggle/system_settings_tab_helper_spec.rb +99 -0
- data/spec/lib/decidim/toggle/expose_attributes_to_js_spec.rb +31 -0
- data/spec/lib/decidim/toggle/expose_attributes_to_js_validator_spec.rb +30 -0
- data/spec/lib/decidim/toggle/gem_registry_spec.rb +30 -0
- data/spec/lib/decidim/toggle/javascript_config_spec.rb +169 -0
- data/spec/lib/decidim/toggle/module_config_form_spec.rb +45 -0
- data/spec/lib/decidim/toggle/module_config_spec.rb +74 -0
- data/spec/lib/decidim/toggle/module_configuration_presenter_spec.rb +53 -0
- data/spec/lib/decidim/toggle/settings_form_builder_spec.rb +115 -0
- data/spec/requests/decidim_toggle/system/settings_tab_spec.rb +144 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/support/decidim_factories.rb +3 -0
- data/spec/support/devise.rb +5 -0
- data/spec/system/decidim_toggle/javascript_config_spec.rb +56 -0
- data/website/.gitignore +4 -0
- data/website/docs/developer/_category_.json +8 -0
- data/website/docs/developer/code-of-conduct.md +99 -0
- data/website/docs/developer/contribute.md +50 -0
- data/website/docs/developer/deface-usage.md +37 -0
- data/website/docs/developer/documentation.md +58 -0
- data/website/docs/developer/error-handling.md +51 -0
- data/website/docs/developer/tab-registry.md +51 -0
- data/website/docs/developer/view-customization.md +49 -0
- data/website/docs/index.md +80 -0
- data/website/docs/integrate/_category_.json +8 -0
- data/website/docs/integrate/attributes.md +121 -0
- data/website/docs/integrate/customize-views.md +62 -0
- data/website/docs/integrate/index.md +38 -0
- data/website/docs/integrate/informative_callout.md +80 -0
- data/website/docs/integrate/javascript.md +84 -0
- data/website/docs/integrate/labels.md +91 -0
- data/website/docs/integrate/quickstart.md +77 -0
- data/website/docusaurus.config.ts +100 -0
- data/website/package.json +31 -0
- data/website/sidebars.ts +7 -0
- data/website/src/css/custom.css +37 -0
- data/website/static/img/logo.svg +1 -0
- data/website/static/img/schema_overview.png +0 -0
- data/website/static/img/screenshot_informative_callouts.png +0 -0
- data/website/static/img/screenshot_saved_flash.png +0 -0
- data/website/static/img/screenshots_locale_tab.png +0 -0
- data/website/static/img/screenshots_name_tab.png +0 -0
- data/website/static/img/screenshots_security_tab.png +0 -0
- data/website/tsconfig.json +6 -0
- data/website/yarn.lock +8336 -0
- data/yarn.lock +13 -0
- metadata +249 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Website
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build Docusaurus
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
|
|
20
|
+
- name: Enable Corepack
|
|
21
|
+
run: corepack enable
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: 22
|
|
26
|
+
cache: yarn
|
|
27
|
+
cache-dependency-path: website/yarn.lock
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
working-directory: website
|
|
31
|
+
run: yarn install --frozen-lockfile
|
|
32
|
+
|
|
33
|
+
- name: Build website
|
|
34
|
+
working-directory: website
|
|
35
|
+
run: yarn build
|
|
36
|
+
|
|
37
|
+
- name: Upload build artifact
|
|
38
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
39
|
+
uses: actions/upload-pages-artifact@v3
|
|
40
|
+
with:
|
|
41
|
+
path: website/build
|
|
42
|
+
|
|
43
|
+
deploy:
|
|
44
|
+
name: Deploy to GitHub Pages
|
|
45
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
46
|
+
needs: build
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
permissions:
|
|
49
|
+
pages: write
|
|
50
|
+
id-token: write
|
|
51
|
+
environment:
|
|
52
|
+
name: github-pages
|
|
53
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
54
|
+
steps:
|
|
55
|
+
- name: Deploy to GitHub Pages
|
|
56
|
+
id: deployment
|
|
57
|
+
uses: actions/deploy-pages@v4
|
data/.gitignore
ADDED
data/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Reusable Decidim module CI (aligned with decidim-module-spam_signal).
|
|
3
|
+
# Local pre-push: run ./bin/check from the gem root (RuboCop + erblint + RSpec; see bin/check).
|
|
4
|
+
# Full pipeline adds Prettier, Crowdin, coverage — see README.md and CONTRIBUTING.md.
|
|
5
|
+
# Required CI/CD variables for Crowdin / publish:
|
|
6
|
+
# - CROWDIN_PERSONAL_TOKEN, CROWDIN_PROJECT_ID, TRANSLATIONBOT_ID,
|
|
7
|
+
# TRANSLATIONBOT_ACCESS_TOKEN, GEM_HOST_API_KEY (see spam_signal README).
|
|
8
|
+
##
|
|
9
|
+
stages:
|
|
10
|
+
- lint
|
|
11
|
+
- test
|
|
12
|
+
- translate
|
|
13
|
+
- publish
|
|
14
|
+
variables:
|
|
15
|
+
POSTGRES_DB: decidim_test
|
|
16
|
+
POSTGRES_USER: decidim
|
|
17
|
+
POSTGRES_PASSWORD: "TEST-insecure_password"
|
|
18
|
+
|
|
19
|
+
services:
|
|
20
|
+
- postgres:17
|
|
21
|
+
- redis:latest
|
|
22
|
+
|
|
23
|
+
.development_rules:
|
|
24
|
+
rules:
|
|
25
|
+
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
26
|
+
when: never
|
|
27
|
+
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
28
|
+
when: always
|
|
29
|
+
- if: '$CI_COMMIT_TAG'
|
|
30
|
+
when: always
|
|
31
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
32
|
+
when: always
|
|
33
|
+
.publication_rules:
|
|
34
|
+
rules:
|
|
35
|
+
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
36
|
+
when: never
|
|
37
|
+
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
38
|
+
when: always
|
|
39
|
+
- if: '$CI_COMMIT_TAG'
|
|
40
|
+
when: always
|
|
41
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
42
|
+
when: manual
|
|
43
|
+
|
|
44
|
+
ruby::rubocop:
|
|
45
|
+
extends: .development_rules
|
|
46
|
+
image: ruby:3.2.2
|
|
47
|
+
stage: lint
|
|
48
|
+
script:
|
|
49
|
+
- bundle
|
|
50
|
+
- bundle exec rubocop .
|
|
51
|
+
|
|
52
|
+
ruby::erb:
|
|
53
|
+
extends: .development_rules
|
|
54
|
+
image: ruby:3.2.2
|
|
55
|
+
stage: lint
|
|
56
|
+
script:
|
|
57
|
+
- bundle
|
|
58
|
+
- bundle exec erblint --lint-all --enable-all-linters
|
|
59
|
+
|
|
60
|
+
node::prettier:
|
|
61
|
+
extends: .development_rules
|
|
62
|
+
image: node:20
|
|
63
|
+
stage: lint
|
|
64
|
+
script:
|
|
65
|
+
- yarn install --frozen-lockfile
|
|
66
|
+
- yarn format:check
|
|
67
|
+
|
|
68
|
+
node::docs:
|
|
69
|
+
extends: .development_rules
|
|
70
|
+
image: node:20
|
|
71
|
+
stage: lint
|
|
72
|
+
script:
|
|
73
|
+
- cd website
|
|
74
|
+
- yarn install
|
|
75
|
+
- yarn build
|
|
76
|
+
|
|
77
|
+
crowdin::lint:
|
|
78
|
+
extends: .development_rules
|
|
79
|
+
image: node:20
|
|
80
|
+
stage: lint
|
|
81
|
+
script:
|
|
82
|
+
- npm install -g @crowdin/cli
|
|
83
|
+
- crowdin status -T $CROWDIN_PERSONAL_TOKEN -i $CROWDIN_PROJECT_ID --no-progress
|
|
84
|
+
allow_failure: true
|
|
85
|
+
|
|
86
|
+
ruby::rubygem:
|
|
87
|
+
image: ruby:3.2.2
|
|
88
|
+
stage: publish
|
|
89
|
+
script:
|
|
90
|
+
- echo "---" > .credentials
|
|
91
|
+
- |
|
|
92
|
+
echo ":ci_rubygems_api_key: $GEM_HOST_API_KEY" >> .credentials
|
|
93
|
+
- chmod 0600 .credentials
|
|
94
|
+
- gem build decidim*.gemspec
|
|
95
|
+
- gem push decidim*.gem -k ci_rubygems_api_key --config-file .credentials
|
|
96
|
+
only:
|
|
97
|
+
- tags
|
|
98
|
+
|
|
99
|
+
crowdin::upload:
|
|
100
|
+
stage: translate
|
|
101
|
+
image: node:20
|
|
102
|
+
script:
|
|
103
|
+
- npm install -g @crowdin/cli
|
|
104
|
+
- crowdin upload -T $CROWDIN_PERSONAL_TOKEN -i $CROWDIN_PROJECT_ID --no-progress
|
|
105
|
+
- crowdin status -T $CROWDIN_PERSONAL_TOKEN -i $CROWDIN_PROJECT_ID --no-progress
|
|
106
|
+
when: manual
|
|
107
|
+
|
|
108
|
+
crowdin::merge_request:
|
|
109
|
+
stage: translate
|
|
110
|
+
image: node:20
|
|
111
|
+
rules:
|
|
112
|
+
- if: '$CI_COMMIT_BRANCH == "main" && $GITLAB_USER_ID != $TRANSLATIONBOT_ID'
|
|
113
|
+
when: always
|
|
114
|
+
before_script:
|
|
115
|
+
- apt-get update && apt-get install -y git
|
|
116
|
+
script:
|
|
117
|
+
- git config --global user.email "mr-translations"
|
|
118
|
+
- git config --global user.name "$TRANSLATIONBOT_ID"
|
|
119
|
+
- npm install -g @crowdin/cli
|
|
120
|
+
- crowdin download -T $CROWDIN_PERSONAL_TOKEN -i $CROWDIN_PROJECT_ID --no-progress
|
|
121
|
+
- crowdin status -T $CROWDIN_PERSONAL_TOKEN -i $CROWDIN_PROJECT_ID --no-progress
|
|
122
|
+
- export BRANCH_NAME="i18n/$(date +%Y%m%d%H%M%S)"
|
|
123
|
+
- export ORIGIN="crowdin_$(date +%Y%m%d%H%M%S)"
|
|
124
|
+
- git remote add $ORIGIN https://$TRANSLATIONBOT_ID:$TRANSLATIONBOT_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git
|
|
125
|
+
- git checkout -b $BRANCH_NAME
|
|
126
|
+
- git add config/locales
|
|
127
|
+
- git commit -m "Crowdin Updates"
|
|
128
|
+
- git push $ORIGIN HEAD:$BRANCH_NAME -o merge_request.create -o merge_request.target=main
|
|
129
|
+
|
|
130
|
+
ruby::rspec:
|
|
131
|
+
image: ruby:3.2.2
|
|
132
|
+
stage: test
|
|
133
|
+
extends: .development_rules
|
|
134
|
+
artifacts:
|
|
135
|
+
reports:
|
|
136
|
+
coverage_report:
|
|
137
|
+
coverage_format: cobertura
|
|
138
|
+
path: coverage/coverage.xml
|
|
139
|
+
variables:
|
|
140
|
+
DATABASE_HOST: "postgres"
|
|
141
|
+
DATABASE_PASSWORD: "TEST-insecure_password"
|
|
142
|
+
DATABASE_USERNAME: "decidim"
|
|
143
|
+
DISABLED_DOCKER_COMPOSE: "true"
|
|
144
|
+
TRAEFIK_REDIS_URL: "redis://localhost:6379/1"
|
|
145
|
+
NODE_MAJOR: 18
|
|
146
|
+
SIMPLECOV: 1
|
|
147
|
+
CI: 1
|
|
148
|
+
before_script:
|
|
149
|
+
# System specs need Chromium/Chrome + matching chromedriver; plain ruby:* images omit the browser,
|
|
150
|
+
# so chromedriver can exit before binding and Selenium retries until ECONNREFUSED.
|
|
151
|
+
- apt-get update -qq && apt-get install -y ca-certificates curl gnupg wget
|
|
152
|
+
- wget -q -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
153
|
+
- apt-get install -y /tmp/google-chrome.deb || (apt-get -f install -y && apt-get install -y /tmp/google-chrome.deb)
|
|
154
|
+
- rm -f /tmp/google-chrome.deb
|
|
155
|
+
- mkdir -p /etc/apt/keyrings
|
|
156
|
+
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
157
|
+
- 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
|
|
158
|
+
- apt-get update && apt-get install -y -qq nodejs
|
|
159
|
+
- npm install -g yarn --force
|
|
160
|
+
- gem install bundler
|
|
161
|
+
- bundle config set path 'vendor'
|
|
162
|
+
- RAILS_ENV=development bundle install -j $(nproc)
|
|
163
|
+
- bundle exec rake test_app
|
|
164
|
+
script:
|
|
165
|
+
- unset DATABASE_URL && RAILS_ENV=test bundle exec rspec
|
data/.node-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20.18.2
|
data/.rspec
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.2.2
|
data/.simplecov
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
SimpleCov.start "rails" do
|
|
4
|
+
root File.expand_path(__dir__)
|
|
5
|
+
|
|
6
|
+
add_filter "/spec/"
|
|
7
|
+
add_filter "/decidim_dummy_app/"
|
|
8
|
+
add_filter "/vendor/"
|
|
9
|
+
add_filter "/.bundle/"
|
|
10
|
+
add_filter "/lib/tasks/"
|
|
11
|
+
|
|
12
|
+
add_group "App", "app"
|
|
13
|
+
add_group "Lib", "lib"
|
|
14
|
+
|
|
15
|
+
enable_coverage :branch
|
|
16
|
+
|
|
17
|
+
minimum_coverage line: 90
|
|
18
|
+
end
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Contributing to decidim-toggle
|
|
2
|
+
|
|
3
|
+
Contributor documentation: [octree-gva.github.io/decidim-toggle/contributing](https://octree-gva.github.io/decidim-toggle/contributing).
|
|
4
|
+
|
|
5
|
+
## Quick links
|
|
6
|
+
|
|
7
|
+
- **Doc site (local):** `cd website && yarn && yarn start`
|
|
8
|
+
- **Doc site (build):** `cd website && yarn build`
|
|
9
|
+
- **Tests and lint:** `./bin/check` — RuboCop, erblint, RSpec
|
|
10
|
+
- **GitLab:** [issues](https://git.octree.ch/decidim/vocacity/decidim-modules/decidim-toggle/-/issues) · [merge requests](https://git.octree.ch/decidim/vocacity/decidim-modules/decidim-toggle/-/merge_requests)
|
|
11
|
+
- **Code of conduct:** [octree-gva.github.io/decidim-toggle/code-of-conduct](https://octree-gva.github.io/decidim-toggle/code-of-conduct)
|
|
12
|
+
|
|
13
|
+
## Module developers
|
|
14
|
+
|
|
15
|
+
Adding a settings tab: [integrate/quickstart](https://octree-gva.github.io/decidim-toggle/integrate/quickstart).
|
|
16
|
+
|
|
17
|
+
Host install: [README.md](README.md).
|
data/Gemfile
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
ruby "3.2.2"
|
|
6
|
+
|
|
7
|
+
base_path = ""
|
|
8
|
+
base_path = "../" if File.basename(__dir__) == "development_app"
|
|
9
|
+
require_relative "#{base_path}lib/decidim/toggle/version"
|
|
10
|
+
|
|
11
|
+
DECIDIM_VERSION = Decidim::Toggle.decidim_version
|
|
12
|
+
|
|
13
|
+
gem "bootsnap", "~> 1.4"
|
|
14
|
+
gem "decidim", DECIDIM_VERSION
|
|
15
|
+
gem "decidim-toggle", path: "."
|
|
16
|
+
|
|
17
|
+
gem "puma", ">= 6.3.1"
|
|
18
|
+
|
|
19
|
+
group :development, :test do
|
|
20
|
+
gem "brakeman", "~> 6.1"
|
|
21
|
+
gem "byebug", "~> 11.0", platform: :mri
|
|
22
|
+
gem "decidim-dev", DECIDIM_VERSION
|
|
23
|
+
gem "parallel_tests", "~> 4.2"
|
|
24
|
+
gem "rubocop-rails", "~> 2.25.1"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
group :development do
|
|
28
|
+
gem "letter_opener_web", "~> 2.0"
|
|
29
|
+
gem "listen", "~> 3.1"
|
|
30
|
+
gem "web-console", "~> 4.2"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
gem "faker", "~> 3.6"
|