decidim-dev 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/forms/decidim/dummy_resources/dummy_resource_form.rb +13 -0
- data/lib/decidim/dev/assets/participatory_text.md +7 -0
- data/lib/decidim/dev/assets/participatory_text.odt +0 -0
- data/lib/decidim/dev/assets/verify_user_groups.csv +22 -0
- data/lib/decidim/dev/test/rspec_support/component.rb +13 -0
- data/lib/decidim/dev/test/rspec_support/download_helper.rb +49 -0
- data/lib/decidim/dev/version.rb +1 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bf4519d008bf2381733bbf4ff346e6038ecc0a9dbde91040ac284deb72ca4a1
|
4
|
+
data.tar.gz: c950d0c596cfaa47623fa9003a786a8e12e50984600264bc3dea5c89f3f88e83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6294efd4bdd95cf21af45586e0ffb77ba46aada64c90b2e7b1914ad86b15c3fc80411c265a9569fba232a8bbb82886cb9e312197126ae6129ae01c4e4a9c9e51
|
7
|
+
data.tar.gz: f760717a1a7cbc458c134e2880abaf9f594681a7d1136dabdcfbf391b3aee5a4ac35e08ddae41758823733aac94907323041e14c4e9a73cec74174558438bdac
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# The great title for a new law
|
2
|
+
|
2
3
|
## A co-creation process to create creative creations
|
4
|
+
|
3
5
|
When public administrations will need to create or implement things, open and co-creative processes with the participation of any public or private person or institution will be required.
|
4
6
|
|
5
7
|
The following co-creation process will be followed: We all will think think think and create and meditate and think and obtain creations at the end, blah, blah..
|
6
8
|
|
7
9
|
## Creative consensus for the Creation
|
10
|
+
|
8
11
|
Creations will require a consensus from all the participants. Depending on the Creation to be created the following consensus systems will be used:
|
9
12
|
- consensus by simple majority: when a, b, and c appear in the creation.
|
10
13
|
- consensus by enhanced majority: when a, b, c and also d appear in the creation.
|
@@ -15,15 +18,18 @@ Creations will require a consensus from all the participants. Depending on the C
|
|
15
18
|
It must be taken into account that using "consensus by ignoring whatever resulted from the previous consensus" will grant participants the right to produce a revolution and annihilate the organization.
|
16
19
|
|
17
20
|
## Creation accountability
|
21
|
+
|
18
22
|
When an organization finishes a co-creation process, the accountability process starts.
|
19
23
|
|
20
24
|
### What should be accounted
|
25
|
+
|
21
26
|
blah, blah, blah...
|
22
27
|
1. one
|
23
28
|
2. two
|
24
29
|
3. three
|
25
30
|
|
26
31
|
### Following up accounted results
|
32
|
+
|
27
33
|
This article will require three paragraphs. This will be the first one.
|
28
34
|
|
29
35
|
This article will require three paragraphs. This will be the second one.
|
@@ -35,4 +41,5 @@ This article will require three paragraphs. This will be the third one.
|
|
35
41
|
Well, at the end we required one more paragraph and embedded an image, let's see what happens with this...
|
36
42
|
|
37
43
|
# Summary
|
44
|
+
|
38
45
|
We use here a main title again for the summary because we don't know what will happen when having many main titles in one document.
|
Binary file
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Email,,,,,,
|
2
|
+
my_usergroup@example.org,,,,,,
|
3
|
+
,,,,,,
|
4
|
+
,,,,,,
|
5
|
+
,,,,,,
|
6
|
+
,,,,,,
|
7
|
+
,,,,,,
|
8
|
+
,,,,,,
|
9
|
+
,,,,,,
|
10
|
+
,,,,,,
|
11
|
+
,,,,,,
|
12
|
+
,,,,,,
|
13
|
+
,,,,,,
|
14
|
+
,,,,,,
|
15
|
+
,,,,,,
|
16
|
+
,,,,,,
|
17
|
+
,,,,,,
|
18
|
+
,,,,,,
|
19
|
+
,,,,,,
|
20
|
+
,,,,,,
|
21
|
+
,,,,,,
|
22
|
+
,,,,,,
|
@@ -38,6 +38,7 @@ module Decidim
|
|
38
38
|
|
39
39
|
class DummyResource < ApplicationRecord
|
40
40
|
include HasComponent
|
41
|
+
include HasReference
|
41
42
|
include Resourceable
|
42
43
|
include Reportable
|
43
44
|
include Authorable
|
@@ -49,6 +50,8 @@ module Decidim
|
|
49
50
|
include Publicable
|
50
51
|
include Decidim::DataPortability
|
51
52
|
include Searchable
|
53
|
+
include Paddable
|
54
|
+
include Amendable
|
52
55
|
|
53
56
|
searchable_fields(
|
54
57
|
scope_id: { scope: :id },
|
@@ -58,6 +61,11 @@ module Decidim
|
|
58
61
|
datetime: :published_at
|
59
62
|
)
|
60
63
|
|
64
|
+
amendable(
|
65
|
+
fields: [:title],
|
66
|
+
form: "Decidim::DummyResources::DummyResourceForm"
|
67
|
+
)
|
68
|
+
|
61
69
|
component_manifest_name "dummy"
|
62
70
|
|
63
71
|
def reported_content_url
|
@@ -103,6 +111,8 @@ Decidim.register_component(:dummy) do |component|
|
|
103
111
|
settings.attribute :resources_permissions_enabled, type: :boolean, default: true
|
104
112
|
settings.attribute :dummy_global_attribute_1, type: :boolean
|
105
113
|
settings.attribute :dummy_global_attribute_2, type: :boolean
|
114
|
+
settings.attribute :enable_pads_creation, type: :boolean, default: false
|
115
|
+
settings.attribute :amendments_enabled, type: :boolean, default: false
|
106
116
|
end
|
107
117
|
|
108
118
|
component.settings(:step) do |settings|
|
@@ -116,6 +126,7 @@ Decidim.register_component(:dummy) do |component|
|
|
116
126
|
resource.model_class_name = "Decidim::DummyResources::DummyResource"
|
117
127
|
resource.template = "decidim/dummy_resource/linked_dummys"
|
118
128
|
resource.actions = %w(foo)
|
129
|
+
resource.searchable = true
|
119
130
|
end
|
120
131
|
|
121
132
|
component.register_stat :dummies_count_high, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |components, _start_at, _end_at|
|
@@ -141,6 +152,7 @@ RSpec.configure do |config|
|
|
141
152
|
unless ActiveRecord::Base.connection.data_source_exists?("decidim_dummy_resources_dummy_resources")
|
142
153
|
ActiveRecord::Migration.create_table :decidim_dummy_resources_dummy_resources do |t|
|
143
154
|
t.string :title
|
155
|
+
t.string :body
|
144
156
|
t.text :address
|
145
157
|
t.float :latitude
|
146
158
|
t.float :longitude
|
@@ -152,6 +164,7 @@ RSpec.configure do |config|
|
|
152
164
|
t.string :decidim_author_type, index: false
|
153
165
|
t.references :decidim_category, index: false
|
154
166
|
t.references :decidim_scope, index: false
|
167
|
+
t.string :reference
|
155
168
|
|
156
169
|
t.timestamps
|
157
170
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DownloadHelper
|
4
|
+
TIMEOUT = 10
|
5
|
+
PATH = Rails.root.join("tmp", "downloads").freeze
|
6
|
+
|
7
|
+
def downloads
|
8
|
+
Dir[PATH.join("*")]
|
9
|
+
end
|
10
|
+
|
11
|
+
def download_path
|
12
|
+
wait_for_download
|
13
|
+
downloads.first
|
14
|
+
end
|
15
|
+
|
16
|
+
def download_content
|
17
|
+
wait_for_download
|
18
|
+
File.read(download_path)
|
19
|
+
end
|
20
|
+
|
21
|
+
def wait_for_download
|
22
|
+
Timeout.timeout(TIMEOUT) do
|
23
|
+
sleep 0.1 until downloaded?
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def downloaded?
|
28
|
+
downloads.any? && !downloading?
|
29
|
+
end
|
30
|
+
|
31
|
+
def downloading?
|
32
|
+
downloads.grep(/\.crdownload$/).any?
|
33
|
+
end
|
34
|
+
|
35
|
+
def clear_downloads
|
36
|
+
FileUtils.rm_f(downloads)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
RSpec.configure do |config|
|
41
|
+
config.include DownloadHelper, download: true
|
42
|
+
config.before :each, download: true do
|
43
|
+
driven_by(:headless_chrome)
|
44
|
+
switch_to_default_host
|
45
|
+
FileUtils.mkdir_p DownloadHelper::PATH.to_s
|
46
|
+
page.driver.browser.download_path = DownloadHelper::PATH.to_s
|
47
|
+
clear_downloads
|
48
|
+
end
|
49
|
+
end
|
data/lib/decidim/dev/version.rb
CHANGED
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.
|
4
|
+
version: 0.16.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: 2019-01-
|
13
|
+
date: 2019-01-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capybara
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.16.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.16.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: factory_bot_rails
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -340,6 +340,7 @@ files:
|
|
340
340
|
- app/assets/images/decidim/dummy.svg
|
341
341
|
- app/assets/images/decidim/gamification/badges/test.svg
|
342
342
|
- app/controllers/decidim/dummy_resources/dummy_resources_controller.rb
|
343
|
+
- app/forms/decidim/dummy_resources/dummy_resource_form.rb
|
343
344
|
- app/views/decidim/dummy_resource/_linked_dummys.html.erb
|
344
345
|
- app/views/decidim/dummy_resources/dummy_resources/foo.html.erb
|
345
346
|
- app/views/decidim/dummy_resources/dummy_resources/show.html.erb
|
@@ -375,6 +376,8 @@ files:
|
|
375
376
|
- lib/decidim/dev/assets/id.jpg
|
376
377
|
- lib/decidim/dev/assets/malicious.jpg
|
377
378
|
- lib/decidim/dev/assets/participatory_text.md
|
379
|
+
- lib/decidim/dev/assets/participatory_text.odt
|
380
|
+
- lib/decidim/dev/assets/verify_user_groups.csv
|
378
381
|
- lib/decidim/dev/common_rake.rb
|
379
382
|
- lib/decidim/dev/railtie.rb
|
380
383
|
- lib/decidim/dev/test/authorization_shared_examples.rb
|
@@ -394,6 +397,7 @@ files:
|
|
394
397
|
- lib/decidim/dev/test/rspec_support/component.rb
|
395
398
|
- lib/decidim/dev/test/rspec_support/component_context.rb
|
396
399
|
- lib/decidim/dev/test/rspec_support/content_processing.rb
|
400
|
+
- lib/decidim/dev/test/rspec_support/download_helper.rb
|
397
401
|
- lib/decidim/dev/test/rspec_support/factory_bot.rb
|
398
402
|
- lib/decidim/dev/test/rspec_support/gamification.rb
|
399
403
|
- lib/decidim/dev/test/rspec_support/geocoder.rb
|
@@ -431,7 +435,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
431
435
|
version: '0'
|
432
436
|
requirements: []
|
433
437
|
rubyforge_project:
|
434
|
-
rubygems_version: 2.7.
|
438
|
+
rubygems_version: 2.7.6
|
435
439
|
signing_key:
|
436
440
|
specification_version: 4
|
437
441
|
summary: Decidim dev tools
|