decidim 0.9.3 → 0.10.0
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.
- checksums.yaml +4 -4
- data/Gemfile +8 -8
- data/Gemfile.lock +143 -145
- data/README.md +42 -62
- data/Rakefile +26 -25
- data/docs/add_authenticable_action.md +20 -0
- data/docs/adding_fixtures_aka_dummy_content.md +7 -0
- data/docs/advanced/activity_log.md +138 -0
- data/docs/{content_processors.md → advanced/content_processors.md} +1 -1
- data/docs/advanced/deploy.md +9 -0
- data/docs/{features_and_components.md → advanced/features.md} +0 -0
- data/docs/{create_followers_from_resource_authors.md → advanced/followers.md} +17 -1
- data/docs/advanced/how_to_create_a_module.md +9 -0
- data/docs/{managing_translations_i18n.md → advanced/managing_translations_i18n.md} +0 -0
- data/docs/{migrate_to_0.8.0.md → advanced/migrate_to_0.8.0.md} +26 -22
- data/docs/advanced/testing.md +29 -0
- data/docs/advanced/tradeoffs.md +14 -0
- data/docs/{view_hooks.md → advanced/view_hooks.md} +18 -5
- data/docs/customization/authorizations.md +13 -1
- data/docs/data-picker.md +48 -0
- data/docs/getting_started.md +28 -17
- data/docs/services/activejob.md +7 -0
- data/docs/{analytics.md → services/analytics.md} +0 -0
- data/docs/{geocoding.md → services/geocoding.md} +0 -0
- data/docs/{social_providers.md → services/social_providers.md} +0 -0
- data/lib/decidim/component_manager.rb +22 -21
- data/lib/decidim/version.rb +1 -1
- data/lib/generators/decidim/app_generator.rb +33 -16
- data/lib/generators/decidim/install_generator.rb +9 -3
- data/lib/generators/decidim/templates/database.yml.erb +2 -2
- data/lib/generators/decidim/templates/initializer.rb +1 -1
- metadata +51 -45
- data/docs/create_followers_from_comment_authors.md +0 -12
- data/docs/how_to_create_a_module.md +0 -170
- data/docs/testing.md +0 -17
data/lib/decidim/version.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "bundler"
|
3
4
|
require "rails/generators"
|
4
5
|
require "rails/generators/rails/app/app_generator"
|
5
6
|
require "decidim/version"
|
@@ -36,10 +37,6 @@ module Decidim
|
|
36
37
|
default: nil,
|
37
38
|
desc: "Use a specific branch from GitHub's version"
|
38
39
|
|
39
|
-
class_option :database, type: :string,
|
40
|
-
default: "postgresql",
|
41
|
-
desc: "Configure for selected database (options: #{DATABASES.join("/")})"
|
42
|
-
|
43
40
|
class_option :recreate_db, type: :boolean,
|
44
41
|
default: false,
|
45
42
|
desc: "Recreate test database"
|
@@ -48,9 +45,6 @@ module Decidim
|
|
48
45
|
default: false,
|
49
46
|
desc: "Seed test database"
|
50
47
|
|
51
|
-
class_option :app_const_base, type: :string,
|
52
|
-
desc: "The application constant name"
|
53
|
-
|
54
48
|
class_option :skip_bundle, type: :boolean,
|
55
49
|
default: true,
|
56
50
|
desc: "Don't run bundle install"
|
@@ -59,7 +53,8 @@ module Decidim
|
|
59
53
|
default: false,
|
60
54
|
desc: "Don't generate a Gemfile for the application"
|
61
55
|
|
62
|
-
class_option :demo, type: :boolean,
|
56
|
+
class_option :demo, type: :boolean,
|
57
|
+
default: false,
|
63
58
|
desc: "Generate a demo authorization handler"
|
64
59
|
|
65
60
|
def database_yml
|
@@ -86,8 +81,8 @@ module Decidim
|
|
86
81
|
def gemfile
|
87
82
|
return if options[:skip_gemfile]
|
88
83
|
|
89
|
-
template
|
90
|
-
template
|
84
|
+
template target_gemfile, "Gemfile", force: true
|
85
|
+
template "#{target_gemfile}.lock", "Gemfile.lock", force: true
|
91
86
|
|
92
87
|
gem_modifier = if options[:path]
|
93
88
|
"path: \"#{options[:path]}\""
|
@@ -99,8 +94,10 @@ module Decidim
|
|
99
94
|
"\"#{Decidim.version}\""
|
100
95
|
end
|
101
96
|
|
102
|
-
gsub_file "Gemfile", /gem "
|
103
|
-
|
97
|
+
gsub_file "Gemfile", /gem "#{current_gem}".*/, "gem \"#{current_gem}\", #{gem_modifier}"
|
98
|
+
gsub_file "Gemfile", /gem "decidim-dev".*/, "gem \"decidim-dev\", #{gem_modifier}" if current_gem == "decidim"
|
99
|
+
|
100
|
+
Bundler.with_original_env { run "bundle install" }
|
104
101
|
end
|
105
102
|
|
106
103
|
def add_ignore_uploads
|
@@ -130,12 +127,32 @@ module Decidim
|
|
130
127
|
|
131
128
|
private
|
132
129
|
|
133
|
-
def
|
134
|
-
|
130
|
+
def current_gem
|
131
|
+
return "decidim" unless options[:path]
|
132
|
+
|
133
|
+
File.read(gemspec).match(/name\s*=\s*['"](?<name>.*)["']/)[:name]
|
134
|
+
end
|
135
|
+
|
136
|
+
def gemspec
|
137
|
+
File.expand_path(Dir.glob("*.gemspec", base: expanded_path).first, expanded_path)
|
138
|
+
end
|
139
|
+
|
140
|
+
def target_gemfile
|
141
|
+
root = if options[:path]
|
142
|
+
expanded_path
|
143
|
+
else
|
144
|
+
decidim_root
|
145
|
+
end
|
146
|
+
|
147
|
+
File.join(root, "Gemfile")
|
148
|
+
end
|
149
|
+
|
150
|
+
def expanded_path
|
151
|
+
File.expand_path(options[:path])
|
135
152
|
end
|
136
153
|
|
137
|
-
def
|
138
|
-
|
154
|
+
def decidim_root
|
155
|
+
File.expand_path(File.join("..", "..", ".."), __dir__)
|
139
156
|
end
|
140
157
|
end
|
141
158
|
end
|
@@ -64,7 +64,7 @@ module Decidim
|
|
64
64
|
def smtp_environment
|
65
65
|
inject_into_file "config/environments/production.rb",
|
66
66
|
after: "config.log_formatter = ::Logger::Formatter.new" do
|
67
|
-
<<~RUBY
|
67
|
+
cut <<~RUBY
|
68
68
|
|
|
69
69
|
| config.action_mailer.smtp_settings = {
|
70
70
|
| :address => Rails.application.secrets.smtp_address,
|
@@ -86,16 +86,18 @@ module Decidim
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def letter_opener_web
|
89
|
-
|
89
|
+
letter_opener_route = cut <<~RUBY
|
90
90
|
|
|
91
91
|
| if Rails.env.development?
|
92
92
|
| mount LetterOpenerWeb::Engine, at: "/letter_opener"
|
93
93
|
| end
|
94
94
|
RUBY
|
95
95
|
|
96
|
+
route letter_opener_route
|
97
|
+
|
96
98
|
inject_into_file "config/environments/development.rb",
|
97
99
|
after: "config.action_mailer.raise_delivery_errors = false" do
|
98
|
-
<<~RUBY
|
100
|
+
cut <<~RUBY
|
99
101
|
|
|
100
102
|
| config.action_mailer.delivery_method = :letter_opener_web
|
101
103
|
| config.action_mailer.default_url_options = { port: 3000 }
|
@@ -127,6 +129,10 @@ module Decidim
|
|
127
129
|
variables = File.join(Gem.loaded_specs["decidim-core"].full_gem_path, "app", "assets", "stylesheets", "decidim", "_variables.scss")
|
128
130
|
File.read(variables).split("\n").map { |line| "// #{line}".gsub(" !default", "") }.join("\n")
|
129
131
|
end
|
132
|
+
|
133
|
+
def cut(text)
|
134
|
+
text.gsub(/^ *\|/, "").rstrip
|
135
|
+
end
|
130
136
|
end
|
131
137
|
end
|
132
138
|
end
|
@@ -28,7 +28,7 @@ default: &default
|
|
28
28
|
|
29
29
|
development:
|
30
30
|
<<: *default
|
31
|
-
database: <%%= ENV.fetch("
|
31
|
+
database: <%%= ENV.fetch("DEV_DATABASE_NAME") { "<%= app_name %>_development" } %>
|
32
32
|
|
33
33
|
# The specified database role being used to connect to postgres.
|
34
34
|
# To create additional roles in postgres see `$ createuser --help`.
|
@@ -62,7 +62,7 @@ development:
|
|
62
62
|
# Do not set this db to the same as development or production.
|
63
63
|
test:
|
64
64
|
<<: *default
|
65
|
-
database: <%%= ENV.fetch("
|
65
|
+
database: <%%= ENV.fetch("TEST_DATABASE_NAME") { "<%= app_name %>_test" } %>
|
66
66
|
|
67
67
|
# As with config/secrets.yml, you never want to store sensitive information,
|
68
68
|
# like your database password, in your source code. If your source code is
|
@@ -16,7 +16,7 @@ Decidim.configure do |config|
|
|
16
16
|
# }
|
17
17
|
|
18
18
|
# Custom resource reference generator method
|
19
|
-
# config.
|
19
|
+
# config.reference_generator = lambda do |resource, feature|
|
20
20
|
# # Implement your custom method to generate resources references
|
21
21
|
# "1234-#{resource.id}"
|
22
22
|
# end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-accountability
|
@@ -18,210 +18,210 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.10.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.10.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-admin
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.10.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.10.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: decidim-api
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.10.0
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.10.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-assemblies
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.10.0
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.10.0
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: decidim-budgets
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.10.0
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.10.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: decidim-comments
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
91
|
+
version: 0.10.0
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
98
|
+
version: 0.10.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-core
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
105
|
+
version: 0.10.0
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
112
|
+
version: 0.10.0
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: decidim-debates
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - '='
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.10.0
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - '='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.
|
126
|
+
version: 0.10.0
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: decidim-meetings
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
131
|
- - '='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.
|
133
|
+
version: 0.10.0
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - '='
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.
|
140
|
+
version: 0.10.0
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: decidim-pages
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - '='
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.
|
147
|
+
version: 0.10.0
|
148
148
|
type: :runtime
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - '='
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 0.
|
154
|
+
version: 0.10.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: decidim-participatory_processes
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
159
|
- - '='
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: 0.
|
161
|
+
version: 0.10.0
|
162
162
|
type: :runtime
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - '='
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.
|
168
|
+
version: 0.10.0
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: decidim-proposals
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
173
|
- - '='
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: 0.
|
175
|
+
version: 0.10.0
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
178
|
version_requirements: !ruby/object:Gem::Requirement
|
179
179
|
requirements:
|
180
180
|
- - '='
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: 0.
|
182
|
+
version: 0.10.0
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
184
|
name: decidim-surveys
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - '='
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version: 0.
|
189
|
+
version: 0.10.0
|
190
190
|
type: :runtime
|
191
191
|
prerelease: false
|
192
192
|
version_requirements: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
194
|
- - '='
|
195
195
|
- !ruby/object:Gem::Version
|
196
|
-
version: 0.
|
196
|
+
version: 0.10.0
|
197
197
|
- !ruby/object:Gem::Dependency
|
198
198
|
name: decidim-system
|
199
199
|
requirement: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
201
|
- - '='
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version: 0.
|
203
|
+
version: 0.10.0
|
204
204
|
type: :runtime
|
205
205
|
prerelease: false
|
206
206
|
version_requirements: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
208
|
- - '='
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version: 0.
|
210
|
+
version: 0.10.0
|
211
211
|
- !ruby/object:Gem::Dependency
|
212
212
|
name: decidim-verifications
|
213
213
|
requirement: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
215
|
- - '='
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
version: 0.
|
217
|
+
version: 0.10.0
|
218
218
|
type: :runtime
|
219
219
|
prerelease: false
|
220
220
|
version_requirements: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
222
|
- - '='
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
version: 0.
|
224
|
+
version: 0.10.0
|
225
225
|
- !ruby/object:Gem::Dependency
|
226
226
|
name: bundler
|
227
227
|
requirement: !ruby/object:Gem::Requirement
|
@@ -280,10 +280,19 @@ files:
|
|
280
280
|
- README.md
|
281
281
|
- Rakefile
|
282
282
|
- bin/decidim
|
283
|
-
- docs/
|
284
|
-
- docs/
|
285
|
-
- docs/
|
286
|
-
- docs/
|
283
|
+
- docs/add_authenticable_action.md
|
284
|
+
- docs/adding_fixtures_aka_dummy_content.md
|
285
|
+
- docs/advanced/activity_log.md
|
286
|
+
- docs/advanced/content_processors.md
|
287
|
+
- docs/advanced/deploy.md
|
288
|
+
- docs/advanced/features.md
|
289
|
+
- docs/advanced/followers.md
|
290
|
+
- docs/advanced/how_to_create_a_module.md
|
291
|
+
- docs/advanced/managing_translations_i18n.md
|
292
|
+
- docs/advanced/migrate_to_0.8.0.md
|
293
|
+
- docs/advanced/testing.md
|
294
|
+
- docs/advanced/tradeoffs.md
|
295
|
+
- docs/advanced/view_hooks.md
|
287
296
|
- docs/customization/authorizations.md
|
288
297
|
- docs/customization/code.md
|
289
298
|
- docs/customization/gemfile.md
|
@@ -292,15 +301,12 @@ files:
|
|
292
301
|
- docs/customization/styles.md
|
293
302
|
- docs/customization/texts.md
|
294
303
|
- docs/customization/views.md
|
295
|
-
- docs/
|
296
|
-
- docs/geocoding.md
|
304
|
+
- docs/data-picker.md
|
297
305
|
- docs/getting_started.md
|
298
|
-
- docs/
|
299
|
-
- docs/
|
300
|
-
- docs/
|
301
|
-
- docs/social_providers.md
|
302
|
-
- docs/testing.md
|
303
|
-
- docs/view_hooks.md
|
306
|
+
- docs/services/activejob.md
|
307
|
+
- docs/services/analytics.md
|
308
|
+
- docs/services/geocoding.md
|
309
|
+
- docs/services/social_providers.md
|
304
310
|
- lib/decidim.rb
|
305
311
|
- lib/decidim/component_manager.rb
|
306
312
|
- lib/decidim/version.rb
|
@@ -338,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
344
|
version: '0'
|
339
345
|
requirements: []
|
340
346
|
rubyforge_project:
|
341
|
-
rubygems_version: 2.7.
|
347
|
+
rubygems_version: 2.7.6
|
342
348
|
signing_key:
|
343
349
|
specification_version: 4
|
344
350
|
summary: Citizen participation framework for Ruby on Rails.
|