decidim 0.28.4 → 0.29.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/decidim-core/lib/decidim/webpacker/esbuild.config.js +14 -0
- data/decidim-core/lib/decidim/webpacker/shakapacker.yml +2 -2
- data/decidim-core/lib/decidim/webpacker/tsconfig.json +11 -0
- data/decidim-core/lib/decidim/webpacker/webpack/custom.js +13 -35
- data/decidim.gemspec +2 -1
- data/docs/README.adoc +2 -2
- data/docs/antora.yml +1 -1
- data/docs/modules/configure/pages/environment_variables.adoc +6 -102
- data/docs/modules/configure/pages/index.adoc +1 -1
- data/docs/modules/configure/pages/initializer.adoc +1 -1
- data/docs/modules/customize/pages/admin_filters.adoc +32 -0
- data/docs/modules/customize/pages/data_consent.adoc +1 -1
- data/docs/modules/customize/pages/index.adoc +2 -1
- data/docs/modules/customize/pages/javascript.adoc +2 -2
- data/docs/modules/customize/pages/logic.adoc +1 -1
- data/docs/modules/customize/pages/social_shares.adoc +2 -2
- data/docs/modules/customize/pages/styles.adoc +3 -3
- data/docs/modules/customize/pages/views.adoc +1 -1
- data/docs/modules/develop/pages/authorable.adoc +3 -3
- data/docs/modules/develop/pages/backports.adoc +6 -5
- data/docs/modules/develop/pages/c4_component.adoc +2 -7
- data/docs/modules/develop/pages/c4_container.adoc +1 -3
- data/docs/modules/develop/pages/c4_context.adoc +0 -2
- data/docs/modules/develop/pages/classes/commands.adoc +204 -25
- data/docs/modules/develop/pages/components.adoc +5 -5
- data/docs/modules/develop/pages/custom_seed_data.adoc +1 -1
- data/docs/modules/develop/pages/embeddable.adoc +1 -1
- data/docs/modules/develop/pages/endorsable.adoc +2 -2
- data/docs/modules/develop/pages/guide_conventions.adoc +6 -6
- data/docs/modules/develop/pages/guide_development_app.adoc +2 -1
- data/docs/modules/develop/pages/guide_example_apps.adoc +1 -1
- data/docs/modules/develop/pages/guide_github_projects.adoc +1 -1
- data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +2 -2
- data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +1 -1
- data/docs/modules/develop/pages/maintainers/releases.adoc +2 -4
- data/docs/modules/develop/pages/managing_translations_i18n.adoc +2 -2
- data/docs/modules/develop/pages/maps.adoc +5 -5
- data/docs/modules/develop/pages/metrics.adoc +1 -1
- data/docs/modules/develop/pages/modules.adoc +1 -1
- data/docs/modules/develop/pages/newsletter_templates.adoc +2 -2
- data/docs/modules/develop/pages/notifications.adoc +124 -1
- data/docs/modules/develop/pages/reminders.adoc +2 -2
- data/docs/modules/develop/pages/reportable.adoc +1 -1
- data/docs/modules/develop/pages/testing.adoc +2 -2
- data/docs/modules/develop/pages/troubleshooting_metrics.adoc +2 -2
- data/docs/modules/develop/pages/view_models_aka_cells.adoc +1 -1
- data/docs/modules/install/pages/checklist.adoc +3 -2
- data/docs/modules/install/pages/empty-database.adoc +3 -3
- data/docs/modules/install/pages/index.adoc +5 -5
- data/docs/modules/install/pages/manual.adoc +3 -2
- data/docs/modules/install/pages/update.adoc +2 -2
- data/docs/modules/services/pages/activestorage.adoc +1 -1
- data/docs/modules/services/pages/index.adoc +0 -1
- data/docs/modules/services/pages/maps.adoc +2 -2
- data/docs/modules/services/pages/sms.adoc +1 -1
- data/docs/modules/services/pages/social_providers.adoc +3 -3
- data/lib/decidim/gem_manager.rb +2 -0
- data/lib/decidim/version.rb +1 -1
- data/package-lock.json +6359 -19611
- data/package.json +4 -6
- data/packages/browserslist-config/package.json +1 -1
- data/packages/core/package.json +11 -11
- data/packages/dev/package.json +1 -1
- data/packages/eslint-config/index.js +58 -82
- data/packages/eslint-config/package.json +1 -1
- data/packages/prettier-config/package.json +1 -1
- data/packages/stylelint-config/package.json +1 -1
- data/packages/webpacker/index.js +2 -1
- data/packages/webpacker/package.json +5 -11
- metadata +61 -61
- data/babel.config.json +0 -25
- data/docs/modules/develop/pages/consulations_removal.bash +0 -117
- data/docs/modules/services/pages/elections_bulletin_board.adoc +0 -55
- data/lib/decidim/backporter.rb +0 -98
- data/lib/decidim/backports_reporter/cli_report.rb +0 -44
- data/lib/decidim/backports_reporter/csv_report.rb +0 -32
- data/lib/decidim/backports_reporter/report.rb +0 -46
- data/lib/decidim/git_backport_checker.rb +0 -70
- data/lib/decidim/git_backport_manager.rb +0 -179
- data/lib/decidim/github_manager/poster.rb +0 -70
- data/lib/decidim/github_manager/querier/base.rb +0 -78
- data/lib/decidim/github_manager/querier/by_issue_id.rb +0 -46
- data/lib/decidim/github_manager/querier/by_label.rb +0 -95
- data/lib/decidim/github_manager/querier/related_issues.rb +0 -51
- data/lib/decidim/github_manager/querier.rb +0 -20
- data/packages/elections/package.json +0 -17
- data/packages/webpacker/package-lock.json +0 -18045
@@ -96,7 +96,7 @@ The keys to be used will have the translation scope corresponding to the event n
|
|
96
96
|
The following are the parts of the notification email:
|
97
97
|
|
98
98
|
* _email_subject_, to be customized
|
99
|
-
* email_greeting, with a good default, usually there is no need to
|
99
|
+
* email_greeting, with a good default, usually there is no need to customize it
|
100
100
|
* _email_intro_, to be customized
|
101
101
|
* _resource_text_ (optional), rendered `html_safe` if present
|
102
102
|
* _resource_url_, a link to the involved resource if resource_url and resource_title are present
|
@@ -108,6 +108,129 @@ All contents except the `email_greeting` use to require customization on each no
|
|
108
108
|
|
109
109
|
Only the `notification_title` is generated in the event class. The rest of the contents are produced by the templates from the `resource` and the `notification` objects.
|
110
110
|
|
111
|
+
=== Notification actions
|
112
|
+
|
113
|
+
It is possible to render actions into the notifications area. These actions are typically one or more buttons that the user can click to perform an action related to the notification.
|
114
|
+
|
115
|
+
In order to add actions to your notification, you need to implement the methods `action_cell`, `action_data` in your event class. The `action_cell` method should return the name of the cell that will be rendered in the notification area. The `action_data` method should return the data that will be passed to the cell.
|
116
|
+
|
117
|
+
Currently, there is only one action cell available, `Decidim::Notifications::Actions::ButtonCell`. This cell renders a list of buttons with the text and URL provided in the `action_data`. See the code for the `Decidim::InvitedToGroupEvent` to render actions that allow users to accept or reject a membership invitation to a group:
|
118
|
+
|
119
|
+
[source,ruby]
|
120
|
+
----
|
121
|
+
# decidim-core/app/events/decidim/invited_to_group_event.rb
|
122
|
+
|
123
|
+
def membership_id
|
124
|
+
extra["membership_id"]
|
125
|
+
end
|
126
|
+
|
127
|
+
def invitation
|
128
|
+
@invitation ||= UserGroupMembership.find_by(user:, id: membership_id, role: "invited")
|
129
|
+
end
|
130
|
+
|
131
|
+
def action_cell
|
132
|
+
"decidim/notification_actions/buttons" if invitation
|
133
|
+
end
|
134
|
+
|
135
|
+
def action_data
|
136
|
+
[
|
137
|
+
{
|
138
|
+
url: url_helpers.group_invite_path(user_group_nickname, membership_id, format: :json),
|
139
|
+
icon: "check-line",
|
140
|
+
method: "patch",
|
141
|
+
i18n_label: "decidim.group_invites.accept_invitation"
|
142
|
+
},
|
143
|
+
{
|
144
|
+
url: url_helpers.group_invite_path(user_group_nickname, membership_id, format: :json),
|
145
|
+
icon: "close-circle-line",
|
146
|
+
method: "delete",
|
147
|
+
i18n_label: "decidim.group_invites.reject_invitation"
|
148
|
+
}
|
149
|
+
]
|
150
|
+
end
|
151
|
+
----
|
152
|
+
|
153
|
+
The previous code will render a couple of buttons to accept/reject the invitation but only if the UserGroupMembership is not accepted yet.
|
154
|
+
|
155
|
+
Note that the cell returned is "decidim/notification_actions/buttons", if you want to use a custom cell, you should create it in your application and return it accordingly.
|
156
|
+
|
157
|
+
The default buttons cell renders as many buttons as defined in the `action_data` array. Each button will handle a "click" event that will make an AJAX request to the URL provided in the button data. The `method` attribute is used to define the HTTP method that will be used in the AJAX request.
|
158
|
+
|
159
|
+
So, it is advisable for the controller handling the request to respond with a JSON object with the following structure:
|
160
|
+
|
161
|
+
[source,json]
|
162
|
+
----
|
163
|
+
{
|
164
|
+
"message": "Some message"
|
165
|
+
}
|
166
|
+
----
|
167
|
+
|
168
|
+
Use standard HTTP status codes to indicate the result of the operation. For an example, see the implementation of the `Decidim::GroupInvitesController` that responds with a JSON object only when requests are made with the `:json` format:
|
169
|
+
|
170
|
+
[source,ruby]
|
171
|
+
----
|
172
|
+
# decidim-core/app/controllers/decidim/group_invites_controller.rb
|
173
|
+
|
174
|
+
def update
|
175
|
+
enforce_permission_to :accept, :user_group_invitations
|
176
|
+
AcceptGroupInvitation.call(inviting_user_group, current_user) do
|
177
|
+
on(:ok) do
|
178
|
+
respond_to do |format|
|
179
|
+
format.json do
|
180
|
+
render json: { message: t("group_invites.accept.success", scope: "decidim") }
|
181
|
+
end
|
182
|
+
format.all do
|
183
|
+
flash[:notice] = t("group_invites.accept.success", scope: "decidim")
|
184
|
+
redirect_to profile_groups_path(current_user.nickname)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
on(:invalid) do
|
190
|
+
respond_to do |format|
|
191
|
+
format.json do
|
192
|
+
render json: { message: t("group_invites.accept.error", scope: "decidim") }, status: :unprocessable_entity
|
193
|
+
end
|
194
|
+
format.all do
|
195
|
+
flash[:alert] = t("group_invites.accept.error", scope: "decidim")
|
196
|
+
redirect_to profile_groups_path(current_user.nickname)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
def destroy
|
204
|
+
enforce_permission_to :reject, :user_group_invitations
|
205
|
+
|
206
|
+
RejectGroupInvitation.call(inviting_user_group, current_user) do
|
207
|
+
on(:ok) do
|
208
|
+
respond_to do |format|
|
209
|
+
format.json do
|
210
|
+
render json: { message: t("group_invites.reject.success", scope: "decidim") }
|
211
|
+
end
|
212
|
+
format.all do
|
213
|
+
flash[:notice] = t("group_invites.reject.success", scope: "decidim")
|
214
|
+
redirect_to profile_groups_path(current_user.nickname)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
on(:invalid) do
|
220
|
+
respond_to do |format|
|
221
|
+
format.json do
|
222
|
+
render json: { message: t("group_invites.reject.error", scope: "decidim") }, status: :unprocessable_entity
|
223
|
+
end
|
224
|
+
format.all do
|
225
|
+
flash[:alert] = t("group_invites.reject.error", scope: "decidim")
|
226
|
+
redirect_to profile_groups_path(current_user.nickname)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
232
|
+
----
|
233
|
+
|
111
234
|
== Testing notifications
|
112
235
|
|
113
236
|
* Test that the event has been published (usually a command test)
|
@@ -29,7 +29,7 @@ Reminders consist of the following database objects:
|
|
29
29
|
|
30
30
|
- Reminder which holds the main reminder object that is attached to a user to be reminded about and the component for which the reminder is created for. The reminder can have many deliveries and many records to be reminded about.
|
31
31
|
- ReminderDelivery which holds a log of all deliveries sent to the user. This may be useful in cases where we need to audit the system or solve a user support request asking why they were reminded for a specific thing at a specific time. In the backend, this also lets us do conditional logic based on how many times the user has been reminded and when the last reminder was sent.
|
32
|
-
- ReminderRecord which holds information about the records the reminder is related to. This lets us combine reminders that are related to multiple records at a time, so that we do not need to send
|
32
|
+
- ReminderRecord which holds information about the records the reminder is related to. This lets us combine reminders that are related to multiple records at a time, so that we do not need to send multiple emails for each record. For example, the budgeting reminders will contain information about in which budgets the user has pending votes which allows us to combine this information in a single email, instead of sending one email per pending order in each budget.
|
33
33
|
|
34
34
|
==== ReminderRecord states
|
35
35
|
|
@@ -42,7 +42,7 @@ The ReminderRecord object holds a "state" attribute which tells whether the reco
|
|
42
42
|
|
43
43
|
== Defining a reminder
|
44
44
|
|
45
|
-
Reminders can be defined through initializers by defining calling the `
|
45
|
+
Reminders can be defined through initializers by defining calling the `registered` method on the reminders registry object at the Decidim main module as follows:
|
46
46
|
|
47
47
|
[source,ruby]
|
48
48
|
----
|
@@ -20,7 +20,7 @@ A `Reportable` is expected to implement:
|
|
20
20
|
|
21
21
|
=== The ReportedContentCell
|
22
22
|
|
23
|
-
The
|
23
|
+
The recommended way to render the content of a `Reportable` is with a `decidim/reported_content` cell.
|
24
24
|
|
25
25
|
[source,ruby]
|
26
26
|
----
|
@@ -82,7 +82,7 @@ cd decidim-participatory_processes
|
|
82
82
|
bundle exec rake parallel:spec[spec/system/]
|
83
83
|
----
|
84
84
|
|
85
|
-
This same
|
85
|
+
This same command without the parallelization (`cd decidim-participatory_processes && bundle exec rspec spec/system/`)
|
86
86
|
took 26 minutes 21 seconds. With parallel_specs, this runs in 10 minutes 27 seconds.
|
87
87
|
|
88
88
|
[NOTE]
|
@@ -94,7 +94,7 @@ These numbers are depend on your machine, the configuration was:
|
|
94
94
|
|
95
95
|
== Jest
|
96
96
|
|
97
|
-
We use Jest for testing our
|
97
|
+
We use Jest for testing our JavaScript code.
|
98
98
|
|
99
99
|
=== Running a specific test file
|
100
100
|
|
@@ -11,7 +11,7 @@ We have identified two main problems:
|
|
11
11
|
|
12
12
|
=== Metrics generation crashing
|
13
13
|
|
14
|
-
We have identified only one culprit here: "orphans" records, meaning records whose related component or participatory space cannot be found in the database. This is because in a previous decidim release `
|
14
|
+
We have identified only one culprit here: "orphans" records, meaning records whose related component or participatory space cannot be found in the database. This is because in a previous decidim release `ParticipatorySpaces` could be deleted but they were not deleted properly. So any application that has deleted a participatory space in the past, will probably have unrelated records that will make some metrics calculation crash.
|
15
15
|
|
16
16
|
=== Peaks in generated metrics
|
17
17
|
|
@@ -32,7 +32,7 @@ For a given metric type (`rake decidim:metrics:list`) that has duplicates:
|
|
32
32
|
For orphan records, you can do the following:
|
33
33
|
|
34
34
|
* Back up the database.
|
35
|
-
* Delete orphan records
|
35
|
+
* Delete orphan records from the console (code is below).
|
36
36
|
* Delete "comments" metrics and recalculate them following the https://github.com/decidim/decidim/blob/release/0.18-stable/CHANGELOG.md#participants-metrics[aforementioned example].
|
37
37
|
|
38
38
|
=== Some queries that may help
|
@@ -25,7 +25,7 @@ The `label` option accepts this arguments:
|
|
25
25
|
|
26
26
|
* `false` or `"false"` will not render the label from the locales `t(model.class.model_name.i18n_key, scope: "activerecord.models", count: 1)`
|
27
27
|
* `true` or `"true"` will render the translation from
|
28
|
-
* `"
|
28
|
+
* `"whatever string"` will render it as String
|
29
29
|
|
30
30
|
== Introducing a Card Cell to a `component`
|
31
31
|
|
@@ -6,6 +6,7 @@ As a technopolitical project, Decidim needs several things to work. This is a no
|
|
6
6
|
|
7
7
|
. Choose a *domain or subdomain* for your application. Some typical names involve "Participation" or "Decision" conjugations.
|
8
8
|
. Choose which *languages* do you want for your application. In case that your language is not supported you should translate it on https://crowdin.com/project/decidim[Crowdin].
|
9
|
+
. Configure the *time zone* for your organization. If you change it afterwards you will need to review all the dates from your contents.
|
9
10
|
. Customize the xref:customize:styles.adoc[*look and feel*] (colors, pictures, fonts, etc).
|
10
11
|
. Configure *SSL*:
|
11
12
|
.. We recommend using at least *https://letsencrypt.org/[Let's Encrypt]* for minimum security.
|
@@ -32,8 +33,8 @@ As a technopolitical project, Decidim needs several things to work. This is a no
|
|
32
33
|
== Contents
|
33
34
|
|
34
35
|
. Ideally you will have a *Team* formed with experts on IT, Communication, Participation, Design and Law.
|
35
|
-
. Texts for at least, *terms of service, privacy policy and frequently asked questions*. To show the "Terms of service" body text in the "
|
36
|
-
. Comply with your current *legal requirements*, like to registrate your privacy policy with the
|
36
|
+
. Texts for at least, *terms of service, privacy policy and frequently asked questions*. To show the "Terms of service" body text in the "Create an account form", it is a requirement that the slug of this page to be equal `terms-of-service`.
|
37
|
+
. Comply with your current *legal requirements*, like to registrate your privacy policy with the authorities (eg LOPD on Spain).
|
37
38
|
. Fill the *Participatory Processes Configuration Form* to prepare your Participatory Process for Decidim.
|
38
39
|
. Read the *xref:admin:index.adoc[Administration manual]*.
|
39
40
|
. Participate on *http://meta.decidim.org[Metadecidim]*.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
= Empty database installation
|
2
2
|
|
3
|
-
You may want to setup your Decidim installation with an empty database to take full control of all aspects of the Decidim organization. Please follow the steps
|
3
|
+
You may want to setup your Decidim installation with an empty database to take full control of all aspects of the Decidim organization. Please follow the steps below to start with an empty database:
|
4
4
|
|
5
5
|
. Follow steps 1 through 5 of the xref:install:manual.adoc[Manual installation tutorial].
|
6
6
|
|
@@ -23,9 +23,9 @@ bin/rails decidim_system:create_admin
|
|
23
23
|
bundle exec rails s
|
24
24
|
----
|
25
25
|
|
26
|
-
Now, you will be able to
|
26
|
+
Now, you will be able to log in to the system panel with the provided credentials. The application automatically redirects you to the system panel when you do not have any organizations configured and when you enter the system's URL in your browser. The default URL for development is `http://localhost:3000`.
|
27
27
|
|
28
|
-
After you have configured the organization from the system panel, log out of the system panel and type in the URL of the organization to the browser after which you should see a rather empty home page of your organization. You can now
|
28
|
+
After you have configured the organization from the system panel, log out of the system panel and type in the URL of the organization to the browser after which you should see a rather empty home page of your organization. You can now log in with the admin user you created when configuring the organization. Note that you will need to set a password for the admin user before being able to log in with that user.
|
29
29
|
|
30
30
|
At the development environment, you have https://github.com/ryanb/letter_opener[Letter opener] available for viewing the emails that the system sends. You can access it through the `/letter_opener` URL within the domain where your Rails server is running at (typically `http://localhost:3000`).
|
31
31
|
|
@@ -52,7 +52,7 @@ You should now setup your database:
|
|
52
52
|
|
53
53
|
[source,console]
|
54
54
|
----
|
55
|
-
bin/rails db:create db:migrate db:seed
|
55
|
+
bin/rails db:create db:migrate assets:precompile db:seed
|
56
56
|
----
|
57
57
|
|
58
58
|
This will also create some example data through the seeds so that you can start testing the application straight away. The following table contains some example user accounts that you can start testing the system with.
|
@@ -81,7 +81,7 @@ This will also create some example data through the seeds so that you can start
|
|
81
81
|
|
82
82
|
|===
|
83
83
|
|
84
|
-
This data will not be created in production environments. If you insist on adding it in production, run: `$ SEED=true rails db:setup`. We
|
84
|
+
This data will not be created in production environments. If you insist on adding it in production, run: `$ SEED=true rails db:setup`. We recommend that you first login as a system user and edit the hostname for the organization. Set it as your production environment's domain, without the protocol and the port (so if your domain/hostname is `+https://example.org:3000+`, you need to write `example.org` in the organization's host field).
|
85
85
|
|
86
86
|
You can now start your server!
|
87
87
|
|
@@ -142,7 +142,7 @@ We also have other guides on how to configure some extra mandatory components:
|
|
142
142
|
|
143
143
|
== Deploy
|
144
144
|
|
145
|
-
Once you have successfully deployed your
|
145
|
+
Once you have successfully deployed your application to your favorite platform, you will need to create your `System` user. You can do this using the following command in your terminal:
|
146
146
|
|
147
147
|
[source,console]
|
148
148
|
----
|
@@ -153,7 +153,7 @@ The command asks for an email and a password. For security, the password will no
|
|
153
153
|
|
154
154
|
This will create a system user with the email and password you provided. We recommend using a random password generator and saving it to a password manager, so you have a more secure credentials.
|
155
155
|
|
156
|
-
After this, visit the `/system` panel and
|
156
|
+
After this, visit the `/system` panel and log in with the email and passwords you just entered and create your organization. Now you are ready to setup your organization and after that you are done! 🎉
|
157
157
|
|
158
158
|
=== What are organizations?
|
159
159
|
|
@@ -172,7 +172,7 @@ There are several things you need to check before making your putting your appli
|
|
172
172
|
|
173
173
|
== Contributing
|
174
174
|
|
175
|
-
We always welcome new contributors of all levels to the project. If you are not confident enough with Ruby or web development you can look for https://github.com/decidim/decidim/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22[issues labeled `good first issue`] to start
|
175
|
+
We always welcome new contributors of all levels to the project. If you are not confident enough with Ruby or web development you can look for https://github.com/decidim/decidim/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22[issues labeled `good first issue`] to start contributing and learning the internals of the project by doing easy jobs.
|
176
176
|
|
177
177
|
We also have a xref:develop:guide.adoc[developer's reference] that will help you getting started with your environment and our daily commands, routines, etc.
|
178
178
|
|
@@ -27,7 +27,7 @@ First, we are going to install https://github.com/rbenv/rbenv[rbenv], for managi
|
|
27
27
|
[source,bash]
|
28
28
|
----
|
29
29
|
sudo apt update
|
30
|
-
sudo apt install -y build-essential curl git libssl-dev zlib1g-dev
|
30
|
+
sudo apt install -y build-essential curl git libssl-dev zlib1g-dev
|
31
31
|
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
32
32
|
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
33
33
|
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
|
@@ -133,6 +133,7 @@ We should now create your database. For a first local installation, we recommend
|
|
133
133
|
[source,bash]
|
134
134
|
----
|
135
135
|
bin/rails db:create db:migrate
|
136
|
+
bin/rails assets:precompile
|
136
137
|
bin/rails db:seed
|
137
138
|
----
|
138
139
|
|
@@ -165,5 +166,5 @@ The seed data will not be created in production environments, if you still want
|
|
165
166
|
|
166
167
|
[source,bash]
|
167
168
|
----
|
168
|
-
SEED=true rails db:seed
|
169
|
+
SEED=true rails assets:precompile db:seed
|
169
170
|
----
|
@@ -37,7 +37,7 @@ bin/rails decidim:upgrade
|
|
37
37
|
bin/rails db:migrate
|
38
38
|
----
|
39
39
|
|
40
|
-
In theory, that would be all. However, you need to be careful in certain situations, specially if your copy of Decidim has many code modifications. We'd recommend to always test the upgrade following Ruby on Rails best practices: working with development mode in localhost, deploying to a staging/preproduction server to test it manually (specially your modifications) and finally deploying to production. As an alternative you can test the upgrade in a separate machine with the same configuration (If using
|
40
|
+
In theory, that would be all. However, you need to be careful in certain situations, specially if your copy of Decidim has many code modifications. We'd recommend to always test the upgrade following Ruby on Rails best practices: working with development mode in localhost, deploying to a staging/preproduction server to test it manually (specially your modifications) and finally deploying to production. As an alternative you can test the upgrade in a separate machine with the same configuration (If using DigitalOcean you can create an snapshot of the server, tested the update, and then remove it, similar process on other providers).
|
41
41
|
|
42
42
|
== From git repositories
|
43
43
|
|
@@ -80,7 +80,7 @@ gem "decidim-initiatives", DECIDIM_VERSION
|
|
80
80
|
gem "decidim-dev", DECIDIM_VERSION
|
81
81
|
----
|
82
82
|
|
83
|
-
==
|
83
|
+
== Compatibility versions matrix
|
84
84
|
|
85
85
|
There are different versions of Decidim that are compatible with different versions of Ruby and Node. You can check the following table to see which versions are compatible with each other:
|
86
86
|
|
@@ -50,7 +50,7 @@ Google Cloud Storage requires you to use the `gsutil` command line tool to set t
|
|
50
50
|
gsutil cors set cors.json gs://your-bucket-name
|
51
51
|
----
|
52
52
|
|
53
|
-
Before running that command you need to have a `cors.json` file in the same directory where you are
|
53
|
+
Before running that command you need to have a `cors.json` file in the same directory where you are running the command from with the following content (replace `https://www.example.com` with the actual domain of your service):
|
54
54
|
|
55
55
|
[source,json]
|
56
56
|
----
|
@@ -4,7 +4,6 @@ There are multiple services that can be enabled in a Decidim installation. It is
|
|
4
4
|
|
5
5
|
* xref:services:activejob.adoc[Active Job]
|
6
6
|
* xref:services:activestorage.adoc[Active Storage]
|
7
|
-
* xref:services:elections_bulletin_board.adoc[Elections Bulletin Board]
|
8
7
|
* xref:services:etherpad.adoc[Etherpad]
|
9
8
|
* xref:services:maps.adoc[Maps]
|
10
9
|
* xref:services:sms.adoc[SMS]
|
@@ -191,7 +191,7 @@ Decidim works fine when some of the services are disabled individually but obvio
|
|
191
191
|
|
192
192
|
=== Global geocoder configurations
|
193
193
|
|
194
|
-
In the
|
194
|
+
In the Decidim initialiser (`config/initializers/decidim.rb`) you will also see a commented section for the global geocoder configurations commented as follows:
|
195
195
|
|
196
196
|
[source,ruby]
|
197
197
|
----
|
@@ -268,7 +268,7 @@ In the example configuration, we assume you have used the following domain for t
|
|
268
268
|
|
269
269
|
https://tiles.example.org
|
270
270
|
|
271
|
-
=== Static map images:
|
271
|
+
=== Static map images: OpenStreetMap static maps server (osm-static-maps)
|
272
272
|
|
273
273
|
Some pages in Decidim display static map images which need to be fetched from an external server.
|
274
274
|
The tiles server does not provide such static images by itself because one static map image may need multiple tiles to be combined into one.
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
If you want to verify your users by sending a verification code via SMS you need to provide a SMS gateway service class through the xref:configure:initializer.adoc[initializer].
|
4
4
|
|
5
|
-
This service can also be used by some spaces
|
5
|
+
This service can also be used by some spaces, and external modules could use it too.
|
6
6
|
|
7
7
|
An example class would be something like:
|
8
8
|
|
@@ -42,14 +42,14 @@ twitter:
|
|
42
42
|
== Google
|
43
43
|
|
44
44
|
. Navigate to https://console.developers.google.com[Google Developers Page]
|
45
|
-
. Follow the 'Create
|
45
|
+
. Follow the 'Create project' link.
|
46
46
|
. Fill in the name of your app.
|
47
|
-
. Navigate to the
|
47
|
+
. Navigate to the project dashboard and click on "Enable API"
|
48
48
|
. Click on `Google+ API` and then "Enable"
|
49
49
|
. Navigate to the project credentials page and click on `OAuth consent screen`.
|
50
50
|
. Fill in the `Product name` field
|
51
51
|
. Click on `Credentials` tab and click on "Create credentials" button. Select `OAuth client ID`.
|
52
|
-
. Select `Web applications`. Fill in the `Authorized
|
52
|
+
. Select `Web applications`. Fill in the `Authorized JavaScript origins` with your url. Then fill in the `Authorized redirect URIs` with your url and append the path `/users/auth/google_oauth2/callback`.
|
53
53
|
. Copy the CLIENT_ID AND CLIENT_SECRET
|
54
54
|
. Paste credentials in `config/secrets.yml` or in the organization configuration. Ensure the `enabled` attribute is `true`.
|
55
55
|
|
data/lib/decidim/gem_manager.rb
CHANGED
@@ -223,6 +223,8 @@ group :development do
|
|
223
223
|
gem "faker", "#{Gem.loaded_specs["decidim-dev"].dependencies.select { |a| a.name == "faker" }.first.requirement}"
|
224
224
|
gem "letter_opener_web", "#{fetch_gemfile_version("letter_opener_web")}"
|
225
225
|
gem "listen", "#{fetch_gemfile_version("listen")}"
|
226
|
+
gem "spring", "#{fetch_gemfile_version("spring")}"
|
227
|
+
gem "spring-watcher-listen", "#{fetch_gemfile_version("spring-watcher-listen")}"
|
226
228
|
gem "web-console", "#{fetch_gemfile_version("web-console")}"
|
227
229
|
end
|
228
230
|
)
|