decidim 0.23.5 → 0.24.2

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.

Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -0
  3. data/docs/README.adoc +74 -0
  4. data/docs/antora.yml +7 -0
  5. data/docs/modules/configure/pages/environment_variables.adoc +69 -0
  6. data/docs/modules/configure/pages/index.adoc +16 -0
  7. data/docs/modules/configure/pages/initializer.adoc +376 -0
  8. data/docs/modules/customize/assets/images/header-snippet.png +0 -0
  9. data/docs/modules/customize/assets/images/menu.png +0 -0
  10. data/docs/modules/customize/assets/images/organization-colors.png +0 -0
  11. data/docs/modules/customize/pages/authorizations.adoc +22 -0
  12. data/docs/{customization/code.md → modules/customize/pages/code.adoc} +12 -9
  13. data/docs/{customization/gemfile.md → modules/customize/pages/gemfile.adoc} +5 -4
  14. data/docs/modules/customize/pages/images.adoc +7 -0
  15. data/docs/modules/customize/pages/javascript.adoc +59 -0
  16. data/docs/modules/customize/pages/menu.adoc +25 -0
  17. data/docs/modules/customize/pages/oauth.adoc +33 -0
  18. data/docs/modules/customize/pages/styles.adoc +64 -0
  19. data/docs/modules/customize/pages/texts.adoc +30 -0
  20. data/docs/modules/customize/pages/users_registration_mode.adoc +17 -0
  21. data/docs/{customization/views.md → modules/customize/pages/views.adoc} +13 -13
  22. data/docs/modules/develop/assets/images/barcelona.png +0 -0
  23. data/docs/modules/develop/assets/images/helsinki.png +0 -0
  24. data/docs/modules/develop/assets/images/indices.png +0 -0
  25. data/docs/{advanced/api.md → modules/develop/pages/api.adoc} +2 -2
  26. data/docs/{advanced/authorship.md → modules/develop/pages/authorable.adoc} +5 -5
  27. data/docs/modules/develop/pages/c4_component.adoc +91 -0
  28. data/docs/modules/develop/pages/c4_container.adoc +42 -0
  29. data/docs/modules/develop/pages/c4_context.adoc +35 -0
  30. data/docs/{advanced/components.md → modules/develop/pages/components.adoc} +47 -10
  31. data/docs/{advanced/content_blocks.md → modules/develop/pages/content_blocks.adoc} +16 -13
  32. data/docs/{advanced/content_processors.md → modules/develop/pages/content_processors.adoc} +25 -19
  33. data/docs/modules/develop/pages/data-picker.adoc +85 -0
  34. data/docs/modules/develop/pages/deploy.adoc +15 -0
  35. data/docs/modules/develop/pages/docker.adoc +12 -0
  36. data/docs/{advanced/embeddable.md → modules/develop/pages/embeddable.adoc} +6 -6
  37. data/docs/{advanced/endorsable.md → modules/develop/pages/endorsable.adoc} +31 -25
  38. data/docs/{advanced/fixing_locales.md → modules/develop/pages/fixing_locales.adoc} +36 -23
  39. data/docs/{advanced/followers.md → modules/develop/pages/followable.adoc} +9 -8
  40. data/docs/modules/develop/pages/guide.adoc +16 -0
  41. data/docs/modules/develop/pages/guide_architecture.adoc +17 -0
  42. data/docs/modules/develop/pages/guide_changelog.adoc +8 -0
  43. data/docs/modules/develop/pages/guide_commands.adoc +86 -0
  44. data/docs/modules/develop/pages/guide_development_app.adoc +44 -0
  45. data/docs/modules/develop/pages/guide_development_with_custom_seed_data.adoc +31 -0
  46. data/docs/modules/develop/pages/guide_development_with_localhost_ssl.adoc +63 -0
  47. data/docs/modules/develop/pages/guide_example_apps.adoc +59 -0
  48. data/docs/modules/develop/pages/guide_git_conventions.adoc +75 -0
  49. data/docs/modules/develop/pages/guide_github_projects.adoc +42 -0
  50. data/docs/modules/develop/pages/guide_semver.adoc +7 -0
  51. data/docs/{advanced/how_to_fix_metrics.md → modules/develop/pages/how_to_fix_metrics.adoc} +76 -59
  52. data/docs/modules/develop/pages/machine_translations.adoc +42 -0
  53. data/docs/modules/develop/pages/managing_translations_i18n.adoc +24 -0
  54. data/docs/modules/develop/pages/maps.adoc +499 -0
  55. data/docs/modules/develop/pages/metrics.adoc +119 -0
  56. data/docs/{advanced/modules.md → modules/develop/pages/modules.adoc} +16 -6
  57. data/docs/{advanced/newsletter_templates.md → modules/develop/pages/newsletter_templates.adoc} +12 -10
  58. data/docs/{advanced/notifications.md → modules/develop/pages/notifications.adoc} +40 -38
  59. data/docs/{advanced/open-data.md → modules/develop/pages/open-data.adoc} +4 -3
  60. data/docs/modules/develop/pages/permissions.adoc +92 -0
  61. data/docs/{advanced/profiling.md → modules/develop/pages/profiling.adoc} +15 -12
  62. data/docs/modules/develop/pages/releases.adoc +148 -0
  63. data/docs/modules/develop/pages/reportable.adoc +31 -0
  64. data/docs/modules/develop/pages/security.adoc +33 -0
  65. data/docs/{advanced/share_tokens.md → modules/develop/pages/share_tokens.adoc} +18 -14
  66. data/docs/{advanced/templates.md → modules/develop/pages/templates.adoc} +14 -12
  67. data/docs/{advanced/testing.md → modules/develop/pages/testing.adoc} +21 -20
  68. data/docs/{advanced/activity_log.md → modules/develop/pages/traceable.adoc} +31 -26
  69. data/docs/modules/develop/pages/turbolinks.adoc +7 -0
  70. data/docs/{advanced/view_hooks.md → modules/develop/pages/view_hooks.adoc} +29 -23
  71. data/docs/modules/develop/pages/view_models_aka_cells.adoc +105 -0
  72. data/docs/modules/install/pages/checklist.adoc +39 -0
  73. data/docs/modules/install/pages/index.adoc +148 -0
  74. data/docs/{manual-installation.md → modules/install/pages/manual.adoc} +54 -42
  75. data/docs/modules/install/pages/update.adoc +95 -0
  76. data/docs/{services/activejob.md → modules/services/pages/activejob.adoc} +3 -3
  77. data/docs/modules/services/pages/elections_bulletin_board.adoc +52 -0
  78. data/docs/{services/etherpad.md → modules/services/pages/etherpad.adoc} +15 -12
  79. data/docs/modules/services/pages/maps.adoc +311 -0
  80. data/docs/modules/services/pages/smtp.adoc +10 -0
  81. data/docs/modules/services/pages/social_providers.adoc +122 -0
  82. data/lib/decidim/gem_manager.rb +5 -5
  83. data/lib/decidim/version.rb +1 -1
  84. metadata +135 -98
  85. data/README.md +0 -157
  86. data/docs/advanced/add_authorizable_action.md +0 -63
  87. data/docs/advanced/adding_fixtures_aka_dummy_content.md +0 -9
  88. data/docs/advanced/data-picker.md +0 -83
  89. data/docs/advanced/deploy.md +0 -9
  90. data/docs/advanced/how_to_create_a_module.md +0 -9
  91. data/docs/advanced/machine_translation_service.md +0 -12
  92. data/docs/advanced/managing_translations_i18n.md +0 -24
  93. data/docs/advanced/metrics.md +0 -114
  94. data/docs/advanced/permissions.md +0 -23
  95. data/docs/advanced/releases.md +0 -114
  96. data/docs/advanced/tradeoffs.md +0 -14
  97. data/docs/advanced/view_models_aka_cells.md +0 -99
  98. data/docs/checklist.md +0 -55
  99. data/docs/customization/authorizations.md +0 -5
  100. data/docs/customization/images.md +0 -7
  101. data/docs/customization/javascript.md +0 -9
  102. data/docs/customization/machine_translations.md +0 -30
  103. data/docs/customization/maps.md +0 -610
  104. data/docs/customization/oauth.md +0 -50
  105. data/docs/customization/styles.md +0 -11
  106. data/docs/customization/texts.md +0 -27
  107. data/docs/customization/users_registration_mode.md +0 -17
  108. data/docs/development_guide.md +0 -166
  109. data/docs/getting_started.md +0 -191
  110. data/docs/possible_flows_for_proposal.png +0 -0
  111. data/docs/services/analytics.md +0 -23
  112. data/docs/services/elections_bulletin_board.md +0 -38
  113. data/docs/services/maps.md +0 -362
  114. data/docs/services/social_providers.md +0 -98
@@ -1,50 +0,0 @@
1
- # OAuth
2
-
3
- Decidim is both and OAuth client (via [omniauth](https://github.com/omniauth/omniauth)) and an OAuth provider (via [doorkeeper](https://github.com/doorkeeper-gem/doorkeeper)).
4
-
5
- Check the [Social Providers](https://github.com/decidim/decidim/blob/master/docs/services/social_providers.md) document to check the client configuration.
6
-
7
- ## Decidim as an OAuth provider
8
-
9
- You can use your own Decidim application to log in to other applications that support OAuth 2. To do it you need to create an OAuth application from the admin panel for each client that wants to use Decidim.
10
-
11
- To create a new OAuth application you need:
12
-
13
- * Name: The name of the client application that will be shown to the user when authorizing it from your Decidim application.
14
- * Redirect URI: The URI where the Decidim application should redirect the user after authorizing it. It is usually where you handle the OAUth callback in your client application. If you're using `omniauth-decidim` the value should be `YOUR_APPLICATION_HOST/users/auth/decidim/callback`.
15
- * Organization name: The name of the organization that owns the client application.
16
- * Organization URL: The URL of the organization that owns the client application.
17
- * Organization logo: An image of the logo of the organization that owns the client application.
18
-
19
- All the organization data will be used during the authorization process so the users know to who they're giving their data.
20
-
21
- Once you've created your application you'll get the settings to setup your client.
22
-
23
- Check [omniauth-decidim](https://github.com/decidim/omniauth-decidim) in order to configure your client application.
24
-
25
- ## Performing more actions on omniauth registration
26
-
27
- Some times, there is the need to perform more actions than just creating a user on registration, this is why `CreateOmniauthRegistration` command publishes a `"decidim.user.omniauth_registration` event after registration so that developers can subscribe to it and perform other actions like user verification or alike.
28
-
29
- This event comes with the following payload:
30
-
31
- * user_id: The id for the registered User.
32
- * identity_id: The id for the social Identity.
33
- * provider: The name for the social provider.
34
- * uid: OAuth's uid
35
- * email: User's email.
36
- * name: User's name.
37
- * nickname: User's nickname after being normalized.
38
- * avatar_url: Avatar's url, if any.
39
- * raw_data: The raw hash received directly from the Omniauth gem.
40
-
41
- To be notified after a registration one should subscribe to the event, in the passed block the after registration code should be implemented:
42
-
43
- ```ruby
44
- ActiveSupport::Notifications.subscribe "decidim.user.omniauth_registration" do |name, started, finished, unique_id, data|
45
- puts "the data: #{data.inspect}"
46
- IdCatMobilVerificationJob.perform_later(data[:raw_data])
47
- end
48
- ```
49
-
50
- It is a good practice to delegate the required implementation to a Job to bring a fastest response to the user, also it will avoid that crashes in this code to propagate to the registration process.
@@ -1,11 +0,0 @@
1
- # CSS Styles with SASS
2
-
3
- One of the first things you’ll want to do after you install Decidim is applying your own corporative image. To do this, you can go to app/assets/stylesheets/application.css.sass on your generated application with your own colors. There you can override any class using CSS with SASS.
4
-
5
- In [decidim-core/app/assets/stylesheets/decidim/_variables.scss](https://github.com/decidim/decidim/blob/master/decidim-core/app/assets/stylesheets/decidim/_variables.scss) you can find the `variables` that can be overriden in your `sass`.
6
-
7
- We use [SASS, with SCSS syntax](http://sass-lang.com/guide) as CSS preprocessor.
8
-
9
- ## **Accesibility**
10
-
11
- To maintain accesibility level, if you add new colors use a [Color contrast checker](http://webaim.org/resources/contrastchecker/) (WCAG AA is mandatory, WCAG AAA is recommended)
@@ -1,27 +0,0 @@
1
- # Custom Texts
2
-
3
- ## Using custom locales
4
-
5
- You can change most of the texts through the Administration panel.
6
-
7
- If you want to change a given text that isn’t on the Administration panel, and belongs on Decidim code, you should first find out which key is being used. For instance, you want to change the home page text where it says "Let's build a more open, transparent and collaborative society.", you would search the text (using [github](https://github.com/decidim/decidim/search?utf8=%E2%9C%93&q=%22Let%27s+build+a+more+open%2C+transparent+and+collaborative+society.%22&type= ) or grep) and then you would extract that key and their parents. On this case it’d be:
8
-
9
- ```yml
10
- en:
11
- pages:
12
- home:
13
- footer_sub_hero:
14
- footer_sub_hero_body: Let's build a more open, transparent and collaborative society.<br /> Join, participate and decide.
15
- ```
16
-
17
- You need to create a file for this translation as [Ruby on Rails i18n documentation](http://guides.rubyonrails.org/i18n.html) says, for instance config/locales/home.en.yml, you can see a currently working example in [this PR](https://github.com/AjuntamentdeBarcelona/decidim-barcelona/pull/206).
18
-
19
- ## Using external module
20
-
21
- There is an external module [decidim-term_customizer](https://github.com/mainio/decidim-module-term_customizer), according with the project README:
22
-
23
- > The module allows administrators to add "translation sets" through the admin panel which contain customized terms for any module in the system. These sets can be applied against different scopes within the system, e.g. the whole system, participatory space scope (e.g. all participatory processes or a specific participatory process) or a specific component within a participatory space.
24
-
25
- To implement this on your decidim installation follow the [documentation in the external module](https://github.com/mainio/decidim-module-term_customizer/blob/master/README.md).
26
-
27
- You can see an example in [this PR](https://github.com/decidim/metadecidim/pull/38).
@@ -1,17 +0,0 @@
1
- # Users registration mode
2
-
3
- Decidim allows organizations to choose one of the three modes related to the registration and login of users. This can be configured by the system user, in the organization manager zone.
4
-
5
- ## Allow users to register and login
6
-
7
- This is the default mode. It enables the registration form and allow anyone to create a new account and log in.
8
-
9
- ## Don't allow users to register, but allow existing users to login
10
-
11
- This mode disables the registration form, but allows existing users to log in. This mode could be useful for organizations with a closed census that do not want to offer other people to register.
12
-
13
- Note: if you have configured [social providers](services/social_providers.md), users will still be able to sign in with external accounts even when this mode is configured.
14
-
15
- ## Access only can be done with external accounts
16
-
17
- This mode disables the registration form and the login form. With this mode, users only can access through [social providers](services/social_providers.md), so it is recommended to configure at least one of them. This can be useful when an organization needs to allow participation only to users of another application of the organization itself.
@@ -1,166 +0,0 @@
1
- # Developing Decidim
2
-
3
- ## Create a development_app
4
-
5
- In order to start developing you will need what is called a `development_app`. This is nearly the same as a new Decidim app (that you can create with `decidim app_name`) but with a Gemfile pre-configured for local development and some other small config modifications.
6
- You need it in order to have a Rails application configured to lookup Decidim modules from your filesystem. This way changes in your modules will be directly observed by this `development_app`.
7
-
8
- You can create a `development_app` from inside the project's root folder with the command:
9
-
10
- ```console
11
- git clone https://github.com/decidim/decidim.git
12
- cd decidim
13
- bundle install
14
- bundle exec rake development_app
15
- cd development_app
16
- ```
17
-
18
- A development_app/ entry appears in the .gitignore file, so you don't have to worry about commiting the development app by mistake.
19
-
20
- On creation, this steps are automatically invoked by the generator:
21
-
22
- - create a `config/database.yml`
23
- - `bundle install`
24
- - `bin/rails decidim:upgrade`
25
- - `bin/rails db:migrate db:seed`
26
-
27
- If the default database.yml does not suit your needs you can always configure it at your will and run this steps manually.
28
-
29
- Once created you are ready to:
30
-
31
- - `bin/rails s`
32
-
33
- ## GitFlow Branching model
34
-
35
- The Decidim respository follows the GitFlow branching model. There are good documentations on it at:
36
-
37
- - the original post: https://nvie.com/posts/a-successful-git-branching-model/
38
- - provided by Atlassian: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow.
39
-
40
- This model introduces the `develop` branch as a kind of queue for new features to enter into the next release.
41
-
42
- In summary, Decidim developers that work on `feature/...` or `fix/...` branches will branch off from `develop` and must be merged back into `develop`.
43
-
44
- Then, to start a new feature branch off from `develop` in the following way:
45
-
46
- ```bash
47
- git checkout develop
48
- git checkout -b feature/xxx
49
- ```
50
-
51
- Implement the feature, and open a Pull Request as normal, but against `develop` branch. As this is the most common operation, `develop` is the default branch instead of `master`.
52
-
53
- ### Naming Decidim branches
54
-
55
- We would like to have all branches following this namings:
56
-
57
- | Branch prefix | Comment |
58
- | -------- | -------- |
59
- | chore/ | Internal work. For instance, automatisms, etc. No production code change. |
60
- | ci/ | For continous integration related tasks. No production code change. |
61
- | deps/ | For dependency management tasks. |
62
- | doc/ | For changes to the documentation. |
63
- | feature/ | For new features for the users or for the Decidim command. |
64
- | fix/ | For feature bugfixing. |
65
- | release/ | With MAYOR.MINOR-stable. For instance, release/0.22-stable |
66
- | refactor/ | For refactorings related with production code. |
67
- | test/ | When adding missing tests, refactoring tests, improving coverage, etc. |
68
- | backport/ | We only offer support for the last mayor version. |
69
-
70
- ## Git commit messages and Pull Request titles
71
-
72
- We recommend following [this guide](https://chris.beams.io/posts/git-commit/) for making good git commit messages. It also applies to Pull Request titles. The summary is:
73
-
74
- 1. Separate subject from body with a blank line
75
- 1. Limit the subject line to 50 characters
76
- 1. Capitalize the subject line
77
- 1. Do not end the subject line with a period
78
- 1. Use the imperative mood in the subject line
79
- 1. Wrap the body at 72 characters
80
- 1. Use the body to explain what and why vs. how
81
-
82
- ## During development
83
-
84
- When creating new migrations in Decidim's modules, you will need to "apply" this migrations to your development_app. The way to do this is by copying the migration from your module into the db/migrate dir of your development_app. Luckily we already have a script that automates this: it copies all missing migrations in development_app/db/migrate. The command is:
85
-
86
- ```console
87
- bin/rails decidim:upgrade
88
- ```
89
-
90
- Anyway we recommend re-creating your development_app every once in a while.
91
-
92
- ## Useful commands
93
-
94
- ### erb-lint
95
-
96
- We use erblint gem to ensure homogeneous formatting of erb files.
97
-
98
- ```console
99
- bundle exec erblint --lint-all --autocorrect
100
- # shortest
101
- bundle exec erblint --lint-all -a
102
- # even shortest
103
- bundle exec erblint -la -a
104
- ```
105
-
106
- ### I18n
107
-
108
- We use i18n-tasks gem to keep translations ordered and without missing/unused keys.
109
-
110
- ```console
111
- # from the root of the project
112
- bundle exec i18n-tasks normalize --locales en
113
- ```
114
-
115
- ### JavaScript linter
116
-
117
- [eslint](https://eslint.org/docs/user-guide/command-line-interface) and [tslint](https://palantir.github.io/tslint/) are used to ensure homogeneous formatting of JavaScript code.
118
-
119
- To lint and try to fix linting errors, run:
120
-
121
- ```console
122
- npm run lint --fix
123
- ```
124
-
125
- ### Stylelinter
126
-
127
- [stylelint](https://stylelint.io/) is a CSS linter and fixer that helps to avoid errors and enforce consistent conventions in the stylesheets. Is an npm package, install it using:
128
-
129
- ```console
130
- npm install -g stylelint
131
- ```
132
-
133
- Linting a `.scss` file:
134
-
135
- ```console
136
- stylelint [path-to-file]
137
- ```
138
-
139
- With `--fix` option [stylelint](https://stylelint.io/user-guide/cli/#autofixing-errors) will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported.
140
-
141
- ```console
142
- stylelint [path-to-file] --fix
143
- ```
144
-
145
- ### Rubocop
146
-
147
- RuboCop is a code analyzer tool we use at Decidim to enforce our code formatting guidelines.
148
-
149
- ```console
150
- # Run Rubocop
151
- bundle exec rubocop
152
- # Run Rubocop and automatically correct offenses
153
- bundle exec rubocop -a
154
- ```
155
-
156
- ### Markdown linter
157
-
158
- This project uses [markdownlint](https://github.com/markdownlint/markdownlint) to check markdown files and flag style issues.
159
-
160
- ## Good to know
161
-
162
- - There is an application with current designs at: https://decidim-design.herokuapp.com/
163
-
164
- ## Testing
165
-
166
- Refer to the [testing](advanced/testing.md) guide.
@@ -1,191 +0,0 @@
1
- # Getting started with Decidim
2
-
3
- ## What is and what isn't Decidim?
4
-
5
- Decidim is a set of Ruby on Rails engines to create a participatory democracy framework on top of a Ruby on Rails app. This system allows having Decidim code separated from custom code for each installation and still enabling easy updates.
6
-
7
- These libraries are published to Rubygems.org, so you can add Decidim to your Ruby on Rails app as external dependencies.
8
-
9
- If you want to start your own installation of Decidim, you don't need to clone this repo. Keep reading to find out how to install Decidim.
10
-
11
- ## Creating your Decidim app
12
-
13
- ### A. Recommended: manual installation
14
-
15
- If you know Ruby and have already worked with Ruby on Rails, you
16
- need to know that decidim is a gem and a command line that generates
17
- an application that consumes this gem 😅.
18
-
19
- The flow is: install gem, generate a Ruby on Rails app, enjoy.
20
-
21
- ```console
22
- gem install decidim
23
- decidim decidim_application
24
- ```
25
-
26
- You can see the [official manual installation tutorial](/docs/manual-installation.md),
27
- and also you have [another manual installation tutorial](https://github.com/Platoniq/decidim-install)
28
- made by the nice people of [Platoniq](http://www.platoniq.net/).
29
-
30
- ### B. Using installation script [experimental]
31
-
32
- > *Please note that this is **experimental***
33
-
34
- We've made an script for Ubuntu 16.04 LTS and macos sierra 10.2.
35
- It's a BETA and as such you should be aware that this could break
36
- your environment (if you have any). It'll install rbenv, postgresql,
37
- nodejs and install decidim on this directory. It should take 15
38
- minutes depending on your network connection.
39
-
40
- ```console
41
- wget http://get.decidim.org -O install_decidim.bash
42
- bash install_decidim.bash
43
- ```
44
-
45
- Read more about the [installation script](https://github.com/alabs/decidim-install).
46
-
47
- ### C. Using Docker [experimental]
48
-
49
- You can also use [docker] && [docker-compose] to develop decidim. You'll
50
- need to install those but in exchange you don't need to install any other
51
- dependency in your computer, not even Ruby!
52
-
53
- To get started, first clone the decidim repo
54
-
55
- ```console
56
- git clone https://github.com/decidim/decidim
57
- ```
58
-
59
- Switch to the cloned folder
60
-
61
- ```console
62
- cd decidim
63
- ```
64
-
65
- Then create a development application
66
-
67
- ```console
68
- d/bundle install
69
- d/rake development_app
70
- d/rails server -b 0.0.0.0
71
- ```
72
-
73
- In general, to use the docker development environment, change any instruction in
74
- the docs to use its equivalent docker binstub. So for example, instead of
75
- running `bundle install`, you would run `d/bundle install`.
76
-
77
- ## Initializing your app for local development
78
-
79
- You should now setup your database:
80
-
81
- ```console
82
- bin/rails db:create db:migrate db:seed
83
- ```
84
-
85
- This will also create some default data so you can start testing the app:
86
-
87
- * A `Decidim::System::Admin` with email `system@example.org` and password `decidim123456`, to log in at `/system`.
88
- * A `Decidim::Organization` named `Decidim Staging`. You probably want to change its name and hostname to match your needs.
89
- * A `Decidim::User` acting as an admin for the organization, with email `admin@example.org` and password `decidim123456`.
90
- * A `Decidim::User` that also belongs to the organization but it's a regular user, with email `user@example.org` and password `decidim123456`.
91
-
92
- This data won't be created in production environments, if you still want to do it, run: ``` $ SEED=true rails db:setup ```
93
-
94
- You can now start your server!
95
-
96
- ```console
97
- bin/rails s
98
- ```
99
-
100
- Visit [http://localhost:3000](http://localhost:3000) to see your app running.
101
-
102
- ## Configuration & setup
103
-
104
- Decidim comes pre-configured with some safe defaults, but can be changed through the `config/initializers/decidim.rb` file in your app. Check the comments there or read the comments in [the source file](https://github.com/decidim/decidim/blob/master/decidim-core/lib/decidim/core.rb) (the part with the `config_accessor` calls) for more up-to-date info.
105
-
106
- ### Scheduled tasks
107
-
108
- For Decidim to function as expected, there are some background tasks that should be scheduled to be executed regularly.
109
-
110
- - Expired *data portability* files should be removed. To do it, write a `crontab -e` line like: `0 0 * * * cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production decidim:delete_data_portability_files`
111
- - *Metrics* also require a cron to be computed nightly. Find more information in the [related documentation](https://github.com/decidim/decidim/blob/master/docs/advanced/metrics.md#Configuration).
112
- - *Open Data* is also produced nightly via a scheduled job. Find more information in the [open-data documentation](https://github.com/decidim/decidim/blob/master/docs/advanced/open-data.md).
113
- - Registration forms for meetings that have ended should be removed for privacy concerns. To do it, write a `crontab -e` line like: `0 0 * * * cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production decidim_meetings:clean_registration_forms`
114
-
115
- ### Further configuration
116
-
117
- We also have other guides on how to configure some extra components:
118
-
119
- * [ActiveJob](https://github.com/decidim/decidim/blob/master/docs/services/activejob.md)
120
- * [Analytics](https://github.com/decidim/decidim/blob/master/docs/services/analytics.md): How to enable analytics
121
- * [Geocoding](https://github.com/decidim/decidim/blob/master/docs/services/geocoding.md): How to enable geocoding for proposals and meetings
122
- * [Social providers integration](https://github.com/decidim/decidim/blob/master/docs/services/social_providers.md): Enable sign up from social networks.
123
-
124
- ## Deploy
125
-
126
- Once you've successfully deployed your app to your favorite platform, you'll need to create your `System` user. First you'll need to create your `Decidim::System` user in your production Ruby on Rails console:
127
-
128
- ```ruby
129
- email = <your email>
130
- password = <a secure password>
131
- user = Decidim::System::Admin.new(email: email, password: password, password_confirmation: password)
132
- user.save!
133
- ```
134
-
135
- This will create a system user with the email and password you set. We recommend using a random password generator and saving it to a password manager, so you have a more secure login.
136
-
137
- Then, visit the `/system` dashboard and login with the email and passwords you just entered and create your organization. You're done! :tada:
138
-
139
- You can check the [`decidim-system` README file](https://github.com/decidim/decidim/tree/master/decidim-system/README.md) for more info on how organizations work.
140
-
141
- ### Seed data in production
142
-
143
- If you want, you can create seed data in production. Run this command in your production console:
144
-
145
- ```console
146
- SEED=true rails db:seed
147
- ```
148
-
149
- You'll need to login as system user and edit the host for the organization. Set it to you production host, without the protocol and the port (so if your host is `https://my.host:3001`, you need to write `my.host`).
150
-
151
- ## Keeping your app up-to-date
152
-
153
- We keep releasing new versions of Decidim. In order to get the latest one, update your dependencies:
154
-
155
- ```console
156
- bundle update decidim
157
- ```
158
-
159
- And make sure you get all the latest migrations:
160
-
161
- ```console
162
- bin/rails decidim:upgrade
163
- bin/rails db:migrate
164
- ```
165
-
166
- You can also make sure new translations are complete for all languages in your
167
- application with:
168
-
169
- ```console
170
- TARGET_BRANCH=release/0.22-stable bin/rails decidim:check_locales
171
- ```
172
-
173
- Here the `TARGET_BRANCH` must be the same as the `decidim` dependency in your `Gemfile`.
174
-
175
- Be aware that this task might not be able to detect everything, so make sure you
176
- also manually check your application before upgrading.
177
-
178
- ## Checklist
179
-
180
- There are several things you need to check before making your putting your application on production. See the [checklist](checklist.md).
181
-
182
- [docker]: https://docs.docker.com/engine/installation/
183
- [docker-compose]: https://docs.docker.com/compose/install/
184
-
185
- ## Contributing
186
-
187
- 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 [issues](https://github.com/decidim/decidim/issues) labeled `good first issue` to start contibuting and learning the internals of the project by doing easy jobs.
188
-
189
- We also have a [developer's reference](/docs/development_guide.md) that will help you getting started with your environment and our daily commands, routines, etc.
190
-
191
- Finally, you can also find other ways of helping us on our [contribution guide](/CONTRIBUTING.md).