decidim 0.25.2 → 0.26.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

@@ -4,17 +4,17 @@ In order to develop on decidim, you'll need:
4
4
 
5
5
  * *Git* 2.15+
6
6
  * *PostgreSQL* 12.7+
7
- * *Ruby* 2.7.1
7
+ * *Ruby* 2.7.5
8
8
  * *NodeJS* 16.9.x
9
9
  * *Npm* 7.21.x
10
10
  * *ImageMagick*
11
11
  * *Chrome* browser and https://sites.google.com/a/chromium.org/chromedriver/[chromedriver].
12
12
 
13
- We're starting with an Ubuntu 20.04 LTS. This is an opinionated guide, so you're free to use the technology that you are most comfortable. If you have any doubts and you're blocked you can go and ask on https://gitter.im/decidim/decidim[our Gitter].
13
+ We're starting with an Ubuntu 20.04.2 LTS. This is an opinionated guide, so you're free to use the technology that you are most comfortable. If you have any doubts and you're blocked you can go and ask on https://matrix.to/#/#decidimdevs:matrix.org[our Matrix.org chat room for developers].
14
14
 
15
15
  We recommend to have at least some basic proficiency in Ruby on Rails (a good starting point is http://guides.rubyonrails.org/getting_started.html[Getting Started with Ruby on Rails]) and have some knowledge on how gems work.
16
16
 
17
- In this guide, we'll see how to install rbenv, PostgreSQL and, Decidim, and how to configure everything together.
17
+ In this guide, we'll see how to install rbenv, PostgreSQL, Node.js and, Decidim, and how to configure everything together for a development environment. Mind that if you want to make a production deployment with real users this guide isn't enough, you should configure a web server (like nginx), backups, monitoring, etc. This is out of the scope of this guide, but you can follow the https://platoniq.github.io/decidim-install/[Platoniq guide].
18
18
 
19
19
  == 1. Installing rbenv
20
20
 
@@ -23,14 +23,14 @@ First, we're going to install https://github.com/rbenv/rbenv[rbenv], for managin
23
23
  [source,bash]
24
24
  ----
25
25
  sudo apt update
26
- sudo apt install -y build-essential git libssl-dev zlib1g-dev
26
+ sudo apt install -y build-essential curl git libssl-dev zlib1g-dev
27
27
  git clone https://github.com/rbenv/rbenv.git ~/.rbenv
28
28
  echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
29
29
  echo 'eval "$(rbenv init -)"' >> ~/.bashrc
30
30
  source ~/.bashrc
31
31
  git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
32
- rbenv install 2.7.1
33
- rbenv global 2.7.1
32
+ rbenv install 2.7.5
33
+ rbenv global 2.7.5
34
34
  ----
35
35
 
36
36
  == 2. Installing PostgreSQL
@@ -45,13 +45,26 @@ sudo -u postgres psql -c "CREATE USER decidim_app WITH SUPERUSER CREATEDB NOCREA
45
45
 
46
46
  You need to change the password (in this example is "thepassword") and save it somewhere to configure it later with the application.
47
47
 
48
- == 3. Installing Decidim
48
+ == 3. Installing Node.js
49
+
50
+ An important component for Decidim is Node.js and Yarn. With this commands you will install them:
51
+
52
+ [source,bash]
53
+ ----
54
+ curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
55
+ sudo apt-get install -y nodejs
56
+ curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
57
+ 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
+ sudo apt-get update && sudo apt-get install -y yarn
59
+ ----
60
+
61
+ == 4. Installing Decidim
49
62
 
50
63
  Next, we need to install the `decidim` gem with its dependencies:
51
64
 
52
65
  [source,bash]
53
66
  ----
54
- sudo apt install -y libicu-dev nodejs imagemagick
67
+ sudo apt install -y libicu-dev imagemagick
55
68
  gem install decidim
56
69
  ----
57
70
 
@@ -71,43 +84,34 @@ git add .
71
84
  git commit -m "Initial commit. Generated with Decidim https://decidim.org"
72
85
  ----
73
86
 
74
- == 4. Configure the database
87
+ == 5. Configure the database
75
88
 
76
- Modify your secrets (see `config/database.yml`). For this you can use https://github.com/laserlemon/figaro[figaro], https://github.com/bkeepers/dotenv[dotenv] or https://github.com/rbenv/rbenv-vars[rbenv-vars]. You should always be careful of not uploading your plain secrets on git or your version control system. You can also upload the encrypted secrets, using the sekrets gem or if you're on Ruby on Rails greater than 5.1 you can do it natively.
89
+ Modify your secrets (see `config/database.yml`). For this you can use https://github.com/laserlemon/figaro[figaro], https://github.com/bkeepers/dotenv[dotenv] or https://github.com/rbenv/rbenv-vars[rbenv-vars]. You
90
+ should always be careful of not uploading your plain secrets on git or your version control system. You can also upload the encrypted secrets, using the sekrets gem or if you're on Ruby on Rails greater than 5.1 you can do it natively.
77
91
 
78
- For instance, for working with figaro, add this to your `Gemfile`:
92
+ For a development environment, and if you are using rbenv, we strongly recommend you to use the https://github.com/rbenv/rbenv-vars[rbenv-vars] to facilitate the edition of ENV vars.
79
93
 
80
- [source,ruby]
81
- ----
82
- gem "figaro"
83
- ----
84
-
85
- Then install it:
94
+ First you'll need to install the rbenv-vars plugin:
86
95
 
87
96
  [source,bash]
88
97
  ----
89
- bundle install
90
- bundle exec figaro install
98
+ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars
91
99
  ----
92
100
 
93
- Next, add this to your `config/application.yml`, using the setup PostgreSQL database name, user and, password that you've configured before.
94
-
95
- [source,yaml]
96
- ----
97
- DATABASE_HOST: localhost
98
- DATABASE_USERNAME: decidim_app
99
- DATABASE_PASSWORD: thepassword
100
- ----
101
-
102
- Finally, save it all to git:
101
+ Then, in **any folder above your decidim generated application**, you need to create a file named `.rbenv-vars` and put your variables there:
103
102
 
104
103
  [source,bash]
105
104
  ----
106
- git add .
107
- git commit -m "Add figaro configuration management"
105
+ cat << EOF > .rbenv-vars
106
+ DATABASE_HOST=localhost
107
+ DATABASE_USERNAME=decidim_app
108
+ DATABASE_PASSWORD=thepassword
109
+ EOF
108
110
  ----
109
111
 
110
- == 5. Initializing your app for local development
112
+ 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
+
114
+ == 6. Initializing your app for local development
111
115
 
112
116
  We should now create your database:
113
117
 
@@ -119,7 +123,7 @@ bin/rails db:seed
119
123
 
120
124
  This will also create some default data so you can start testing the app, with an administrator account with email admin@example.org and password `decidim123456`
121
125
 
122
- == 6. Start your web server
126
+ == 7. Start your web server
123
127
 
124
128
  You can now start your server!
125
129
 
@@ -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.25.2"
6
+ "0.26.0.rc2"
7
7
  end
8
8
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/common_passwords"
4
+
5
+ namespace :decidim do
6
+ namespace :common_passwords do
7
+ desc "Update common passwords list"
8
+ task :update do
9
+ Decidim::CommonPasswords.update_passwords!
10
+ end
11
+ end
12
+ end