decidim 0.28.0 → 0.28.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +5 -0
  3. data/decidim-core/lib/decidim/webpacker/webpack/.modernizrrc +9 -0
  4. data/decidim.gemspec +72 -0
  5. data/docs/modules/customize/pages/styles.adoc +14 -3
  6. data/docs/modules/develop/pages/maintainers/releases.adoc +4 -0
  7. data/docs/modules/install/assets/attachments/.gitkeep +0 -0
  8. data/docs/modules/install/assets/images/.gitkeep +0 -0
  9. data/docs/modules/install/pages/manual.adoc +18 -7
  10. data/docs/modules/install/pages/update.adoc +5 -0
  11. data/docs/modules/install/partials/version_matrix.adoc +13 -0
  12. data/lib/decidim/gem_manager.rb +38 -0
  13. data/lib/decidim/version.rb +1 -1
  14. data/package-lock.json +338 -1935
  15. data/packages/browserslist-config/package.json +1 -1
  16. data/packages/core/package.json +31 -31
  17. data/packages/dev/package.json +2 -2
  18. data/packages/elections/package.json +1 -1
  19. data/packages/eslint-config/index.js +6 -1
  20. data/packages/eslint-config/package.json +2 -1
  21. data/packages/prettier-config/package.json +1 -1
  22. data/packages/stylelint-config/package.json +1 -1
  23. data/packages/webpacker/package.json +1 -1
  24. metadata +53 -69
  25. data/packages/core/node_modules/uuid/AUTHORS +0 -5
  26. data/packages/core/node_modules/uuid/CHANGELOG.md +0 -119
  27. data/packages/core/node_modules/uuid/LICENSE.md +0 -21
  28. data/packages/core/node_modules/uuid/README.md +0 -276
  29. data/packages/core/node_modules/uuid/bin/uuid +0 -65
  30. data/packages/core/node_modules/uuid/index.js +0 -8
  31. data/packages/core/node_modules/uuid/lib/bytesToUuid.js +0 -26
  32. data/packages/core/node_modules/uuid/lib/md5-browser.js +0 -216
  33. data/packages/core/node_modules/uuid/lib/md5.js +0 -25
  34. data/packages/core/node_modules/uuid/lib/rng-browser.js +0 -34
  35. data/packages/core/node_modules/uuid/lib/rng.js +0 -8
  36. data/packages/core/node_modules/uuid/lib/sha1-browser.js +0 -89
  37. data/packages/core/node_modules/uuid/lib/sha1.js +0 -25
  38. data/packages/core/node_modules/uuid/lib/v35.js +0 -57
  39. data/packages/core/node_modules/uuid/package.json +0 -49
  40. data/packages/core/node_modules/uuid/v1.js +0 -109
  41. data/packages/core/node_modules/uuid/v3.js +0 -4
  42. data/packages/core/node_modules/uuid/v4.js +0 -29
  43. data/packages/core/node_modules/uuid/v5.js +0 -3
  44. data/packages/core/package-lock.json +0 -2157
  45. data/packages/eslint-config/package-lock.json +0 -4797
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43ffce179e14eeb2eaeeee7f17b624b440c24f9fced3c4de51b1ee7c1aff5aa6
4
- data.tar.gz: 2f160e31c2dd4d58644b3246b2b5471ff7e954fc685c39b0a3c0db4795f88d48
3
+ metadata.gz: b78d83e0c5eb8adf3edd807545e4295c0db4c06deb4c39589b7d0230056cbdc4
4
+ data.tar.gz: e266cf1aabe4c9763d588c96cf385f94b0dcbc0f20d5bc1c90f9f83b199a4170
5
5
  SHA512:
6
- metadata.gz: 2c7f5f2737a3380773fd049bfeab63a72117d0135efbe1b5d03093689f13f12033ba5002062332806417e1189543c6425636441f5ff22420e92d3a937cb35940
7
- data.tar.gz: 4c77afa4ba8827c307fbf114fc363f89aa60eede9cab4b7fcd579bdcd6eddfb284e34d252e775f363ff65ce58be17615ae70fea3e45002c81ef3ad0bbcb79439
6
+ metadata.gz: 54dc79fe6f887690b0b5299ca16760448e062fdd6645c04e249969703fffc5d731758a14264d2dc209257b1b47422fdbab0f8f879ce2f87fe99fa352fe39da3d
7
+ data.tar.gz: 910c4939a2a6bd0c58d0cfd6c0038fedf4a73e2efbc362784efdb1d30b15ce5e6c675d5426884f32bc23d78e86d16ddb80c8c3c2df7e3ca7437421c07226e883
data/Rakefile CHANGED
@@ -27,6 +27,11 @@ task :update_versions do
27
27
  Decidim::GemManager.replace_versions
28
28
  end
29
29
 
30
+ desc "Patch generators with required library versions"
31
+ task :patch_generators do
32
+ Decidim::GemManager.patch_component_gemfile_generator
33
+ end
34
+
30
35
  Decidim::GemManager.all_dirs(include_root: false) do |dir|
31
36
  manager = Decidim::GemManager.new(dir)
32
37
  name = manager.short_name
@@ -0,0 +1,9 @@
1
+ {
2
+ "minify": true,
3
+ "options": [
4
+ "setClasses"
5
+ ],
6
+ "feature-detects": [
7
+ "css/transitions"
8
+ ]
9
+ }
data/decidim.gemspec ADDED
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path("lib", __dir__)
4
+
5
+ # Maintain your gem's version:
6
+ require "decidim/version"
7
+
8
+ Gem::Specification.new do |s|
9
+ s.version = Decidim.version
10
+ s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
11
+ s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
12
+ s.license = "AGPL-3.0"
13
+ s.homepage = "https://decidim.org"
14
+ s.metadata = {
15
+ "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
16
+ "documentation_uri" => "https://docs.decidim.org/",
17
+ "funding_uri" => "https://opencollective.com/decidim",
18
+ "homepage_uri" => "https://decidim.org",
19
+ "source_code_uri" => "https://github.com/decidim/decidim"
20
+ }
21
+ s.required_ruby_version = "~> 3.1.0"
22
+
23
+ s.name = "decidim"
24
+
25
+ s.summary = "Citizen participation framework for Ruby on Rails."
26
+ s.description = "A generator and multiple gems made with Ruby on Rails."
27
+
28
+ s.files = Dir.chdir(__dir__) do
29
+ `git ls-files -z`.split("\x0").select do |f|
30
+ (File.expand_path(f) == __FILE__) ||
31
+ f.start_with?(*%w(
32
+ docs/
33
+ lib/
34
+ LICENSE-AGPLv3.txt
35
+ Rakefile
36
+ README.md
37
+ package.json
38
+ package-lock.json
39
+ packages/
40
+ babel.config.json
41
+ decidim-core/lib/decidim/webpacker/
42
+ ))
43
+ end
44
+ end
45
+
46
+ s.require_paths = ["lib"]
47
+
48
+ s.add_dependency "decidim-accountability", Decidim.version
49
+ s.add_dependency "decidim-admin", Decidim.version
50
+ s.add_dependency "decidim-api", Decidim.version
51
+ s.add_dependency "decidim-assemblies", Decidim.version
52
+ s.add_dependency "decidim-blogs", Decidim.version
53
+ s.add_dependency "decidim-budgets", Decidim.version
54
+ s.add_dependency "decidim-comments", Decidim.version
55
+ s.add_dependency "decidim-core", Decidim.version
56
+ s.add_dependency "decidim-debates", Decidim.version
57
+ s.add_dependency "decidim-forms", Decidim.version
58
+ s.add_dependency "decidim-generators", Decidim.version
59
+ s.add_dependency "decidim-meetings", Decidim.version
60
+ s.add_dependency "decidim-pages", Decidim.version
61
+ s.add_dependency "decidim-participatory_processes", Decidim.version
62
+ s.add_dependency "decidim-proposals", Decidim.version
63
+ s.add_dependency "decidim-sortitions", Decidim.version
64
+ s.add_dependency "decidim-surveys", Decidim.version
65
+ s.add_dependency "decidim-system", Decidim.version
66
+ s.add_dependency "decidim-templates", Decidim.version
67
+ s.add_dependency "decidim-verifications", Decidim.version
68
+
69
+ s.add_development_dependency "bundler", "~> 2.2", ">= 2.2.18"
70
+ s.add_development_dependency "rake", "~> 12.0"
71
+ s.add_development_dependency "rspec", "~> 3.0"
72
+ end
@@ -50,11 +50,11 @@ image::header-snippet.png[Header snippet]
50
50
 
51
51
  Notice that you can resize this textarea.
52
52
 
53
- == Webpacker
53
+ == Shakapacker
54
54
 
55
- Decidim uses Webpacker to compile assets. There are two ways to customize CSS:
55
+ Decidim uses Shakapacker to compile assets. There are two ways to customize CSS:
56
56
 
57
- 1. if you want to redefine a specific snippet of CSS (say a few classes but not a whole file) you can use decidim_application.scss
57
+ 1. if you want to redefine a specific snippet of CSS (say a few classes but not a whole file) you can use decidim_application.scss. You can read more about this in the <<Overriding CSS and styles>> section.
58
58
  2. and of course you can overwrite whole files by copying them into the application i.e: to replace `decidim-core/app/packs/stylesheets/decidim/modules/_data-consent.scss` you should create in your Rails app a file in `app/packs/stylesheets/decidim/modules/_data-consent.scss` and it will have more priority over the Decidim file.
59
59
  3. if you want to customize the application colors yo can use the admin interface.
60
60
 
@@ -68,6 +68,17 @@ Since this file is being managed by Decidim, it will be impossible to customize
68
68
 
69
69
  You can override the default configuration by creating a file `config/tailwind.config.js.erb` starting from the following https://github.com/decidim/decidim/blob/develop/decidim-core/lib/decidim/assets/tailwind/tailwind.config.js.erb[content]
70
70
 
71
+ == Overriding CSS and styles
72
+
73
+ If you want to override a specific CSS class, you can do so by adding a new CSS class in your `app/assets/stylesheets/decidim_application.scss` file. This will allow you to override the default styles provided by Decidim.
74
+
75
+ *Please note:* the above file is created by default when you install Decidim. Also the file is empty. This file allows you to edit *only* the end user styles.
76
+
77
+ If you want to override other layouts, you can do so by creating new files:
78
+
79
+ . /admin: `app/packs/stylesheets/decidim/admin/decidim_application.scss`
80
+ . /system: `app/packs/stylesheets/decidim/system/decidim_application.scss`
81
+
71
82
  == Accessibility
72
83
 
73
84
  To maintain accesibility level, if you add new colors use a http://webaim.org/resources/contrastchecker/[Color contrast checker] (WCAG AA is mandatory, WCAG AAA is recommended)
@@ -17,6 +17,7 @@ Mark `develop` as the reference to the next release:
17
17
  . Turn develop into the `dev` branch for the next release:
18
18
  .. Update `.decidim-version` to the new `dev` development version: `x.y.z.dev`, where `x.y.z` is the new semver number for the next version
19
19
  .. Run `bin/rake update_versions`, this will update all references to the new version.
20
+ .. Run `bin/rake patch_generators`, this will update the Gemfile for the generators to the new version.
20
21
  .. Run `bin/rake bundle`, this will update all the `Gemfile.lock` files
21
22
  .. Run `bin/rake webpack`, this will update the JavaScript bundle.
22
23
  . Update `SECURITY.md` and change the supported version to the new version.
@@ -193,6 +194,7 @@ If this is a *Release Candidate version* release, the steps to follow are:
193
194
  . Checkout the release stable branch `git checkout release/x.y-stable`.
194
195
  . Update `.decidim-version` to the new version `x.y.z.rc1`
195
196
  . Run `bin/rake update_versions`, this will update all references to the new version.
197
+ . Run `bin/rake patch_generators`, this will update the Gemfile for the generators to the new version.
196
198
  . Run `bin/rake bundle`, this will update all the `Gemfile.lock` files
197
199
  . Run `bin/rake webpack`, this will update the JavaScript bundle.
198
200
  . Run `bin/rspec`, this will check things like if all the officially supported languages translations are OK.
@@ -216,6 +218,7 @@ Release Candidates will be tested in a production server (usually Metadecidim) d
216
218
  . Checkout the release stable branch `git checkout release/x.y-stable`.
217
219
  . Update `.decidim-version` by removing the `.rcN` suffix, leaving a clean version number like `x.y.z`
218
220
  . Run `bin/rake update_versions`, this will update all references to the new version.
221
+ . Run `bin/rake patch_generators`, this will update the Gemfile for the generators to the new version.
219
222
  . Run `bin/rake bundle`, this will update all the `Gemfile.lock` files
220
223
  . Run `bin/rake webpack`, this will update the JavaScript bundle.
221
224
  . Update the `CHANGELOG.md`.
@@ -279,6 +282,7 @@ The process is very similar from releasing a new Decidim version:
279
282
  . Checkout the branch you want to release: `git checkout -b release/x.y-stable`
280
283
  . Update `.decidim-version` to the new version number.
281
284
  . Run `bin/rake update_versions`, this will update all references to the new version.
285
+ . Run `bin/rake patch_generators`, this will update the Gemfile for the generators to the new version.
282
286
  . Run `bin/rake bundle`, this will update all the `Gemfile.lock` files
283
287
  . Run `bin/rake webpack`, this will update the JavaScript bundle.
284
288
  . Update the `CHANGELOG.md`.
File without changes
File without changes
@@ -4,13 +4,17 @@ In order to develop on decidim, you will need:
4
4
 
5
5
  * *Git* 2.34+
6
6
  * *PostgreSQL* 14.5+
7
- * *Ruby* 3.0.2
7
+ * *Ruby* 3.1.1
8
8
  * *NodeJS* 18.17.x
9
9
  * *Npm* 9.6.x
10
10
  * *ImageMagick*
11
11
  * *Chrome* browser and https://sites.google.com/a/chromium.org/chromedriver/[chromedriver].
12
12
 
13
- We are starting with an Ubuntu 22.04.1 LTS. This is an opinionated guide, so you are free to use the technology that you are most comfortable. If you have any doubts and you are blocked you can go and ask on https://matrix.to/#/#decidimdevs:matrix.org[our Matrix.org chat room for developers].
13
+ The compatibility between the different versions of the components is the following:
14
+
15
+ include::install:partial$version_matrix.adoc[]
16
+
17
+ We are starting with an Ubuntu 22.04.3 LTS. This is an opinionated guide, so you are free to use the technology that you are most comfortable. If you have any doubts and you are blocked you can go and ask on https://matrix.to/#/#decidimdevs:matrix.org[our Matrix.org chat room for developers].
14
18
 
15
19
  We recommend to have at least some basic proficiency in GNU/Linux (i.e. how to use the command-line, packages, etc), networking knowledge, server administration, development in general, and some basic knowledge about software package managers. It would be great to have Ruby on Rails development basics (a good starting point is http://guides.rubyonrails.org/getting_started.html[Getting Started with Ruby on Rails]) and have some knowledge on how package libraries are working (we use `bundler` for handling ruby packages, and `npm`/`yarn` for handling javascript).
16
20
 
@@ -29,8 +33,8 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
29
33
  echo 'eval "$(rbenv init -)"' >> ~/.bashrc
30
34
  source ~/.bashrc
31
35
  git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
32
- rbenv install 3.0.2
33
- rbenv global 3.0.2
36
+ rbenv install 3.1.1
37
+ rbenv global 3.1.1
34
38
  ----
35
39
 
36
40
  == 2. Installing PostgreSQL
@@ -51,8 +55,10 @@ An important component for Decidim is Node.js and Yarn. With this commands you w
51
55
 
52
56
  [source,bash]
53
57
  ----
54
- curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
55
- sudo apt-get install -y nodejs
58
+ sudo mkdir -p /etc/apt/keyrings
59
+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
60
+ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
61
+ sudo apt-get update && sudo apt-get install -y nodejs
56
62
  curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
57
63
  echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
58
64
  sudo apt-get update && sudo apt-get install -y yarn
@@ -111,6 +117,11 @@ EOF
111
117
 
112
118
  Be careful where you put the `.rbenv-vars` file, as if you put it in the same folder of your decidim generated application, and if you use a version control system (like `git`, which we strongly recommend), then you should ignore this file (ie with the `.gitignore` file).
113
119
 
120
+ [source,bash]
121
+ ----
122
+ echo -e "\n\n# Ignore environment variables\n.rbenv-vars" >> .gitignore
123
+ ----
124
+
114
125
  == 6. Initializing your app for local development
115
126
 
116
127
  [NOTE]
@@ -133,7 +144,7 @@ You can now start your server!
133
144
 
134
145
  [source,bash]
135
146
  ----
136
- bin/rails s
147
+ bin/dev
137
148
  ----
138
149
 
139
150
  Visit http://localhost:3000 to see your app running. 🎉 🎉
@@ -80,6 +80,11 @@ gem "decidim-initiatives", DECIDIM_VERSION
80
80
  gem "decidim-dev", DECIDIM_VERSION
81
81
  ----
82
82
 
83
+ == Compatiblity versions matrix
84
+
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
+
87
+ include::install:partial$version_matrix.adoc[]
83
88
 
84
89
  [discrete]
85
90
  == Recommendations
@@ -0,0 +1,13 @@
1
+
2
+ |===
3
+ |Decidim version |Ruby version |Node version | Status
4
+
5
+ |develop | 3.2.2 | 18.17.x | Unreleased
6
+
7
+ |v0.28 | 3.1.1 | 18.17.x | Bug fixes and security updates
8
+
9
+ |v0.27 | 3.0.2 | 16.18.x | Bug fixes and security updates
10
+
11
+ |v0.26 | 2.7.5+ | 16.9.x | Not maintained
12
+
13
+ |===
@@ -199,8 +199,46 @@ module Decidim
199
199
  ENV.fetch("RETRY_TIMES", 10).to_i
200
200
  end
201
201
 
202
+ def patch_component_gemfile_generator
203
+ content = %(# frozen_string_literal: true
204
+ <%# This file is automatically generated. Do not edit this file, it will be overwritten
205
+ If you want to modify it you can do it in the Decidim::GemManager.patch_component_gemfile_generator method %>
206
+ source "https://rubygems.org"
207
+
208
+ ruby RUBY_VERSION
209
+
210
+ gem "decidim", "~> #{version}"
211
+ gem "decidim-<%= component_name %>", path: "."
212
+
213
+ gem "puma", "#{fetch_gemfile_version("puma")}"
214
+ gem "bootsnap", "#{fetch_gemfile_version("bootsnap")}"
215
+
216
+ group :development, :test do
217
+ gem "byebug", "#{fetch_gemfile_version("byebug")}", platform: :mri
218
+
219
+ gem "decidim-dev", "~> #{version}"
220
+ end
221
+
222
+ group :development do
223
+ gem "faker", "#{Gem.loaded_specs["decidim-dev"].dependencies.select { |a| a.name == "faker" }.first.requirement}"
224
+ gem "letter_opener_web", "#{fetch_gemfile_version("letter_opener_web")}"
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")}"
228
+ gem "web-console", "#{fetch_gemfile_version("web-console")}"
229
+ end
230
+ )
231
+
232
+ file_path = File.join(root, "decidim-generators/lib/decidim/generators/component_templates/Gemfile.erb")
233
+ File.write(file_path, content)
234
+ end
235
+
202
236
  private
203
237
 
238
+ def fetch_gemfile_version(bundle_name)
239
+ Bundler.definition.dependencies.select { |a| a.name == bundle_name }.first.requirement.to_s
240
+ end
241
+
204
242
  def root
205
243
  File.expand_path(File.join("..", ".."), __dir__)
206
244
  end
@@ -3,6 +3,6 @@
3
3
  # This holds the decidim version and the faker version it uses.
4
4
  module Decidim
5
5
  def self.version
6
- "0.28.0"
6
+ "0.28.1"
7
7
  end
8
8
  end