decidim 0.4.3 → 0.4.4

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 (156) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +11 -0
  3. data/CHANGELOG.md +16 -2
  4. data/Gemfile.lock +41 -42
  5. data/README.md +1 -1
  6. data/Rakefile +1 -1
  7. data/decidim-admin/app/commands/decidim/admin/publish_participatory_process.rb +1 -5
  8. data/decidim-admin/app/commands/decidim/admin/unpublish_participatory_process.rb +1 -5
  9. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +1 -1
  10. data/decidim-admin/app/controllers/decidim/admin/exports_controller.rb +2 -9
  11. data/decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb +1 -1
  12. data/decidim-admin/app/controllers/decidim/admin/features/base_controller.rb +3 -2
  13. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +2 -2
  14. data/decidim-admin/app/controllers/decidim/admin/participatory_process_groups_controller.rb +2 -1
  15. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +6 -2
  16. data/decidim-admin/app/forms/decidim/admin/participatory_process_copy_form.rb +1 -1
  17. data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +1 -1
  18. data/decidim-admin/app/helpers/decidim/admin/process_groups_for_select_helper.rb +1 -1
  19. data/decidim-admin/app/helpers/decidim/admin/processes_for_select_helper.rb +1 -1
  20. data/decidim-admin/app/helpers/decidim/admin/{feature_settings_helper.rb → settings_helper.rb} +2 -2
  21. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin_ability.rb +2 -2
  22. data/decidim-admin/app/views/decidim/admin/attachments/index.html.erb +1 -1
  23. data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +1 -1
  24. data/decidim-admin/app/views/decidim/admin/exports/_dropdown.html.erb +1 -1
  25. data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +2 -2
  26. data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +1 -1
  27. data/decidim-admin/app/views/decidim/admin/features/index.html.erb +1 -1
  28. data/decidim-admin/app/views/decidim/admin/features/new.html.erb +1 -1
  29. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/show.html.erb +1 -1
  30. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/index.html.erb +2 -2
  31. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +0 -1
  32. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +1 -1
  33. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +6 -6
  34. data/decidim-admin/app/views/decidim/admin/participatory_processes/new.html.erb +0 -1
  35. data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +2 -2
  36. data/decidim-admin/config/locales/ca.yml +7 -14
  37. data/decidim-admin/config/locales/en.yml +7 -14
  38. data/decidim-admin/config/locales/es.yml +7 -14
  39. data/decidim-admin/config/locales/eu.yml +9 -15
  40. data/decidim-admin/config/locales/fi.yml +7 -12
  41. data/decidim-admin/config/locales/fr.yml +9 -15
  42. data/decidim-admin/config/locales/it.yml +9 -15
  43. data/decidim-admin/config/routes.rb +9 -7
  44. data/decidim-admin/spec/commands/copy_participatory_process_spec.rb +4 -4
  45. data/decidim-admin/spec/controllers/exports_controller_spec.rb +2 -0
  46. data/decidim-admin/spec/controllers/participatory_processes_controller_spec.rb +2 -0
  47. data/decidim-admin/spec/controllers/static_pages_controller_spec.rb +2 -0
  48. data/decidim-admin/spec/features/admin_copy_participatory_process_spec.rb +3 -2
  49. data/decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb +1 -1
  50. data/decidim-admin/spec/features/admin_manages_features_spec.rb +4 -4
  51. data/decidim-admin/spec/features/admin_manages_participatory_process_admins_spec.rb +2 -1
  52. data/decidim-admin/spec/features/admin_manages_participatory_process_attachments_spec.rb +2 -1
  53. data/decidim-admin/spec/features/admin_manages_participatory_process_categories_spec.rb +1 -1
  54. data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +2 -2
  55. data/decidim-admin/spec/features/admin_manages_participatory_process_steps_spec.rb +2 -1
  56. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +3 -3
  57. data/decidim-admin/spec/features/admin_manages_user_groups_spec.rb +3 -2
  58. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +1 -2
  59. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_attachments_spec.rb +1 -3
  60. data/decidim-admin/spec/features/{process_admin_manages_participatory_process_categories_spec.rb → participatory_process_admin_manages_participatory_process_categories_spec.rb} +2 -4
  61. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_steps_spec.rb +1 -2
  62. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_processes_spec.rb +2 -2
  63. data/decidim-admin/spec/helpers/{feature_settings_helper_spec.rb → settings_helper_spec.rb} +1 -1
  64. data/decidim-admin/spec/shared/manage_process_admins_examples.rb +9 -1
  65. data/decidim-admin/spec/shared/participatory_process_administration_by_admin_shared_context.rb +9 -0
  66. data/decidim-admin/spec/shared/participatory_process_administration_by_process_admin_shared_context.rb +13 -0
  67. data/decidim-admin/spec/shared/{participatory_admin_shared_context.rb → participatory_process_administration_shared_context.rb} +2 -4
  68. data/decidim-api/decidim-api.gemspec +2 -0
  69. data/decidim-api/lib/decidim/api/schema.rb +1 -1
  70. data/decidim-api/lib/decidim/api/test/type_context.rb +1 -1
  71. data/decidim-api/spec/controllers/queries_controller_spec.rb +2 -0
  72. data/decidim-budgets/app/forms/decidim/budgets/admin/project_form.rb +4 -0
  73. data/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +1 -1
  74. data/decidim-budgets/app/views/decidim/budgets/projects/_tags.html.erb +2 -2
  75. data/decidim-budgets/decidim-budgets.gemspec +1 -1
  76. data/decidim-budgets/lib/decidim/budgets/feature.rb +30 -34
  77. data/decidim-budgets/spec/commands/remove_line_item_spec.rb +2 -0
  78. data/decidim-budgets/spec/features/comments_spec.rb +1 -1
  79. data/decidim-budgets/spec/features/orders_spec.rb +1 -5
  80. data/decidim-budgets/spec/forms/project_form_spec.rb +6 -0
  81. data/decidim-budgets/spec/shared/manage_projects_examples.rb +1 -1
  82. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  83. data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +3 -3
  84. data/decidim-comments/app/frontend/support/schema.ts +1379 -94
  85. data/decidim-comments/app/types/decidim/comments/commentable_interface.rb +1 -1
  86. data/decidim-comments/decidim-comments.gemspec +1 -0
  87. data/decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb +2 -2
  88. data/decidim-comments/spec/features/comments_spec.rb +1 -1
  89. data/decidim-comments/spec/features/notifications_spec.rb +1 -1
  90. data/decidim-comments/spec/features/report_comment_spec.rb +1 -1
  91. data/decidim-comments/spec/models/comment_spec.rb +1 -1
  92. data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +2 -1
  93. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature_context.rb +1 -3
  94. data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +0 -7
  95. data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/promise.js +2 -2
  96. data/decidim-dev/lib/decidim/dev/test/rspec_support/route_helpers.rb +6 -0
  97. data/decidim-dev/lib/generators/decidim/dummy_generator.rb +0 -2
  98. data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_form.rb +6 -0
  99. data/decidim-meetings/app/helpers/decidim/meetings/meetings_helper.rb +2 -1
  100. data/decidim-meetings/app/services/decidim/meetings/meeting_search.rb +2 -2
  101. data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +2 -2
  102. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +1 -1
  103. data/decidim-meetings/app/views/decidim/meetings/meetings/_tags.html.erb +2 -2
  104. data/decidim-meetings/decidim-meetings.gemspec +1 -1
  105. data/decidim-meetings/lib/decidim/meetings/feature.rb +35 -39
  106. data/decidim-meetings/spec/features/explore_meetings_spec.rb +1 -1
  107. data/decidim-meetings/spec/forms/meeting_form_spec.rb +6 -0
  108. data/decidim-meetings/spec/shared/manage_meetings_examples.rb +1 -1
  109. data/decidim-pages/lib/decidim/pages/feature.rb +14 -18
  110. data/decidim-pages/spec/features/comments_spec.rb +1 -1
  111. data/decidim-proposals/app/forms/decidim/proposals/admin/proposal_form.rb +6 -0
  112. data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +6 -0
  113. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +9 -1
  114. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +1 -1
  115. data/decidim-proposals/app/views/decidim/proposals/proposals/_tags.html.erb +2 -2
  116. data/decidim-proposals/decidim-proposals.gemspec +1 -0
  117. data/decidim-proposals/lib/decidim/proposals/feature.rb +59 -65
  118. data/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb +1 -15
  119. data/decidim-proposals/spec/controllers/decidim/admin/proposal_answers_controller_spec.rb +2 -4
  120. data/decidim-proposals/spec/controllers/decidim/proposal_votes_controller_spec.rb +2 -4
  121. data/decidim-proposals/spec/controllers/decidim/proposals_controller_spec.rb +2 -4
  122. data/decidim-proposals/spec/features/comments_spec.rb +1 -1
  123. data/decidim-proposals/spec/features/report_proposal_spec.rb +1 -1
  124. data/decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb +18 -0
  125. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +1 -1
  126. data/decidim-proposals/spec/shared/proposal_form_examples.rb +6 -0
  127. data/decidim-results/app/controllers/decidim/results/result_widgets_controller.rb +0 -2
  128. data/decidim-results/app/forms/decidim/results/admin/result_form.rb +4 -0
  129. data/decidim-results/app/views/decidim/results/admin/results/index.html.erb +1 -1
  130. data/decidim-results/app/views/decidim/results/results/_tags.html.erb +2 -2
  131. data/decidim-results/decidim-results.gemspec +2 -1
  132. data/decidim-results/lib/decidim/results/feature.rb +18 -22
  133. data/decidim-results/spec/controllers/results_controller_spec.rb +2 -0
  134. data/decidim-results/spec/features/comments_spec.rb +1 -1
  135. data/decidim-results/spec/features/explore_results_spec.rb +1 -1
  136. data/decidim-results/spec/forms/result_form_spec.rb +6 -0
  137. data/decidim-results/spec/shared/manage_results_examples.rb +1 -1
  138. data/decidim-surveys/decidim-surveys.gemspec +1 -0
  139. data/decidim-surveys/lib/decidim/surveys/feature.rb +23 -27
  140. data/decidim-system/db/seeds.rb +1 -2
  141. data/decidim-system/spec/commands/decidim/system/create_default_pages_spec.rb +1 -1
  142. data/docs/features_and_components.md +6 -6
  143. data/docs/getting_started.md +1 -1
  144. data/docs/how_to_create_a_plugin.md +2 -2
  145. data/docs/social_providers.md +2 -2
  146. data/lib/generators/decidim/app_generator.rb +0 -6
  147. data/lib/generators/decidim/docker_generator.rb +1 -1
  148. data/lib/generators/decidim/install_generator.rb +5 -5
  149. data/lib/generators/decidim/templates/README.md.erb +1 -1
  150. data/lib/generators/decidim/templates/database.yml.erb +1 -1
  151. data/lib/generators/decidim/templates/initializer.rb +4 -1
  152. data/package-lock.json +46 -134
  153. data/package.json +9 -9
  154. metadata +31 -30
  155. data/decidim-dev/lib/decidim/dev/test/rspec_support/engine_routes.rb +0 -35
  156. data/decidim-dev/lib/generators/decidim/templates/decidim_dev.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4967577009dee595cd0f4e2b433af4dfc09ac61
4
- data.tar.gz: 952054cd021780bbe7c36af4a6e9a082f7513414
3
+ metadata.gz: 46a9ccf5bb2360e2fec0849dcee0ba4c1b6ff33e
4
+ data.tar.gz: 10b930adcc15d110a86e959a813e0a85f078e23f
5
5
  SHA512:
6
- metadata.gz: 20de3c5a3f538c661d40b14dc79efbba4ee8d3829b2f21c70c4a8078c5f881fc418b1c7d2fb772901976b2e4c577636435e7bdb7650b09fd3f30078fd82c15b3
7
- data.tar.gz: 5f549fe406ca1b9ef7d7ddec5784af29edc25b9e2b89f9587b1552b8fe6370f25d87e5b769460a00dcd5886dfd2053667b98220d6794c41eee11ac4e9e2360d9
6
+ metadata.gz: 6e0676d63092ce94e3154f96114defbf474c15873007d4ecab4bf501adb1ee22ff1d3e14bb71662edad65b5de8fcc1767630c64be0e41e2a5d9eca99b1f976ec
7
+ data.tar.gz: 072ee4afc3fc22b7f73c2edf3cb292d4daf47ef201d82a4cfcbe990c9d0e35b72d2a0e056a042a76f7322e0e1dd7840381f05b3d7245ae1be0bee6b4eed0c2d9
data/.codeclimate.yml CHANGED
@@ -29,6 +29,17 @@ engines:
29
29
  enabled: false
30
30
  fixme:
31
31
  enabled: true
32
+ exclude_paths:
33
+ - decidim-comments/app/assets/javascripts/decidim/comments/bundle.js.map
34
+ grep:
35
+ enabled: true
36
+ config:
37
+ patterns:
38
+ no-trailing-whitespace:
39
+ pattern: \s*$
40
+ annotation: "Don't leave trailing whitespace"
41
+ severity: minor
42
+ categories: Style
32
43
  rubocop:
33
44
  enabled: true
34
45
  channel: rubocop-0-48
data/CHANGELOG.md CHANGED
@@ -1,7 +1,21 @@
1
1
  # Change Log
2
2
 
3
3
  ## [Unreleased](https://github.com/decidim/decidim/tree/HEAD)
4
- [Full Changelog](https://github.com/decidim/decidim/compare/v0.4.3...HEAD)
4
+ [Full Changelog](https://github.com/decidim/decidim/compare/v0.4.4...HEAD)
5
+
6
+ ## [v0.4.4](https://github.com/decidim/decidim/tree/v0.4.4) (2017-08-02)
7
+ [Full Changelog](https://github.com/decidim/decidim/compare/v0.4.3...v0.4.4)
8
+
9
+ **Fixed**
10
+
11
+ - **decidim-budgets**: Fixed bug where current projects's category wouldn't appear in form. [\#1667](https://github.com/decidim/decidim/pull/1667).
12
+ - **decidim-core**: Fixed crash when running migrations & seeding DB in the same ruby process. [\#1649](https://github.com/decidim/decidim/pull/1649).
13
+ - **decidim-core**: Fixed bug when blank values were used in a `datetime` field. [\#1661](https://github.com/decidim/decidim/pull/1661)
14
+ - **decidim-core**: Fixed preview permissions for unpublished features. [\#1670](https://github.com/decidim/decidim/pull/1670).
15
+ - **decidim-meetings**: Fixed bug where current meeting's category wouldn't appear in form. [\#1667](https://github.com/decidim/decidim/pull/1667).
16
+ - **decidim-proposals**: Fixed bug where current proposal's category wouldn't appear in form. [\#1667](https://github.com/decidim/decidim/pull/1667).
17
+ - **decidim-proposals**: Fixed error when official proposals where commented and could not be notified. [\#1663](https://github.com/decidim/decidim/pull/1663).
18
+ - **decidim-results**: Fixed bug where current result's category wouldn't appear in form. [\#1667](https://github.com/decidim/decidim/pull/1667).
5
19
 
6
20
  ## [v0.4.3](https://github.com/decidim/decidim/tree/v0.4.3) (2017-07-25)
7
21
  [Full Changelog](https://github.com/decidim/decidim/compare/v0.4.2...v0.4.3)
@@ -61,7 +75,7 @@
61
75
 
62
76
  - Sharing Link Option [\#1589](https://github.com/decidim/decidim/issues/1589)
63
77
  - Frontend url from backend [\#1587](https://github.com/decidim/decidim/issues/1587)
64
- - Impossible to used rake db:seed [\#1586](https://github.com/decidim/decidim/issues/1586)
78
+ - Impossible to use rake db:seed [\#1586](https://github.com/decidim/decidim/issues/1586)
65
79
  - Limit max characters allowed in meeting cards view [\#1578](https://github.com/decidim/decidim/issues/1578)
66
80
  - Proposals Answers not working [\#1576](https://github.com/decidim/decidim/issues/1576)
67
81
  - Invitation link isn't being regenerated while re-inviting admins [\#1573](https://github.com/decidim/decidim/issues/1573)
data/Gemfile.lock CHANGED
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decidim (0.4.3)
5
- decidim-admin (= 0.4.3)
6
- decidim-api (= 0.4.3)
7
- decidim-budgets (= 0.4.3)
8
- decidim-comments (= 0.4.3)
9
- decidim-core (= 0.4.3)
10
- decidim-meetings (= 0.4.3)
11
- decidim-pages (= 0.4.3)
12
- decidim-proposals (= 0.4.3)
13
- decidim-results (= 0.4.3)
14
- decidim-surveys (= 0.4.3)
15
- decidim-system (= 0.4.3)
16
- decidim-admin (0.4.3)
4
+ decidim (0.4.4)
5
+ decidim-admin (= 0.4.4)
6
+ decidim-api (= 0.4.4)
7
+ decidim-budgets (= 0.4.4)
8
+ decidim-comments (= 0.4.4)
9
+ decidim-core (= 0.4.4)
10
+ decidim-meetings (= 0.4.4)
11
+ decidim-pages (= 0.4.4)
12
+ decidim-proposals (= 0.4.4)
13
+ decidim-results (= 0.4.4)
14
+ decidim-surveys (= 0.4.4)
15
+ decidim-system (= 0.4.4)
16
+ decidim-admin (0.4.4)
17
17
  active_link_to (~> 1.0.0)
18
- decidim-core (= 0.4.3)
18
+ decidim-core (= 0.4.4)
19
19
  devise (~> 4.2)
20
20
  devise-i18n (~> 1.1.0)
21
21
  devise_invitable (~> 1.7.0)
@@ -24,29 +24,29 @@ PATH
24
24
  rails (~> 5.1.1)
25
25
  rectify (~> 0.9.1)
26
26
  sassc-rails (~> 1.3.0)
27
- decidim-api (0.4.3)
27
+ decidim-api (0.4.4)
28
28
  graphiql-rails (~> 1.4.2)
29
29
  graphql (~> 1.6.0)
30
30
  rack-cors (~> 0.4.0)
31
31
  rails (~> 5.1.1)
32
32
  sprockets-es6 (~> 0.9.2)
33
- decidim-budgets (0.4.3)
34
- decidim-comments (= 0.4.3)
35
- decidim-core (= 0.4.3)
33
+ decidim-budgets (0.4.4)
34
+ decidim-comments (= 0.4.4)
35
+ decidim-core (= 0.4.4)
36
36
  kaminari (~> 1.0.1)
37
37
  rectify (~> 0.9.1)
38
38
  searchlight (~> 4.1.0)
39
- decidim-comments (0.4.3)
40
- decidim-core (= 0.4.3)
39
+ decidim-comments (0.4.4)
40
+ decidim-core (= 0.4.4)
41
41
  jquery-rails (~> 4.0)
42
42
  rails (~> 5.1.1)
43
- decidim-core (0.4.3)
43
+ decidim-core (0.4.4)
44
44
  active_link_to (~> 1.0.4)
45
45
  autoprefixer-rails (~> 7.1.1)
46
46
  cancancan (~> 2.0.0)
47
47
  carrierwave (~> 1.1.0)
48
48
  date_validator (~> 0.9.0)
49
- decidim-api (= 0.4.3)
49
+ decidim-api (= 0.4.4)
50
50
  devise (~> 4.3)
51
51
  devise-i18n (~> 1.1.0)
52
52
  file_validators (~> 2.1.0)
@@ -69,41 +69,40 @@ PATH
69
69
  rectify (~> 0.9.1)
70
70
  redis (~> 3.3.3)
71
71
  rubyzip (= 1.2.1)
72
- sass (= 3.4.24)
73
72
  sassc-rails (~> 1.3.0)
74
73
  sprockets-es6 (~> 0.9.2)
75
74
  truncato (~> 0.7.9)
76
75
  wisper (~> 2.0.0)
77
- decidim-meetings (0.4.3)
76
+ decidim-meetings (0.4.4)
78
77
  date_validator (~> 0.9)
79
- decidim-core (= 0.4.3)
78
+ decidim-core (= 0.4.4)
80
79
  httparty (~> 0.15.0)
81
80
  jquery-tmpl-rails (~> 1.1.0)
82
81
  kaminari (~> 1.0.1)
83
82
  rectify (~> 0.8)
84
83
  searchlight (~> 4.1.0)
85
- decidim-pages (0.4.3)
86
- decidim-comments (= 0.4.3)
87
- decidim-core (= 0.4.3)
84
+ decidim-pages (0.4.4)
85
+ decidim-comments (= 0.4.4)
86
+ decidim-core (= 0.4.4)
88
87
  rectify (~> 0.9.1)
89
- decidim-proposals (0.4.3)
90
- decidim-comments (= 0.4.3)
91
- decidim-core (= 0.4.3)
88
+ decidim-proposals (0.4.4)
89
+ decidim-comments (= 0.4.4)
90
+ decidim-core (= 0.4.4)
92
91
  kaminari (~> 1.0.1)
93
92
  rectify (~> 0.9.1)
94
93
  social-share-button (~> 0.10.0)
95
- decidim-results (0.4.3)
96
- decidim-comments (= 0.4.3)
97
- decidim-core (= 0.4.3)
94
+ decidim-results (0.4.4)
95
+ decidim-comments (= 0.4.4)
96
+ decidim-core (= 0.4.4)
98
97
  kaminari (~> 1.0.1)
99
98
  rectify (~> 0.9.1)
100
99
  searchlight (~> 4.1.0)
101
- decidim-surveys (0.4.3)
102
- decidim-core (= 0.4.3)
100
+ decidim-surveys (0.4.4)
101
+ decidim-core (= 0.4.4)
103
102
  jquery-tmpl-rails (~> 1.1.0)
104
- decidim-system (0.4.3)
103
+ decidim-system (0.4.4)
105
104
  active_link_to (~> 1.0.0)
106
- decidim-core (= 0.4.3)
105
+ decidim-core (= 0.4.4)
107
106
  devise (~> 4.2)
108
107
  devise-i18n (~> 1.1.0)
109
108
  devise_invitable (~> 1.7.1)
@@ -116,14 +115,14 @@ PATH
116
115
  PATH
117
116
  remote: decidim-dev
118
117
  specs:
119
- decidim-dev (0.4.3)
118
+ decidim-dev (0.4.4)
120
119
  byebug
121
120
  capybara (~> 2.14.0)
122
121
  capybara-screenshot (~> 1.0.14)
123
122
  codecov (~> 0.1.9)
124
123
  database_cleaner (~> 1.6.0)
125
124
  db-query-matchers (~> 0.9.0)
126
- decidim (= 0.4.3)
125
+ decidim (= 0.4.4)
127
126
  factory_girl_rails
128
127
  faker (~> 1.7.3)
129
128
  i18n-tasks (= 0.9.15)
@@ -368,7 +367,7 @@ GEM
368
367
  rack (>= 1.6.2, < 3)
369
368
  omniauth-facebook (4.0.0)
370
369
  omniauth-oauth2 (~> 1.2)
371
- omniauth-google-oauth2 (0.5.1)
370
+ omniauth-google-oauth2 (0.5.2)
372
371
  jwt (~> 1.5)
373
372
  multi_json (~> 1.3)
374
373
  omniauth (>= 1.1.1)
@@ -486,7 +485,7 @@ GEM
486
485
  ruby_dep (1.5.0)
487
486
  rubyzip (1.2.1)
488
487
  safe_yaml (1.0.4)
489
- sass (3.4.24)
488
+ sass (3.4.25)
490
489
  sassc (1.11.4)
491
490
  bundler
492
491
  ffi (~> 1.9.6)
data/README.md CHANGED
@@ -140,7 +140,7 @@ If you plan to release your application you'll need to publish it using the same
140
140
 
141
141
  ## Example applications
142
142
 
143
- Since Decidim is a ruby gem, you can check out the [dependent repositories](https://github.com/decidim/decidim/network/dependents?type=application) to see how many applications are on the wild or tests that other developers have made. Here's a partial list with some of the projects that have used Decidim:
143
+ Since Decidim is a ruby gem, you can check out the [dependent repositories](https://github.com/decidim/decidim/network/dependents?type=application) to see how many applications are on the wild or tests that other developers have made. Here's a partial list with some of the projects that have used Decidim:
144
144
 
145
145
  * [Demo](http://staging.decidim.codegram.com)
146
146
  * [Decidim Barcelona](https://decidim.barcelona) - [View code](https://github.com/AjuntamentdeBarcelona/decidim-barcelona)
data/Rakefile CHANGED
@@ -59,7 +59,7 @@ task :development_app do
59
59
  Dir.chdir("#{__dir__}/development_app") do
60
60
  Bundler.with_clean_env do
61
61
  sh "bundle exec spring stop"
62
- sh "bundle exec rake db:seed"
62
+ sh "bundle exec rails db:seed"
63
63
  sh "bundle exec rails generate decidim:demo"
64
64
  end
65
65
  end
@@ -20,17 +20,13 @@ module Decidim
20
20
  def call
21
21
  return broadcast(:invalid) if process.nil? || process.published?
22
22
 
23
- publish_process
23
+ process.publish!
24
24
  broadcast(:ok)
25
25
  end
26
26
 
27
27
  private
28
28
 
29
29
  attr_reader :process
30
-
31
- def publish_process
32
- process.update_attribute(:published_at, Time.current)
33
- end
34
30
  end
35
31
  end
36
32
  end
@@ -20,17 +20,13 @@ module Decidim
20
20
  def call
21
21
  return broadcast(:invalid) if process.nil? || !process.published?
22
22
 
23
- unpublish_process
23
+ process.unpublish!
24
24
  broadcast(:ok)
25
25
  end
26
26
 
27
27
  private
28
28
 
29
29
  attr_reader :process
30
-
31
- def unpublish_process
32
- process.update_attribute(:published_at, nil)
33
- end
34
30
  end
35
31
  end
36
32
  end
@@ -12,7 +12,7 @@ module Decidim
12
12
 
13
13
  helper Decidim::Admin::ApplicationHelper
14
14
  helper Decidim::Admin::AttributesDisplayHelper
15
- helper Decidim::Admin::FeatureSettingsHelper
15
+ helper Decidim::Admin::SettingsHelper
16
16
  helper Decidim::Admin::ProcessGroupsForSelectHelper
17
17
  helper Decidim::Admin::ProcessesForSelectHelper
18
18
  helper Decidim::Admin::IconLinkHelper
@@ -5,6 +5,7 @@ module Decidim
5
5
  # This controller allows admins to manage proposals in a participatory process.
6
6
  class ExportsController < ApplicationController
7
7
  include Concerns::ParticipatoryProcessAdmin
8
+ include Decidim::FeaturePathHelper
8
9
 
9
10
  def create
10
11
  authorize! :manage, feature
@@ -14,19 +15,11 @@ module Decidim
14
15
 
15
16
  flash[:notice] = t("decidim.admin.exports.notice")
16
17
 
17
- redirect_back(fallback_location: fallback_location)
18
+ redirect_back(fallback_location: manage_feature_path(feature))
18
19
  end
19
20
 
20
21
  private
21
22
 
22
- def fallback_location
23
- send(
24
- "decidim_admin_#{feature.manifest.name}_path",
25
- feature_id: feature.id,
26
- participatory_process_id: current_participatory_process.id
27
- )
28
- end
29
-
30
23
  def default_format
31
24
  "json"
32
25
  end
@@ -22,7 +22,7 @@ module Decidim
22
22
  UpdateFeaturePermissions.call(@permissions_form, feature) do
23
23
  on(:ok) do
24
24
  flash[:notice] = t("feature_permissions.update.success", scope: "decidim.admin")
25
- redirect_to participatory_process_features_path(current_participatory_process)
25
+ redirect_to features_path(current_participatory_process)
26
26
  end
27
27
 
28
28
  on(:invalid) do
@@ -8,8 +8,9 @@ module Decidim
8
8
  class BaseController < Admin::ApplicationController
9
9
  skip_authorize_resource
10
10
  include Concerns::ParticipatoryProcessAdmin
11
- include FeatureSettings
11
+ include Settings
12
12
 
13
+ helper Decidim::ResourceHelper
13
14
  helper Decidim::Admin::ExportsHelper
14
15
 
15
16
  helper_method :current_feature,
@@ -30,7 +31,7 @@ module Decidim
30
31
  end
31
32
 
32
33
  def parent_path
33
- decidim_admin.participatory_process_features_path(current_participatory_process)
34
+ decidim_admin.features_path(current_participatory_process)
34
35
  end
35
36
  end
36
37
  end
@@ -91,7 +91,7 @@ module Decidim
91
91
  @feature = query_scope.find(params[:id])
92
92
  authorize! :update, @feature
93
93
 
94
- @feature.update_attribute(:published_at, Time.current)
94
+ @feature.publish!
95
95
 
96
96
  flash[:notice] = I18n.t("features.publish.success", scope: "decidim.admin")
97
97
  redirect_to action: :index
@@ -101,7 +101,7 @@ module Decidim
101
101
  @feature = query_scope.find(params[:id])
102
102
  authorize! :update, @feature
103
103
 
104
- @feature.update_attribute(:published_at, nil)
104
+ @feature.unpublish!
105
105
 
106
106
  flash[:notice] = I18n.t("features.unpublish.success", scope: "decidim.admin")
107
107
  redirect_to action: :index
@@ -78,7 +78,8 @@ module Decidim
78
78
  end
79
79
 
80
80
  def collection
81
- @collection ||= current_user.organization.participatory_process_groups
81
+ @collection ||=
82
+ Decidim::OrganizationParticipatoryProcessGroups.new(current_user.organization).query
82
83
  end
83
84
  end
84
85
  end
@@ -75,16 +75,20 @@ module Decidim
75
75
  authorize! :create, Decidim::ParticipatoryProcess
76
76
  end
77
77
 
78
+ private
79
+
78
80
  def current_participatory_process
79
81
  @current_participatory_process ||= collection.find(params[:id]) if params[:id]
80
82
  end
81
83
 
82
- private
83
-
84
84
  def collection
85
85
  @collection ||= Decidim::ParticipatoryProcessesWithUserRole.for(current_user)
86
86
  end
87
87
 
88
+ def ability_context
89
+ super.merge(current_participatory_process: current_participatory_process)
90
+ end
91
+
88
92
  def participatory_process_params
89
93
  {
90
94
  id: params[:id],
@@ -24,7 +24,7 @@ module Decidim
24
24
  private
25
25
 
26
26
  def slug_uniqueness
27
- return unless current_organization.participatory_processes.where(slug: slug).where.not(id: id).any?
27
+ return unless OrganizationParticipatoryProcesses.new(current_organization).query.where(slug: slug).where.not(id: id).any?
28
28
 
29
29
  errors.add(:slug, :taken)
30
30
  end
@@ -58,7 +58,7 @@ module Decidim
58
58
  private
59
59
 
60
60
  def slug_uniqueness
61
- return unless current_organization.participatory_processes.where(slug: slug).where.not(id: id).any?
61
+ return unless OrganizationParticipatoryProcesses.new(current_organization).query.where(slug: slug).where.not(id: id).any?
62
62
 
63
63
  errors.add(:slug, :taken)
64
64
  end
@@ -12,7 +12,7 @@ module Decidim
12
12
  # Returns an Array.
13
13
  def process_groups_for_select
14
14
  @process_groups_for_select ||=
15
- current_organization.participatory_process_groups.map do |group|
15
+ OrganizationParticipatoryProcessGroups.new(current_organization).map do |group|
16
16
  [translated_attribute(group.name), group.id]
17
17
  end
18
18
  end
@@ -11,7 +11,7 @@ module Decidim
11
11
  #
12
12
  # Returns an Array.
13
13
  def processes_for_select
14
- @processes_for_select ||= current_organization.participatory_processes.map do |process|
14
+ @processes_for_select ||= OrganizationParticipatoryProcesses.new(current_organization).map do |process|
15
15
  [
16
16
  translated_attribute(process.title),
17
17
  process.id