decidim 0.0.4 → 0.0.5

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 (216) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.json +2 -5
  3. data/.mention-bot +2 -1
  4. data/.yardopts +8 -0
  5. data/Gemfile.lock +64 -62
  6. data/README.md +11 -9
  7. data/decidim-admin/app/assets/javascripts/decidim/admin/sort_steps.js.es6 +3 -3
  8. data/decidim-admin/app/assets/stylesheets/decidim/admin/_email_preview.scss +5 -0
  9. data/decidim-admin/app/assets/stylesheets/decidim/admin/application.scss +1 -0
  10. data/decidim-admin/app/commands/decidim/admin/create_newsletter.rb +30 -0
  11. data/decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb +29 -0
  12. data/decidim-admin/app/commands/decidim/admin/destroy_participatory_process_step.rb +9 -0
  13. data/decidim-admin/app/commands/decidim/admin/update_newsletter.rb +33 -0
  14. data/decidim-admin/app/constraints/decidim/admin/organization_dashboard_constraint.rb +1 -1
  15. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +2 -2
  16. data/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb +115 -0
  17. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +4 -4
  18. data/decidim-admin/app/forms/decidim/admin/newsletter_form.rb +15 -0
  19. data/decidim-admin/app/jobs/decidim/admin/newsletter_delivery_job.rb +18 -0
  20. data/decidim-admin/app/jobs/decidim/admin/newsletter_job.rb +32 -0
  21. data/decidim-admin/app/models/decidim/admin/abilities/admin_user.rb +4 -0
  22. data/decidim-admin/app/models/decidim/admin/abilities/base.rb +4 -0
  23. data/decidim-admin/app/models/decidim/admin/abilities/collaborator_user.rb +19 -0
  24. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb +1 -1
  25. data/decidim-admin/app/queries/decidim/admin/manageable_participatory_processes_for_user.rb +1 -1
  26. data/decidim-admin/app/views/decidim/admin/newsletters/_form.html.erb +5 -0
  27. data/decidim-admin/app/views/decidim/admin/newsletters/edit.html.erb +11 -0
  28. data/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb +47 -0
  29. data/decidim-admin/app/views/decidim/admin/newsletters/new.html.erb +11 -0
  30. data/decidim-admin/app/views/decidim/admin/newsletters/show.html.erb +14 -0
  31. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/_form.html.erb +1 -1
  32. data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +1 -1
  33. data/decidim-admin/app/views/decidim/admin/static_pages/_form.html.erb +1 -1
  34. data/decidim-admin/app/views/layouts/decidim/admin/_sidebar.html.erb +1 -0
  35. data/decidim-admin/config/locales/ca.yml +40 -0
  36. data/decidim-admin/config/locales/en.yml +40 -0
  37. data/decidim-admin/config/locales/es.yml +40 -0
  38. data/decidim-admin/config/routes.rb +7 -0
  39. data/decidim-admin/decidim-admin.gemspec +0 -1
  40. data/decidim-admin/lib/decidim/admin/engine.rb +1 -0
  41. data/decidim-admin/lib/decidim/admin/features/base_controller.rb +5 -1
  42. data/decidim-admin/spec/commands/create_newsletter_spec.rb +62 -0
  43. data/decidim-admin/spec/commands/deliver_newsletter_spec.rb +45 -0
  44. data/decidim-admin/spec/commands/destroy_participatory_process_step_spec.rb +12 -0
  45. data/decidim-admin/spec/commands/update_newsletter_spec.rb +64 -0
  46. data/decidim-admin/spec/features/admin_manages_newsletters_spec.rb +147 -0
  47. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +1 -5
  48. data/decidim-admin/spec/features/static_pages_spec.rb +16 -0
  49. data/decidim-admin/spec/forms/newsletter_form_spec.rb +47 -0
  50. data/decidim-admin/spec/jobs/newsletter_delivery_job_spec.rb +25 -0
  51. data/decidim-admin/spec/jobs/newsletter_job_spec.rb +29 -0
  52. data/decidim-admin/spec/models/abilities/collaborator_user_spec.rb +66 -0
  53. data/decidim-admin/spec/organization_dashboard_constraint_spec.rb +55 -0
  54. data/decidim-admin/spec/queries/manageable_participatory_processes_for_user_spec.rb +8 -0
  55. data/decidim-admin/spec/shared/manage_processes_examples.rb +1 -5
  56. data/decidim-api/lib/decidim/api.rb +2 -7
  57. data/decidim-api/lib/decidim/api/{types/mutation.rb → mutation_type.rb} +0 -0
  58. data/decidim-api/lib/decidim/api/{types/query.rb → query_type.rb} +0 -0
  59. data/decidim-budgets/app/assets/javascripts/decidim/budgets/projects.js.es6 +4 -4
  60. data/decidim-budgets/app/commands/decidim/budgets/add_line_item.rb +4 -2
  61. data/decidim-budgets/app/commands/decidim/budgets/checkout.rb +7 -3
  62. data/decidim-budgets/app/models/decidim/budgets/order.rb +16 -1
  63. data/decidim-budgets/app/models/decidim/budgets/project.rb +16 -0
  64. data/decidim-budgets/app/views/decidim/budgets/line_items/update_budget.js.erb +7 -7
  65. data/decidim-budgets/app/views/decidim/budgets/projects/_budget_confirm.html.erb +27 -25
  66. data/decidim-budgets/app/views/decidim/budgets/projects/_budget_summary.html.erb +4 -13
  67. data/decidim-budgets/app/views/decidim/budgets/projects/_order_progress.html.erb +23 -21
  68. data/decidim-budgets/app/views/decidim/budgets/projects/_order_selected_projects.html.erb +25 -23
  69. data/decidim-budgets/app/views/decidim/budgets/projects/_order_total_budget.html.erb +3 -1
  70. data/decidim-budgets/app/views/decidim/budgets/projects/_project.html.erb +32 -30
  71. data/decidim-budgets/app/views/decidim/budgets/projects/_projects.html.erb +1 -3
  72. data/decidim-budgets/app/views/decidim/budgets/projects/index.html.erb +0 -4
  73. data/decidim-budgets/app/views/decidim/budgets/projects/show.html.erb +5 -6
  74. data/decidim-budgets/config/i18n-tasks.yml +1 -0
  75. data/decidim-budgets/config/locales/ca.yml +7 -2
  76. data/decidim-budgets/config/locales/en.yml +17 -6
  77. data/decidim-budgets/config/locales/es.yml +7 -2
  78. data/decidim-budgets/lib/decidim/budgets/feature.rb +2 -2
  79. data/decidim-budgets/spec/commands/add_line_item_spec.rb +16 -3
  80. data/decidim-budgets/spec/commands/cancel_order_spec.rb +7 -1
  81. data/decidim-budgets/spec/commands/checkout_spec.rb +9 -2
  82. data/decidim-budgets/spec/commands/remove_line_item_spec.rb +16 -5
  83. data/decidim-budgets/spec/features/orders_spec.rb +8 -2
  84. data/decidim-budgets/spec/models/order_spec.rb +31 -2
  85. data/decidim-budgets/spec/shared/admin_shared_context.rb +1 -1
  86. data/decidim-comments/README.md +1 -1
  87. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  88. data/decidim-comments/app/frontend/comments/add_comment_form.component.jsx +156 -93
  89. data/decidim-comments/app/frontend/comments/add_comment_form.component.test.jsx +36 -23
  90. data/decidim-comments/app/frontend/comments/add_comment_form.mutation.graphql +5 -3
  91. data/decidim-comments/app/frontend/comments/add_comment_form_commentable.fragment.graphql +4 -0
  92. data/decidim-comments/app/frontend/comments/add_comment_form_session.fragment.graphql +6 -0
  93. data/decidim-comments/app/frontend/comments/comment.component.jsx +11 -13
  94. data/decidim-comments/app/frontend/comments/comment.component.test.jsx +22 -21
  95. data/decidim-comments/app/frontend/comments/comment.fragment.graphql +4 -4
  96. data/decidim-comments/app/frontend/comments/comment_data.fragment.graphql +4 -3
  97. data/decidim-comments/app/frontend/comments/comment_order_selector.component.jsx +1 -1
  98. data/decidim-comments/app/frontend/comments/comment_thread.component.jsx +3 -3
  99. data/decidim-comments/app/frontend/comments/comment_thread.component.test.jsx +3 -3
  100. data/decidim-comments/app/frontend/comments/comment_thread.fragment.graphql +1 -1
  101. data/decidim-comments/app/frontend/comments/comments.component.jsx +47 -39
  102. data/decidim-comments/app/frontend/comments/comments.component.test.jsx +51 -38
  103. data/decidim-comments/app/frontend/comments/comments.query.graphql +10 -4
  104. data/decidim-comments/app/frontend/comments/down_vote_button.component.jsx +6 -3
  105. data/decidim-comments/app/frontend/comments/up_vote_button.component.jsx +7 -4
  106. data/decidim-comments/app/frontend/support/generate_comments_data.js +4 -4
  107. data/decidim-comments/app/models/decidim/comments/comment.rb +7 -9
  108. data/decidim-comments/app/queries/decidim/comments/{comments_with_replies.rb → sorted_comments.rb} +3 -8
  109. data/decidim-comments/app/types/decidim/comments/commentable_interface.rb +44 -0
  110. data/decidim-comments/app/types/decidim/comments/commentable_mutation_type.rb +29 -0
  111. data/decidim-comments/app/types/decidim/comments/commentable_type.rb +14 -0
  112. data/decidim-comments/config/locales/ca.yml +3 -1
  113. data/decidim-comments/config/locales/en.yml +5 -2
  114. data/decidim-comments/config/locales/es.yml +3 -1
  115. data/decidim-comments/lib/decidim/comments.rb +4 -0
  116. data/decidim-comments/{app/types/decidim/comments → lib/decidim/comments/api}/add_comment_type.rb +0 -0
  117. data/decidim-comments/{app/types/decidim/comments → lib/decidim/comments/api}/comment_mutation_type.rb +0 -0
  118. data/decidim-comments/{app/types/decidim/comments → lib/decidim/comments/api}/comment_type.rb +11 -17
  119. data/decidim-comments/lib/decidim/comments/commentable.rb +45 -0
  120. data/decidim-comments/lib/decidim/comments/comments_helper.rb +15 -10
  121. data/decidim-comments/lib/decidim/comments/mutation_extensions.rb +8 -16
  122. data/decidim-comments/lib/decidim/comments/query_extensions.rb +5 -8
  123. data/decidim-comments/lib/decidim/comments/test/factories.rb +3 -3
  124. data/decidim-comments/spec/commands/vote_comment_spec.rb +3 -1
  125. data/decidim-comments/spec/features/comments_spec.rb +28 -14
  126. data/decidim-comments/spec/features/notifications_spec.rb +1 -1
  127. data/decidim-comments/spec/helpers/comments_helper_spec.rb +4 -27
  128. data/decidim-comments/spec/models/comment_spec.rb +7 -11
  129. data/decidim-comments/spec/models/comment_vote_spec.rb +3 -1
  130. data/decidim-comments/spec/models/seed_spec.rb +3 -4
  131. data/decidim-comments/spec/queries/{comments_with_replies_spec.rb → sorted_comments_spec.rb} +12 -29
  132. data/decidim-comments/spec/types/comment_type_spec.rb +23 -17
  133. data/decidim-comments/spec/types/commentable_mutation_type_spec.rb +34 -0
  134. data/decidim-comments/spec/types/commentable_type_spec.rb +48 -0
  135. data/decidim-comments/spec/types/mutation_type_spec.rb +5 -22
  136. data/decidim-comments/spec/types/query_type_spec.rb +0 -24
  137. data/decidim-dev/config/i18n-tasks.yml +4 -0
  138. data/decidim-dev/decidim-dev.gemspec +1 -1
  139. data/decidim-dev/lib/decidim/dev/test/rspec_support/action_mailer.rb +10 -4
  140. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +6 -5
  141. data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +0 -1
  142. data/decidim-meetings/app/assets/javascripts/decidim/meetings/map.js.es6.erb +8 -3
  143. data/decidim-meetings/app/assets/stylesheets/decidim/meetings/map.css +3 -1
  144. data/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +2 -2
  145. data/decidim-meetings/app/forms/decidim/meetings/admin/close_meeting_form.rb +2 -1
  146. data/decidim-meetings/app/helpers/decidim/meetings/map_helper.rb +1 -0
  147. data/decidim-meetings/app/services/decidim/meetings/meeting_search.rb +7 -3
  148. data/decidim-meetings/app/views/decidim/meetings/meetings/_datetime.html.erb +1 -1
  149. data/decidim-meetings/app/views/decidim/meetings/meetings/_filters.html.erb +5 -5
  150. data/decidim-meetings/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
  151. data/decidim-meetings/app/views/decidim/meetings/meetings/index.html.erb +1 -5
  152. data/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb +16 -9
  153. data/decidim-meetings/config/locales/ca.yml +2 -3
  154. data/decidim-meetings/config/locales/en.yml +2 -3
  155. data/decidim-meetings/config/locales/es.yml +2 -3
  156. data/decidim-meetings/spec/features/explore_meetings_spec.rb +75 -24
  157. data/decidim-meetings/spec/forms/close_meeting_form_spec.rb +1 -1
  158. data/decidim-meetings/spec/services/meeting_search_spec.rb +15 -12
  159. data/decidim-meetings/vendor/assets/javascripts/leaflet.markercluster.js +7 -0
  160. data/decidim-meetings/vendor/assets/stylesheets/MarkerCluster.Default.css +60 -0
  161. data/decidim-meetings/vendor/assets/stylesheets/MarkerCluster.css +14 -0
  162. data/decidim-pages/app/models/decidim/pages/page.rb +22 -0
  163. data/decidim-pages/app/views/decidim/pages/application/show.html.erb +2 -6
  164. data/decidim-pages/config/locales/ca.yml +2 -2
  165. data/decidim-pages/config/locales/en.yml +2 -2
  166. data/decidim-pages/config/locales/es.yml +2 -2
  167. data/decidim-pages/lib/decidim/pages/feature.rb +2 -2
  168. data/decidim-pages/spec/features/page_show_spec.rb +0 -33
  169. data/decidim-proposals/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +2 -0
  170. data/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb +2 -0
  171. data/decidim-proposals/app/models/decidim/proposals/abilities/admin_user.rb +45 -0
  172. data/decidim-proposals/app/models/decidim/proposals/abilities/process_admin_user.rb +57 -0
  173. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +21 -0
  174. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +1 -1
  175. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +16 -10
  176. data/decidim-proposals/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb +4 -4
  177. data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +7 -3
  178. data/decidim-proposals/app/views/decidim/proposals/proposals/_proposal.html.erb +2 -6
  179. data/decidim-proposals/app/views/decidim/proposals/proposals/_remaining_votes_count.html.erb +3 -1
  180. data/decidim-proposals/app/views/decidim/proposals/proposals/_tags.html.erb +1 -1
  181. data/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb +23 -21
  182. data/decidim-proposals/app/views/decidim/proposals/proposals/_votes_count.html.erb +9 -6
  183. data/decidim-proposals/app/views/decidim/proposals/proposals/_votes_limit.html.erb +1 -3
  184. data/decidim-proposals/app/views/decidim/proposals/proposals/index.html.erb +0 -4
  185. data/decidim-proposals/app/views/decidim/proposals/proposals/new.html.erb +1 -1
  186. data/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb +2 -6
  187. data/decidim-proposals/config/locales/ca.yml +8 -1
  188. data/decidim-proposals/config/locales/en.yml +8 -1
  189. data/decidim-proposals/config/locales/es.yml +8 -1
  190. data/decidim-proposals/lib/decidim/proposals/admin_engine.rb +7 -0
  191. data/decidim-proposals/lib/decidim/proposals/feature.rb +6 -2
  192. data/decidim-proposals/spec/features/proposals_spec.rb +226 -40
  193. data/decidim-proposals/spec/models/decidim/proposals/abilities/admin_user_spec.rb +62 -0
  194. data/decidim-proposals/spec/models/decidim/proposals/abilities/process_admin_user_spec.rb +63 -0
  195. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +161 -50
  196. data/decidim-results/app/models/decidim/results/result.rb +21 -0
  197. data/decidim-results/app/views/decidim/results/results/index.html.erb +0 -4
  198. data/decidim-results/app/views/decidim/results/results/show.html.erb +2 -8
  199. data/decidim-results/config/i18n-tasks.yml +1 -0
  200. data/decidim-results/config/locales/ca.yml +5 -2
  201. data/decidim-results/config/locales/en.yml +5 -2
  202. data/decidim-results/config/locales/es.yml +5 -2
  203. data/decidim-results/lib/decidim/results/feature.rb +2 -2
  204. data/decidim-results/spec/services/result_stats_calculator_spec.rb +2 -2
  205. data/decidim-results/spec/shared/admin_shared_context.rb +1 -1
  206. data/decidim-system/config/i18n-tasks.yml +1 -1
  207. data/package.json +50 -51
  208. data/yarn.lock +198 -151
  209. metadata +69 -36
  210. data/decidim-admin/spec/features/admin_access_control.rb +0 -52
  211. data/decidim-api/lib/decidim/api/types/author_interface.rb +0 -13
  212. data/decidim-api/lib/decidim/api/types/localized_string.rb +0 -13
  213. data/decidim-api/lib/decidim/api/types/translated_field.rb +0 -44
  214. data/decidim-api/spec/types/localized_string_type_spec.rb +0 -31
  215. data/decidim-api/spec/types/translated_field_type_spec.rb +0 -69
  216. data/decidim-comments/app/frontend/comments/add_comment_form.fragment.graphql +0 -6
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.0.4
4
+ version: 0.0.5
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: 2017-02-09 00:00:00.000000000 Z
13
+ date: 2017-02-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,140 +18,140 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.4
21
+ version: 0.0.5
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.0.4
28
+ version: 0.0.5
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-system
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.0.4
35
+ version: 0.0.5
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.0.4
42
+ version: 0.0.5
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-admin
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.0.4
49
+ version: 0.0.5
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.0.4
56
+ version: 0.0.5
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-api
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.0.4
63
+ version: 0.0.5
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.0.4
70
+ version: 0.0.5
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-pages
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.0.4
77
+ version: 0.0.5
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.0.4
84
+ version: 0.0.5
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.0.4
91
+ version: 0.0.5
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.4
98
+ version: 0.0.5
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-meetings
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.0.4
105
+ version: 0.0.5
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.0.4
112
+ version: 0.0.5
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-proposals
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.0.4
119
+ version: 0.0.5
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.0.4
126
+ version: 0.0.5
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-results
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.0.4
133
+ version: 0.0.5
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.0.4
140
+ version: 0.0.5
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-budgets
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.0.4
147
+ version: 0.0.5
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.0.4
154
+ version: 0.0.5
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: rails
157
157
  requirement: !ruby/object:Gem::Requirement
@@ -260,6 +260,7 @@ files:
260
260
  - ".rubocop.yml"
261
261
  - ".ruby-version"
262
262
  - ".travis.yml"
263
+ - ".yardopts"
263
264
  - CODE_OF_CONDUCT.md
264
265
  - Dockerfile
265
266
  - Gemfile
@@ -278,6 +279,7 @@ files:
278
279
  - decidim-admin/app/assets/javascripts/decidim/admin/sort_steps.js.es6
279
280
  - decidim-admin/app/assets/javascripts/decidim/admin/tab_focus.js.es6
280
281
  - decidim-admin/app/assets/stylesheets/decidim/admin/_actions.scss
282
+ - decidim-admin/app/assets/stylesheets/decidim/admin/_email_preview.scss
281
283
  - decidim-admin/app/assets/stylesheets/decidim/admin/_forms.scss
282
284
  - decidim-admin/app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss
283
285
  - decidim-admin/app/assets/stylesheets/decidim/admin/_icons.scss
@@ -291,12 +293,14 @@ files:
291
293
  - decidim-admin/app/commands/decidim/admin/create_attachment.rb
292
294
  - decidim-admin/app/commands/decidim/admin/create_category.rb
293
295
  - decidim-admin/app/commands/decidim/admin/create_feature.rb
296
+ - decidim-admin/app/commands/decidim/admin/create_newsletter.rb
294
297
  - decidim-admin/app/commands/decidim/admin/create_participatory_process.rb
295
298
  - decidim-admin/app/commands/decidim/admin/create_participatory_process_admin.rb
296
299
  - decidim-admin/app/commands/decidim/admin/create_participatory_process_step.rb
297
300
  - decidim-admin/app/commands/decidim/admin/create_scope.rb
298
301
  - decidim-admin/app/commands/decidim/admin/create_static_page.rb
299
302
  - decidim-admin/app/commands/decidim/admin/deactivate_participatory_process_step.rb
303
+ - decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb
300
304
  - decidim-admin/app/commands/decidim/admin/destroy_category.rb
301
305
  - decidim-admin/app/commands/decidim/admin/destroy_feature.rb
302
306
  - decidim-admin/app/commands/decidim/admin/destroy_participatory_process_step.rb
@@ -307,6 +311,7 @@ files:
307
311
  - decidim-admin/app/commands/decidim/admin/update_category.rb
308
312
  - decidim-admin/app/commands/decidim/admin/update_feature.rb
309
313
  - decidim-admin/app/commands/decidim/admin/update_feature_permissions.rb
314
+ - decidim-admin/app/commands/decidim/admin/update_newsletter.rb
310
315
  - decidim-admin/app/commands/decidim/admin/update_organization.rb
311
316
  - decidim-admin/app/commands/decidim/admin/update_participatory_process.rb
312
317
  - decidim-admin/app/commands/decidim/admin/update_participatory_process_step.rb
@@ -320,6 +325,7 @@ files:
320
325
  - decidim-admin/app/controllers/decidim/admin/dashboard_controller.rb
321
326
  - decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb
322
327
  - decidim-admin/app/controllers/decidim/admin/features_controller.rb
328
+ - decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
323
329
  - decidim-admin/app/controllers/decidim/admin/organization_controller.rb
324
330
  - decidim-admin/app/controllers/decidim/admin/participatory_process_attachments_controller.rb
325
331
  - decidim-admin/app/controllers/decidim/admin/participatory_process_publications_controller.rb
@@ -335,6 +341,7 @@ files:
335
341
  - decidim-admin/app/forms/decidim/admin/attachment_form.rb
336
342
  - decidim-admin/app/forms/decidim/admin/category_form.rb
337
343
  - decidim-admin/app/forms/decidim/admin/feature_form.rb
344
+ - decidim-admin/app/forms/decidim/admin/newsletter_form.rb
338
345
  - decidim-admin/app/forms/decidim/admin/organization_form.rb
339
346
  - decidim-admin/app/forms/decidim/admin/participatory_process_form.rb
340
347
  - decidim-admin/app/forms/decidim/admin/participatory_process_step_form.rb
@@ -347,9 +354,12 @@ files:
347
354
  - decidim-admin/app/helpers/decidim/admin/attributes_display_helper.rb
348
355
  - decidim-admin/app/helpers/decidim/admin/feature_settings_helper.rb
349
356
  - decidim-admin/app/jobs/decidim/admin/application_job.rb
357
+ - decidim-admin/app/jobs/decidim/admin/newsletter_delivery_job.rb
358
+ - decidim-admin/app/jobs/decidim/admin/newsletter_job.rb
350
359
  - decidim-admin/app/mailers/decidim/admin/application_mailer.rb
351
360
  - decidim-admin/app/models/decidim/admin/abilities/admin_user.rb
352
361
  - decidim-admin/app/models/decidim/admin/abilities/base.rb
362
+ - decidim-admin/app/models/decidim/admin/abilities/collaborator_user.rb
353
363
  - decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb
354
364
  - decidim-admin/app/models/decidim/admin/application_record.rb
355
365
  - decidim-admin/app/models/decidim/admin/participatory_process_user_role.rb
@@ -375,6 +385,11 @@ files:
375
385
  - decidim-admin/app/views/decidim/admin/features/edit.html.erb
376
386
  - decidim-admin/app/views/decidim/admin/features/index.html.erb
377
387
  - decidim-admin/app/views/decidim/admin/features/new.html.erb
388
+ - decidim-admin/app/views/decidim/admin/newsletters/_form.html.erb
389
+ - decidim-admin/app/views/decidim/admin/newsletters/edit.html.erb
390
+ - decidim-admin/app/views/decidim/admin/newsletters/index.html.erb
391
+ - decidim-admin/app/views/decidim/admin/newsletters/new.html.erb
392
+ - decidim-admin/app/views/decidim/admin/newsletters/show.html.erb
378
393
  - decidim-admin/app/views/decidim/admin/organization/_form.html.erb
379
394
  - decidim-admin/app/views/decidim/admin/organization/edit.html.erb
380
395
  - decidim-admin/app/views/decidim/admin/participatory_process_steps/_form.html.erb
@@ -429,11 +444,13 @@ files:
429
444
  - decidim-admin/spec/commands/activate_participatory_process_step_spec.rb
430
445
  - decidim-admin/spec/commands/create_category_spec.rb
431
446
  - decidim-admin/spec/commands/create_feature_spec.rb
447
+ - decidim-admin/spec/commands/create_newsletter_spec.rb
432
448
  - decidim-admin/spec/commands/create_participatory_process_admin_spec.rb
433
449
  - decidim-admin/spec/commands/create_participatory_process_spec.rb
434
450
  - decidim-admin/spec/commands/create_scope_spec.rb
435
451
  - decidim-admin/spec/commands/create_static_page_spec.rb
436
452
  - decidim-admin/spec/commands/deactivate_participatory_process_step_spec.rb
453
+ - decidim-admin/spec/commands/deliver_newsletter_spec.rb
437
454
  - decidim-admin/spec/commands/destroy_category_spec.rb
438
455
  - decidim-admin/spec/commands/destroy_feature_spec.rb
439
456
  - decidim-admin/spec/commands/destroy_participatory_process_step_spec.rb
@@ -442,16 +459,17 @@ files:
442
459
  - decidim-admin/spec/commands/unpublish_participatory_process_spec.rb
443
460
  - decidim-admin/spec/commands/update_category_spec.rb
444
461
  - decidim-admin/spec/commands/update_feature_spec.rb
462
+ - decidim-admin/spec/commands/update_newsletter_spec.rb
445
463
  - decidim-admin/spec/commands/update_organization_spec.rb
446
464
  - decidim-admin/spec/commands/update_scope_spec.rb
447
465
  - decidim-admin/spec/commands/update_static_page_spec.rb
448
466
  - decidim-admin/spec/controllers/participatory_processes_controller_spec.rb
449
467
  - decidim-admin/spec/controllers/static_pages_controller_spec.rb
450
468
  - decidim-admin/spec/factories.rb
451
- - decidim-admin/spec/features/admin_access_control.rb
452
469
  - decidim-admin/spec/features/admin_invite_spec.rb
453
470
  - decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb
454
471
  - decidim-admin/spec/features/admin_manages_features_spec.rb
472
+ - decidim-admin/spec/features/admin_manages_newsletters_spec.rb
455
473
  - decidim-admin/spec/features/admin_manages_organization_admins_spec.rb
456
474
  - decidim-admin/spec/features/admin_manages_organization_scopes_spec.rb
457
475
  - decidim-admin/spec/features/admin_manages_organization_spec.rb
@@ -468,6 +486,7 @@ files:
468
486
  - decidim-admin/spec/features/process_admin_manages_participatory_process_categories_spec.rb
469
487
  - decidim-admin/spec/features/static_pages_spec.rb
470
488
  - decidim-admin/spec/forms/category_form_spec.rb
489
+ - decidim-admin/spec/forms/newsletter_form_spec.rb
471
490
  - decidim-admin/spec/forms/organization_form_spec.rb
472
491
  - decidim-admin/spec/forms/participatory_process_form_spec.rb
473
492
  - decidim-admin/spec/forms/participatory_process_step_form_spec.rb
@@ -476,9 +495,13 @@ files:
476
495
  - decidim-admin/spec/forms/static_page_form_spec.rb
477
496
  - decidim-admin/spec/helpers/aria_selected_link_to_helper_spec.rb
478
497
  - decidim-admin/spec/helpers/feature_settings_helper_spec.rb
498
+ - decidim-admin/spec/jobs/newsletter_delivery_job_spec.rb
499
+ - decidim-admin/spec/jobs/newsletter_job_spec.rb
479
500
  - decidim-admin/spec/models/abilities/admin_user_spec.rb
501
+ - decidim-admin/spec/models/abilities/collaborator_user_spec.rb
480
502
  - decidim-admin/spec/models/abilities/participatory_process_admin_spec.rb
481
503
  - decidim-admin/spec/models/participatory_process_user_role_spec.rb
504
+ - decidim-admin/spec/organization_dashboard_constraint_spec.rb
482
505
  - decidim-admin/spec/queries/manageable_participatory_processes_for_user_spec.rb
483
506
  - decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
484
507
  - decidim-admin/spec/shared/manage_process_admins_examples.rb
@@ -507,22 +530,17 @@ files:
507
530
  - decidim-api/lib/decidim/api.rb
508
531
  - decidim-api/lib/decidim/api/engine.rb
509
532
  - decidim-api/lib/decidim/api/graphiql-initial-query.txt
533
+ - decidim-api/lib/decidim/api/mutation_type.rb
534
+ - decidim-api/lib/decidim/api/query_type.rb
510
535
  - decidim-api/lib/decidim/api/schema.rb
511
536
  - decidim-api/lib/decidim/api/test/type_context.rb
512
- - decidim-api/lib/decidim/api/types/author_interface.rb
513
- - decidim-api/lib/decidim/api/types/localized_string.rb
514
- - decidim-api/lib/decidim/api/types/mutation.rb
515
- - decidim-api/lib/decidim/api/types/query.rb
516
- - decidim-api/lib/decidim/api/types/translated_field.rb
517
537
  - decidim-api/lib/tasks/decidim/api_tasks.rake
518
538
  - decidim-api/spec/controllers/queries_controller_spec.rb
519
539
  - decidim-api/spec/factories.rb
520
540
  - decidim-api/spec/features/documentation_spec.rb
521
541
  - decidim-api/spec/features/graphiql_spec.rb
522
542
  - decidim-api/spec/spec_helper.rb
523
- - decidim-api/spec/types/localized_string_type_spec.rb
524
543
  - decidim-api/spec/types/query_type_spec.rb
525
- - decidim-api/spec/types/translated_field_type_spec.rb
526
544
  - decidim-api/vendor/assets/javascripts/decidim/api/graphql-docs.js
527
545
  - decidim-api/vendor/assets/javascripts/decidim/api/react-dom.js
528
546
  - decidim-api/vendor/assets/javascripts/decidim/api/react.js
@@ -634,8 +652,9 @@ files:
634
652
  - decidim-comments/app/frontend/application/icon.component.test.jsx
635
653
  - decidim-comments/app/frontend/comments/add_comment_form.component.jsx
636
654
  - decidim-comments/app/frontend/comments/add_comment_form.component.test.jsx
637
- - decidim-comments/app/frontend/comments/add_comment_form.fragment.graphql
638
655
  - decidim-comments/app/frontend/comments/add_comment_form.mutation.graphql
656
+ - decidim-comments/app/frontend/comments/add_comment_form_commentable.fragment.graphql
657
+ - decidim-comments/app/frontend/comments/add_comment_form_session.fragment.graphql
639
658
  - decidim-comments/app/frontend/comments/comment.component.jsx
640
659
  - decidim-comments/app/frontend/comments/comment.component.test.jsx
641
660
  - decidim-comments/app/frontend/comments/comment.fragment.graphql
@@ -675,11 +694,11 @@ files:
675
694
  - decidim-comments/app/models/decidim/comments/comment.rb
676
695
  - decidim-comments/app/models/decidim/comments/comment_vote.rb
677
696
  - decidim-comments/app/models/decidim/comments/seed.rb
678
- - decidim-comments/app/queries/decidim/comments/comments_with_replies.rb
697
+ - decidim-comments/app/queries/decidim/comments/sorted_comments.rb
679
698
  - decidim-comments/app/resolvers/decidim/comments/vote_comment_resolver.rb
680
- - decidim-comments/app/types/decidim/comments/add_comment_type.rb
681
- - decidim-comments/app/types/decidim/comments/comment_mutation_type.rb
682
- - decidim-comments/app/types/decidim/comments/comment_type.rb
699
+ - decidim-comments/app/types/decidim/comments/commentable_interface.rb
700
+ - decidim-comments/app/types/decidim/comments/commentable_mutation_type.rb
701
+ - decidim-comments/app/types/decidim/comments/commentable_type.rb
683
702
  - decidim-comments/app/views/decidim/comments/comment_notification_mailer/comment_created.html.erb
684
703
  - decidim-comments/app/views/decidim/comments/comment_notification_mailer/reply_created.html.erb
685
704
  - decidim-comments/bin/rails
@@ -696,6 +715,10 @@ files:
696
715
  - decidim-comments/db/seeds.rb
697
716
  - decidim-comments/decidim-comments.gemspec
698
717
  - decidim-comments/lib/decidim/comments.rb
718
+ - decidim-comments/lib/decidim/comments/api/add_comment_type.rb
719
+ - decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
720
+ - decidim-comments/lib/decidim/comments/api/comment_type.rb
721
+ - decidim-comments/lib/decidim/comments/commentable.rb
699
722
  - decidim-comments/lib/decidim/comments/comments_helper.rb
700
723
  - decidim-comments/lib/decidim/comments/engine.rb
701
724
  - decidim-comments/lib/decidim/comments/mutation_extensions.rb
@@ -712,14 +735,17 @@ files:
712
735
  - decidim-comments/spec/models/comment_spec.rb
713
736
  - decidim-comments/spec/models/comment_vote_spec.rb
714
737
  - decidim-comments/spec/models/seed_spec.rb
715
- - decidim-comments/spec/queries/comments_with_replies_spec.rb
738
+ - decidim-comments/spec/queries/sorted_comments_spec.rb
716
739
  - decidim-comments/spec/spec_helper.rb
717
740
  - decidim-comments/spec/types/comment_mutation_type_spec.rb
718
741
  - decidim-comments/spec/types/comment_type_spec.rb
742
+ - decidim-comments/spec/types/commentable_mutation_type_spec.rb
743
+ - decidim-comments/spec/types/commentable_type_spec.rb
719
744
  - decidim-comments/spec/types/mutation_type_spec.rb
720
745
  - decidim-comments/spec/types/query_type_spec.rb
721
746
  - decidim-dev/README.md
722
747
  - decidim-dev/app/views/decidim/dummy_resource/_linked_dummys.html.erb
748
+ - decidim-dev/config/i18n-tasks.yml
723
749
  - decidim-dev/config/locales/ca.yml
724
750
  - decidim-dev/config/locales/en.yml
725
751
  - decidim-dev/config/locales/es.yml
@@ -851,6 +877,9 @@ files:
851
877
  - decidim-meetings/vendor/assets/javascripts/leaflet-svg-icon.js
852
878
  - decidim-meetings/vendor/assets/javascripts/leaflet-tilelayer-here.js
853
879
  - decidim-meetings/vendor/assets/javascripts/leaflet.js
880
+ - decidim-meetings/vendor/assets/javascripts/leaflet.markercluster.js
881
+ - decidim-meetings/vendor/assets/stylesheets/MarkerCluster.Default.css
882
+ - decidim-meetings/vendor/assets/stylesheets/MarkerCluster.css
854
883
  - decidim-meetings/vendor/assets/stylesheets/leaflet.css
855
884
  - decidim-pages/.gitignore
856
885
  - decidim-pages/README.md
@@ -916,7 +945,9 @@ files:
916
945
  - decidim-proposals/app/forms/decidim/proposals/proposal_form.rb
917
946
  - decidim-proposals/app/helpers/decidim/proposals/application_helper.rb
918
947
  - decidim-proposals/app/helpers/decidim/proposals/proposal_votes_helper.rb
948
+ - decidim-proposals/app/models/decidim/proposals/abilities/admin_user.rb
919
949
  - decidim-proposals/app/models/decidim/proposals/abilities/current_user.rb
950
+ - decidim-proposals/app/models/decidim/proposals/abilities/process_admin_user.rb
920
951
  - decidim-proposals/app/models/decidim/proposals/application_record.rb
921
952
  - decidim-proposals/app/models/decidim/proposals/proposal.rb
922
953
  - decidim-proposals/app/models/decidim/proposals/proposal_vote.rb
@@ -980,6 +1011,8 @@ files:
980
1011
  - decidim-proposals/spec/helpers/application_helper_spec.rb
981
1012
  - decidim-proposals/spec/helpers/proposal_votes_helper_spec.rb
982
1013
  - decidim-proposals/spec/lib/decidim/proposals/feature_spec.rb
1014
+ - decidim-proposals/spec/models/decidim/proposals/abilities/admin_user_spec.rb
1015
+ - decidim-proposals/spec/models/decidim/proposals/abilities/process_admin_user_spec.rb
983
1016
  - decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb
984
1017
  - decidim-proposals/spec/models/decidim/proposals/proposal_vote_spec.rb
985
1018
  - decidim-proposals/spec/services/decidim/proposals/proposal_search_spec.rb
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
- require "spec_helper"
3
-
4
- describe "Admin dashboard access control", type: :feature do
5
- let(:organization) { create(:organization) }
6
-
7
- before do
8
- switch_to_host(organization.host)
9
- end
10
-
11
- context "when authenticated" do
12
- before do
13
- login_as user, scope: :user
14
- end
15
-
16
- context "a regular user" do
17
- let(:user) { create(:user, organization: organization) }
18
-
19
- it "can't access the admin dashboard" do
20
- visit decidim_admin.root_path
21
- expect(page.status_code).to eq(404)
22
- end
23
- end
24
-
25
- context "an organization admin" do
26
- let(:user) { create(:user, :admin, organization: organization) }
27
-
28
- it "can access the admin dashboard" do
29
- visit decidim_admin.root_path
30
- expect(page.status_code).to eq(200)
31
- expect(page).to have_content("Dashboard")
32
- end
33
- end
34
-
35
- context "an admin from another organization" do
36
- let(:other_organization) { create(:organization) }
37
- let(:user) { create(:user, :admin, organization: other_organization) }
38
-
39
- it "can't access the admin dashboard" do
40
- visit decidim_admin.root_path
41
- expect(page.status_code).to eq(404)
42
- end
43
- end
44
- end
45
-
46
- describe "when unauthenticated" do
47
- it "can't access the admin dashboard" do
48
- visit decidim_admin.root_path
49
- expect(page.body).to include("You need to sign in")
50
- end
51
- end
52
- end