decidim-dev 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ede146339122bdeb698295a9e8cd8afad6cb7413032aabe3947cfee853269044
4
- data.tar.gz: 7da7335298e5dc28d576db2b9f38b1fec86bbb587b09d17c658be67a72e34d48
3
+ metadata.gz: 8568bca458641491154d91c01026c5f22c309947fde4391aa16640624eb940e1
4
+ data.tar.gz: eb07a5361d214c8b55a6caae964657ffeb4e9d533d1ac5a3ab9d79a55d35b9f8
5
5
  SHA512:
6
- metadata.gz: e69461033d3154fdf66af38bb1e86c692e739865f7c7882bbd2901f4ad8f647eb9e24ca179943f3f5e6d4bd8f043e320e8dbcfccf336ecb1a85e7001e60b83de
7
- data.tar.gz: a474cb9f3b03476909c14a69cba5a2fd2fe41680c4676c1c36d4df78153875634fc3c2dc0d343d60c4b67ff041b7b6284b5547e8e5d399c11ba89ceee122d1a7
6
+ metadata.gz: 96ce9076d0495ab9b0756d6c78115602409e0ebd7541ae4d6c71de28e5a49cb8b86a850fc0343ba970d2e09a3ca8bda637dd1a58db178ef30b757c54c66887f4
7
+ data.tar.gz: 258b7443be1e21f8bcc01c75f662c92a33bd96ba439dd80e6a1733e4c03555230c0c98b21631fc5ae781e90e7b8537346decb4a6fb6f1759a6fe96a9d4f7ad44
@@ -6,8 +6,10 @@ module Decidim
6
6
  mimic :dummy_resource
7
7
 
8
8
  attribute :title, String
9
+ attribute :body, String
9
10
 
10
- validate :title, presence: true
11
+ validates :title, :body, presence: true, etiquette: true
12
+ validates :title, length: { maximum: 150 }
11
13
  end
12
14
  end
13
15
  end
@@ -1,5 +1,11 @@
1
- <%= inline_comments_for(@commentable) %>
1
+ <div class="row">
2
+ <%= action_authorized_link_to :foo, foo_dummy_resource_path(@commentable) do %>
3
+ Foo
4
+ <% end %>
5
+ </div>
6
+
7
+ <div class="row">
8
+ <%= render partial: "decidim/shared/share_modal" %>
9
+ </div>
2
10
 
3
- <%= action_authorized_link_to :foo, foo_dummy_resource_path(@commentable) do %>
4
- Foo
5
- <% end %>
11
+ <%= inline_comments_for(@commentable) %>
@@ -0,0 +1,2 @@
1
+ my_user@example.org,My User Name
2
+ my_private_user@example.org,My Private User Name
@@ -32,6 +32,19 @@ Capybara.register_driver :headless_chrome do |app|
32
32
  )
33
33
  end
34
34
 
35
+ Capybara.register_driver :iphone do |app|
36
+ options = ::Selenium::WebDriver::Chrome::Options.new
37
+ options.args << "--headless"
38
+ options.args << "--no-sandbox"
39
+ options.add_emulation(device_name: "iPhone 6")
40
+
41
+ Capybara::Selenium::Driver.new(
42
+ app,
43
+ browser: :chrome,
44
+ options: options
45
+ )
46
+ end
47
+
35
48
  Capybara.server = :puma, { Silent: true }
36
49
 
37
50
  Capybara.asset_host = "http://localhost:3000"
@@ -10,6 +10,16 @@ module Decidim
10
10
  end
11
11
 
12
12
  module DummyResources
13
+ include ActiveSupport::Configurable
14
+
15
+ # Settings needed to compare emendations in Decidim::SimilarEmendations
16
+ config_accessor :similarity_threshold do
17
+ 0.25
18
+ end
19
+ config_accessor :similarity_limit do
20
+ 10
21
+ end
22
+
13
23
  # Dummy engine to be able to test components.
14
24
  class DummyEngine < Rails::Engine
15
25
  engine_name "dummy"
@@ -53,6 +63,7 @@ module Decidim
53
63
  include Paddable
54
64
  include Amendable
55
65
  include Decidim::NewsletterParticipant
66
+ include Hashtaggable
56
67
 
57
68
  searchable_fields(
58
69
  scope_id: { scope: :id },
@@ -123,12 +134,18 @@ Decidim.register_component(:dummy) do |component|
123
134
  settings.attribute :dummy_global_attribute_2, type: :boolean
124
135
  settings.attribute :enable_pads_creation, type: :boolean, default: false
125
136
  settings.attribute :amendments_enabled, type: :boolean, default: false
137
+ settings.attribute :dummy_global_translatable_text, type: :text, translated: true, editor: true, required: true
126
138
  end
127
139
 
128
140
  component.settings(:step) do |settings|
129
141
  settings.attribute :comments_blocked, type: :boolean, default: false
130
142
  settings.attribute :dummy_step_attribute_1, type: :boolean
131
143
  settings.attribute :dummy_step_attribute_2, type: :boolean
144
+ settings.attribute :dummy_step_translatable_text, type: :text, translated: true, editor: true, required: true
145
+ settings.attribute :amendment_creation_enabled, type: :boolean, default: true
146
+ settings.attribute :amendment_reaction_enabled, type: :boolean, default: true
147
+ settings.attribute :amendment_promotion_enabled, type: :boolean, default: true
148
+ settings.attribute :amendments_visibility, type: :string, default: "all"
132
149
  end
133
150
 
134
151
  component.register_resource(:dummy_resource) do |resource|
@@ -173,6 +190,7 @@ RSpec.configure do |config|
173
190
  t.references :decidim_component, index: false
174
191
  t.integer :decidim_author_id, index: false
175
192
  t.string :decidim_author_type, index: false
193
+ t.integer :decidim_user_group_id, index: false
176
194
  t.references :decidim_category, index: false
177
195
  t.references :decidim_scope, index: false
178
196
  t.string :reference
@@ -71,6 +71,7 @@ module TranslationHelpers
71
71
  # :with - A String value that will be entered in the form field. (required)
72
72
  def fill_in_editor(locator, params = {})
73
73
  raise ArgumentError if params[:with].blank?
74
+
74
75
  page.execute_script <<-SCRIPT
75
76
  $('##{locator}').siblings('.editor-container').find('.ql-editor')[0].innerHTML = "#{params[:with]}";
76
77
  $('##{locator}').val("#{params[:with]}")
@@ -20,6 +20,13 @@ RSpec.configure do |config|
20
20
  config.include Decidim::WardenTestHelpers, type: :system
21
21
  config.include Devise::Test::ControllerHelpers, type: :controller
22
22
 
23
+ config.before :each, type: :cell do
24
+ if controller
25
+ allow(controller).to receive(:current_organization).and_return(try(:organization) || try(:current_organization) || nil)
26
+ allow(controller).to receive(:current_user).and_return(try(:user) || try(:current_user) || nil)
27
+ end
28
+ end
29
+
23
30
  config.after :each, type: :system do
24
31
  Warden.test_reset!
25
32
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-dev version.
5
5
  module Dev
6
6
  def self.version
7
- "0.18.1"
7
+ "0.19.0"
8
8
  end
9
9
  end
10
10
  end
@@ -10,7 +10,10 @@ namespace :decidim do
10
10
  return unless status
11
11
 
12
12
  Dir.chdir("tmp/decidim_repo") do
13
- env = { "ENFORCED_LOCALES" => Decidim.available_locales.join(",") }
13
+ env = {
14
+ "ENFORCED_LOCALES" => I18n.available_locales.join(","),
15
+ "SKIP_NORMALIZATION" => "true"
16
+ }
14
17
 
15
18
  Bundler.with_original_env do
16
19
  system(env, "bundle install")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '3.0'
21
+ version: '3.24'
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: '3.0'
28
+ version: '3.24'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.18.1
35
+ version: 0.19.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.18.1
42
+ version: 0.19.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: factory_bot_rails
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '10.0'
63
+ version: '11.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: '10.0'
70
+ version: '11.0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: db-query-matchers
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: 0.0.22
91
+ version: 0.0.28
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.0.22
98
+ version: 0.0.28
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: i18n-tasks
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -116,48 +116,42 @@ dependencies:
116
116
  requirements:
117
117
  - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: 0.4.0
119
+ version: 0.5.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.4.0
126
+ version: 0.5.0
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: nokogiri
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - "~>"
132
- - !ruby/object:Gem::Version
133
- version: '1.8'
134
131
  - - ">="
135
132
  - !ruby/object:Gem::Version
136
- version: 1.8.2
133
+ version: 1.10.4
137
134
  type: :runtime
138
135
  prerelease: false
139
136
  version_requirements: !ruby/object:Gem::Requirement
140
137
  requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: '1.8'
144
138
  - - ">="
145
139
  - !ruby/object:Gem::Version
146
- version: 1.8.2
140
+ version: 1.10.4
147
141
  - !ruby/object:Gem::Dependency
148
142
  name: puma
149
143
  requirement: !ruby/object:Gem::Requirement
150
144
  requirements:
151
145
  - - "~>"
152
146
  - !ruby/object:Gem::Version
153
- version: '3.11'
147
+ version: '3.12'
154
148
  type: :runtime
155
149
  prerelease: false
156
150
  version_requirements: !ruby/object:Gem::Requirement
157
151
  requirements:
158
152
  - - "~>"
159
153
  - !ruby/object:Gem::Version
160
- version: '3.11'
154
+ version: '3.12'
161
155
  - !ruby/object:Gem::Dependency
162
156
  name: rails-controller-testing
163
157
  requirement: !ruby/object:Gem::Requirement
@@ -234,14 +228,28 @@ dependencies:
234
228
  requirements:
235
229
  - - "~>"
236
230
  - !ruby/object:Gem::Version
237
- version: 0.58.0
231
+ version: 0.71.0
238
232
  type: :runtime
239
233
  prerelease: false
240
234
  version_requirements: !ruby/object:Gem::Requirement
241
235
  requirements:
242
236
  - - "~>"
243
237
  - !ruby/object:Gem::Version
244
- version: 0.58.0
238
+ version: 0.71.0
239
+ - !ruby/object:Gem::Dependency
240
+ name: rubocop-rails
241
+ requirement: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - "~>"
244
+ - !ruby/object:Gem::Version
245
+ version: '2.0'
246
+ type: :runtime
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ requirements:
250
+ - - "~>"
251
+ - !ruby/object:Gem::Version
252
+ version: '2.0'
245
253
  - !ruby/object:Gem::Dependency
246
254
  name: rubocop-rspec
247
255
  requirement: !ruby/object:Gem::Requirement
@@ -262,28 +270,28 @@ dependencies:
262
270
  requirements:
263
271
  - - "~>"
264
272
  - !ruby/object:Gem::Version
265
- version: '3.7'
273
+ version: '3.142'
266
274
  type: :runtime
267
275
  prerelease: false
268
276
  version_requirements: !ruby/object:Gem::Requirement
269
277
  requirements:
270
278
  - - "~>"
271
279
  - !ruby/object:Gem::Version
272
- version: '3.7'
280
+ version: '3.142'
273
281
  - !ruby/object:Gem::Dependency
274
282
  name: simplecov
275
283
  requirement: !ruby/object:Gem::Requirement
276
284
  requirements:
277
285
  - - "~>"
278
286
  - !ruby/object:Gem::Version
279
- version: '0.13'
287
+ version: '0.16'
280
288
  type: :runtime
281
289
  prerelease: false
282
290
  version_requirements: !ruby/object:Gem::Requirement
283
291
  requirements:
284
292
  - - "~>"
285
293
  - !ruby/object:Gem::Version
286
- version: '0.13'
294
+ version: '0.16'
287
295
  - !ruby/object:Gem::Dependency
288
296
  name: system_test_html_screenshots
289
297
  requirement: !ruby/object:Gem::Requirement
@@ -304,14 +312,14 @@ dependencies:
304
312
  requirements:
305
313
  - - "~>"
306
314
  - !ruby/object:Gem::Version
307
- version: '3.0'
315
+ version: '3.6'
308
316
  type: :runtime
309
317
  prerelease: false
310
318
  version_requirements: !ruby/object:Gem::Requirement
311
319
  requirements:
312
320
  - - "~>"
313
321
  - !ruby/object:Gem::Version
314
- version: '3.0'
322
+ version: '3.6'
315
323
  - !ruby/object:Gem::Dependency
316
324
  name: wisper-rspec
317
325
  requirement: !ruby/object:Gem::Requirement
@@ -382,10 +390,12 @@ files:
382
390
  - lib/decidim/dev/assets/dni.jpg
383
391
  - lib/decidim/dev/assets/icon.png
384
392
  - lib/decidim/dev/assets/id.jpg
393
+ - lib/decidim/dev/assets/import_participatory_space_private_users.csv
385
394
  - lib/decidim/dev/assets/iso-8859-15.md
386
395
  - lib/decidim/dev/assets/malicious.jpg
387
396
  - lib/decidim/dev/assets/participatory_text.md
388
397
  - lib/decidim/dev/assets/participatory_text.odt
398
+ - lib/decidim/dev/assets/participatory_text_wrong.odt
389
399
  - lib/decidim/dev/assets/verify_user_groups.csv
390
400
  - lib/decidim/dev/common_rake.rb
391
401
  - lib/decidim/dev/railtie.rb