decidim 0.0.8.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.circleci/config.yml +21 -21
- data/.codeclimate.yml +10 -6
- data/.eslintignore +1 -0
- data/.gitignore +1 -1
- data/.rubocop.yml +38 -20
- data/.travis.yml +0 -1
- data/Gemfile +6 -9
- data/Gemfile.lock +165 -205
- data/Rakefile +1 -1
- data/codecov.yml +5 -71
- data/crowdin.yaml +1 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -2
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_action-icon.scss +7 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_cards.scss +6 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_editor.scss +1 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/{_sidebar.scss → extra/_sidebar.scss} +0 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +23 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_cards.scss +0 -7
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_icons.scss +4 -2
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_modules.scss +0 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/{modules/_datepicker.scss → plugins/_foundation-datepicker.scss} +1 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/_constants.scss +5 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/_math.scss +45 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_acos.scss +12 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_asin.scss +12 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan.scss +28 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan2.scss +37 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cos.scss +13 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cot.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_csc.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_exp.scss +12 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_fact.scss +18 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss +21 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss +17 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_log.scss +34 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_pow.scss +28 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sec.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sin.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sqrt.scss +16 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_tan.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_deg-to-rad.scss +4 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_rad-to-deg.scss +4 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_strip-unit.scss +8 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss +13 -0
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process.rb +23 -17
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process_group.rb +1 -1
- data/decidim-admin/app/controllers/decidim/admin/moderations_controller.rb +4 -4
- data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +1 -1
- data/decidim-admin/app/forms/decidim/admin/organization_form.rb +6 -2
- data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +5 -0
- data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +1 -1
- data/decidim-admin/app/helpers/decidim/admin/attributes_display_helper.rb +1 -1
- data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +5 -1
- data/decidim-admin/app/views/decidim/admin/moderations/_report.html.erb +11 -0
- data/decidim-admin/app/views/decidim/admin/moderations/index.html.erb +22 -24
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +3 -0
- data/decidim-admin/config/i18n-tasks.yml +1 -0
- data/decidim-admin/config/locales/ca.yml +7 -3
- data/decidim-admin/config/locales/en.yml +6 -2
- data/decidim-admin/config/locales/es.yml +7 -3
- data/decidim-admin/config/locales/eu.yml +4 -3
- data/decidim-admin/config/locales/fi.yml +4 -3
- data/decidim-admin/config/locales/fr.yml +389 -2
- data/decidim-admin/config/locales/nl.yml +4 -1
- data/decidim-admin/decidim-admin.gemspec +3 -3
- data/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +2 -2
- data/decidim-admin/spec/commands/activate_participatory_process_step_spec.rb +1 -0
- data/decidim-admin/spec/commands/create_category_spec.rb +1 -1
- data/decidim-admin/spec/commands/create_feature_spec.rb +7 -5
- data/decidim-admin/spec/commands/create_participatory_process_admin_spec.rb +2 -1
- data/decidim-admin/spec/commands/create_participatory_process_spec.rb +14 -6
- data/decidim-admin/spec/commands/create_scope_spec.rb +3 -2
- data/decidim-admin/spec/commands/deactivate_participatory_process_step_spec.rb +1 -0
- data/decidim-admin/spec/commands/destroy_feature_spec.rb +1 -0
- data/decidim-admin/spec/commands/destroy_participatory_process_step_spec.rb +1 -0
- data/decidim-admin/spec/commands/publish_participatory_process_spec.rb +1 -0
- data/decidim-admin/spec/commands/reorder_participatory_process_steps_spec.rb +1 -0
- data/decidim-admin/spec/commands/unpublish_participatory_process_spec.rb +1 -0
- data/decidim-admin/spec/commands/update_feature_spec.rb +7 -5
- data/decidim-admin/spec/commands/update_participatory_process_spec.rb +5 -5
- data/decidim-admin/spec/commands/update_scope_spec.rb +3 -2
- data/decidim-admin/spec/factories.rb +1 -0
- data/decidim-admin/spec/features/admin_invite_spec.rb +5 -5
- data/decidim-admin/spec/features/admin_manages_newsletters_spec.rb +5 -5
- data/decidim-admin/spec/features/admin_manages_organization_admins_spec.rb +2 -2
- data/decidim-admin/spec/features/admin_manages_organization_scopes_spec.rb +3 -3
- data/decidim-admin/spec/features/admin_manages_organization_spec.rb +7 -11
- data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +2 -2
- data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +3 -3
- data/decidim-admin/spec/features/static_pages_spec.rb +8 -7
- data/decidim-admin/spec/forms/newsletter_form_spec.rb +2 -2
- data/decidim-admin/spec/forms/organization_form_spec.rb +3 -3
- data/decidim-admin/spec/forms/participatory_process_form_spec.rb +4 -4
- data/decidim-admin/spec/forms/participatory_process_step_form_spec.rb +1 -1
- data/decidim-admin/spec/forms/participatory_process_user_role_form_spec.rb +1 -1
- data/decidim-admin/spec/forms/scope_form_spec.rb +1 -1
- data/decidim-admin/spec/helpers/aria_selected_link_to_helper_spec.rb +1 -0
- data/decidim-admin/spec/helpers/feature_settings_helper_spec.rb +1 -0
- data/decidim-admin/spec/jobs/newsletter_delivery_job_spec.rb +2 -2
- data/decidim-admin/spec/queries/process_admins_spec.rb +1 -1
- data/decidim-admin/spec/shared/manage_process_admins_examples.rb +2 -2
- data/decidim-admin/spec/shared/manage_process_categories_examples.rb +3 -3
- data/decidim-admin/spec/shared/manage_process_steps_examples.rb +5 -5
- data/decidim-admin/spec/shared/manage_processes_examples.rb +4 -4
- data/decidim-admin/spec/shared/participatory_admin_shared_context.rb +1 -0
- data/decidim-admin/spec/spec_helper.rb +1 -0
- data/decidim-admin/spec/views/decidim/static_pages/_form.html.erb_spec.rb +1 -0
- data/decidim-api/app/controllers/decidim/api/application_controller.rb +1 -1
- data/decidim-api/decidim-api.gemspec +1 -1
- data/decidim-api/spec/factories.rb +1 -0
- data/decidim-api/spec/spec_helper.rb +1 -0
- data/decidim-budgets/app/queries/decidim/budgets/filtered_projects.rb +36 -0
- data/decidim-budgets/config/locales/ca.yml +1 -0
- data/decidim-budgets/config/locales/en.yml +1 -0
- data/decidim-budgets/config/locales/es.yml +1 -0
- data/decidim-budgets/config/locales/fr.yml +35 -3
- data/decidim-budgets/decidim-budgets.gemspec +2 -2
- data/decidim-budgets/lib/decidim/budgets/feature.rb +9 -0
- data/decidim-budgets/spec/commands/add_line_item_spec.rb +6 -9
- data/decidim-budgets/spec/commands/cancel_order_spec.rb +3 -1
- data/decidim-budgets/spec/commands/checkout_spec.rb +3 -1
- data/decidim-budgets/spec/commands/create_project_spec.rb +4 -3
- data/decidim-budgets/spec/commands/remove_line_item_spec.rb +2 -1
- data/decidim-budgets/spec/commands/update_project_spec.rb +4 -3
- data/decidim-budgets/spec/factories.rb +1 -0
- data/decidim-budgets/spec/features/orders_spec.rb +24 -24
- data/decidim-budgets/spec/forms/project_form_spec.rb +1 -0
- data/decidim-budgets/spec/models/project_spec.rb +1 -1
- data/decidim-budgets/spec/queries/decidim/budgets/filtered_projects_spec.rb +21 -0
- data/decidim-budgets/spec/services/project_search_spec.rb +4 -3
- data/decidim-budgets/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-budgets/spec/shared/manage_attachments_examples.rb +1 -0
- data/decidim-budgets/spec/spec_helper.rb +1 -0
- data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
- data/decidim-comments/app/commands/decidim/comments/create_comment.rb +8 -2
- data/decidim-comments/app/frontend/application/application.component.tsx +3 -3
- data/decidim-comments/app/frontend/application/icon.component.tsx +1 -1
- data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +7 -7
- data/decidim-comments/app/frontend/comments/comment.component.test.tsx +7 -7
- data/decidim-comments/app/frontend/comments/comment.component.tsx +6 -6
- data/decidim-comments/app/frontend/comments/comment_thread.component.tsx +2 -2
- data/decidim-comments/app/frontend/comments/comments.component.test.tsx +5 -5
- data/decidim-comments/app/frontend/comments/comments.component.tsx +6 -6
- data/decidim-comments/app/frontend/comments/down_vote_button.component.test.tsx +4 -4
- data/decidim-comments/app/frontend/comments/down_vote_button.component.tsx +3 -3
- data/decidim-comments/app/frontend/comments/up_vote_button.component.test.tsx +4 -4
- data/decidim-comments/app/frontend/comments/up_vote_button.component.tsx +3 -3
- data/decidim-comments/app/frontend/comments/vote_button.component.tsx +1 -1
- data/decidim-comments/app/frontend/comments/vote_button_component.test.tsx +2 -2
- data/decidim-comments/app/frontend/entry.ts +2 -2
- data/decidim-comments/app/frontend/support/generate_comments_data.ts +2 -2
- data/decidim-comments/app/frontend/support/load_translations.ts +2 -2
- data/decidim-comments/app/frontend/support/resolve_graphql_query.ts +1 -1
- data/decidim-comments/app/mailers/decidim/comments/comment_notification_mailer.rb +1 -1
- data/decidim-comments/app/models/decidim/comments/comment.rb +3 -8
- data/decidim-comments/app/models/decidim/comments/seed.rb +1 -0
- data/decidim-comments/config/locales/fr.yml +62 -1
- data/decidim-comments/db/migrate/20170504085413_add_root_commentable_to_comments.rb +7 -0
- data/decidim-comments/db/migrate/20170510091348_update_root_commentable_for_comments.rb +22 -0
- data/decidim-comments/db/migrate/20170510091409_set_root_commentable_null_constraints.rb +6 -0
- data/decidim-comments/db/seeds.rb +4 -2
- data/decidim-comments/lib/decidim/comments/engine.rb +8 -0
- data/decidim-comments/lib/decidim/comments/test/factories.rb +1 -0
- data/decidim-comments/spec/commands/create_comment_spec.rb +13 -6
- data/decidim-comments/spec/commands/vote_comment_spec.rb +2 -6
- data/decidim-comments/spec/factories.rb +1 -0
- data/decidim-comments/spec/features/notifications_spec.rb +4 -4
- data/decidim-comments/spec/features/process_admin_manages_comments_spec.rb +1 -1
- data/decidim-comments/spec/features/report_comment_spec.rb +4 -2
- data/decidim-comments/spec/helpers/comments_helper_spec.rb +3 -3
- data/decidim-comments/spec/mailers/comment_notification_mailer_spec.rb +2 -1
- data/decidim-comments/spec/models/comment_spec.rb +5 -9
- data/decidim-comments/spec/models/comment_vote_spec.rb +3 -3
- data/decidim-comments/spec/models/seed_spec.rb +1 -1
- data/decidim-comments/spec/queries/sorted_comments_spec.rb +5 -5
- data/decidim-comments/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-comments/spec/spec_helper.rb +1 -0
- data/decidim-comments/spec/types/comment_mutation_type_spec.rb +4 -12
- data/decidim-comments/spec/types/comment_type_spec.rb +4 -5
- data/decidim-comments/spec/types/commentable_mutation_type_spec.rb +2 -2
- data/decidim-comments/spec/types/mutation_type_spec.rb +4 -6
- data/decidim-comments/spec/types/query_type_spec.rb +1 -1
- data/decidim-dev/decidim-dev.gemspec +6 -6
- data/decidim-dev/lib/decidim/dev/common_rake.rb +5 -1
- data/decidim-dev/lib/decidim/dev/railtie.rb +1 -0
- data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +0 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb +4 -3
- data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +2 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb +1 -0
- data/decidim-dev/lib/generators/decidim/dummy_generator.rb +1 -1
- data/decidim-dev/lib/generators/decidim/templates/autoprefixer_initializer.rb +4 -3
- data/decidim-dev/lib/tasks/test_app.rake +1 -0
- data/decidim-meetings/app/controllers/decidim/meetings/meeting_widgets_controller.rb +1 -0
- data/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +8 -8
- data/decidim-meetings/app/helpers/decidim/meetings/map_helper.rb +9 -9
- data/decidim-meetings/app/models/decidim/meetings/meeting.rb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/meeting_widgets/show.html.erb +8 -17
- data/decidim-meetings/config/locales/fr.yml +95 -1
- data/decidim-meetings/lib/decidim/meetings/feature.rb +7 -0
- data/decidim-meetings/spec/commands/close_meeting_spec.rb +2 -1
- data/decidim-meetings/spec/commands/create_meeting_spec.rb +6 -5
- data/decidim-meetings/spec/commands/update_meeting_spec.rb +6 -5
- data/decidim-meetings/spec/factories.rb +1 -0
- data/decidim-meetings/spec/features/explore_meetings_spec.rb +2 -1
- data/decidim-meetings/spec/forms/close_meeting_form_spec.rb +1 -0
- data/decidim-meetings/spec/forms/meeting_form_spec.rb +5 -3
- data/decidim-meetings/spec/services/meeting_search_spec.rb +3 -2
- data/decidim-meetings/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-meetings/spec/shared/manage_attachments_examples.rb +1 -1
- data/decidim-meetings/spec/shared/manage_meetings_examples.rb +21 -20
- data/decidim-meetings/spec/spec_helper.rb +1 -0
- data/decidim-pages/config/locales/fr.yml +18 -1
- data/decidim-pages/decidim-pages.gemspec +1 -1
- data/decidim-pages/lib/decidim/pages/feature.rb +7 -0
- data/decidim-pages/spec/commands/create_page_spec.rb +1 -3
- data/decidim-pages/spec/factories.rb +1 -0
- data/decidim-pages/spec/spec_helper.rb +1 -0
- data/decidim-proposals/app/commands/decidim/proposals/create_proposal_export.rb +36 -0
- data/decidim-proposals/app/controllers/decidim/proposals/admin/exports_controller.rb +24 -0
- data/decidim-proposals/app/controllers/decidim/proposals/proposal_votes_controller.rb +3 -1
- data/decidim-proposals/app/controllers/decidim/proposals/proposal_widgets_controller.rb +0 -5
- data/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb +0 -1
- data/decidim-proposals/app/jobs/decidim/proposals/export_job.rb +21 -0
- data/decidim-proposals/app/models/decidim/proposals/proposal.rb +1 -1
- data/decidim-proposals/app/queries/decidim/proposals/filtered_proposals.rb +36 -0
- data/decidim-proposals/app/services/decidim/proposals/proposal_serializer.rb +72 -0
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +15 -3
- data/decidim-proposals/app/views/decidim/proposals/proposal_widgets/show.html.erb +4 -25
- data/decidim-proposals/config/locales/ca.yml +4 -0
- data/decidim-proposals/config/locales/en.yml +6 -1
- data/decidim-proposals/config/locales/es.yml +4 -0
- data/decidim-proposals/config/locales/fr.yml +146 -1
- data/decidim-proposals/decidim-proposals.gemspec +2 -2
- data/decidim-proposals/lib/decidim/proposals/admin_engine.rb +5 -0
- data/decidim-proposals/lib/decidim/proposals/feature.rb +14 -0
- data/decidim-proposals/spec/factories.rb +1 -0
- data/decidim-proposals/spec/features/admin_manages_proposals_spec.rb +1 -0
- data/decidim-proposals/spec/features/process_admin_manages_proposals_spec.rb +1 -0
- data/decidim-proposals/spec/features/proposals_spec.rb +29 -28
- data/decidim-proposals/spec/features/report_proposal_spec.rb +2 -2
- data/decidim-proposals/spec/features/vote_proposal_spec.rb +36 -32
- data/decidim-proposals/spec/helpers/proposal_order_helper_spec.rb +3 -3
- data/decidim-proposals/spec/jobs/export_job_spec.rb +57 -0
- data/decidim-proposals/spec/lib/decidim/proposals/feature_spec.rb +1 -0
- data/decidim-proposals/spec/models/decidim/proposals/proposal_vote_spec.rb +3 -3
- data/decidim-proposals/spec/queries/decidim/proposals/filtered_proposals_spec.rb +21 -0
- data/decidim-proposals/spec/services/decidim/proposals/proposal_search_spec.rb +12 -12
- data/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb +71 -0
- data/decidim-proposals/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-proposals/spec/shared/create_proposal_examples.rb +4 -3
- data/decidim-proposals/spec/shared/export_proposals_examples.rb +37 -0
- data/decidim-proposals/spec/shared/manage_proposals_examples.rb +12 -11
- data/decidim-proposals/spec/shared/proposal_form_examples.rb +9 -8
- data/decidim-proposals/spec/spec_helper.rb +1 -0
- data/decidim-results/app/controllers/decidim/results/result_widgets_controller.rb +1 -0
- data/decidim-results/app/controllers/decidim/results/results_controller.rb +1 -1
- data/decidim-results/app/queries/decidim/results/filtered_results.rb +36 -0
- data/decidim-results/app/services/decidim/results/result_stats_calculator.rb +1 -1
- data/decidim-results/app/views/decidim/results/result_widgets/show.html.erb +2 -10
- data/decidim-results/config/locales/fr.yml +75 -1
- data/decidim-results/decidim-results.gemspec +2 -2
- data/decidim-results/lib/decidim/results/feature.rb +9 -0
- data/decidim-results/spec/commands/create_result_spec.rb +4 -3
- data/decidim-results/spec/commands/update_result_spec.rb +5 -4
- data/decidim-results/spec/controllers/results_controller_spec.rb +31 -0
- data/decidim-results/spec/factories.rb +1 -0
- data/decidim-results/spec/features/explore_results_spec.rb +75 -74
- data/decidim-results/spec/forms/result_form_spec.rb +2 -1
- data/decidim-results/spec/queries/decidim/results/filtered_results_spec.rb +21 -0
- data/decidim-results/spec/services/result_search_spec.rb +4 -3
- data/decidim-results/spec/services/result_stats_calculator_spec.rb +1 -0
- data/decidim-results/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-results/spec/spec_helper.rb +1 -0
- data/decidim-system/config/locales/fr.yml +64 -1
- data/decidim-system/decidim-system.gemspec +3 -3
- data/decidim-system/spec/factories.rb +1 -0
- data/decidim-system/spec/spec_helper.rb +1 -0
- data/docs/how_to_create_a_plugin.md +117 -139
- data/lib/generators/decidim/install_generator.rb +1 -1
- data/package.json +30 -31
- data/tslint.json +1 -2
- data/webpack.config.js +2 -3
- data/yarn.lock +976 -1326
- metadata +68 -31
- data/decidim-admin/yarn.lock +0 -4
- data/decidim-api/.gitignore +0 -7
- data/decidim-budgets/.gitignore +0 -7
- data/decidim-meetings/.gitignore +0 -7
- data/decidim-pages/.gitignore +0 -3
- data/decidim-proposals/.gitignore +0 -3
- data/decidim-results/.gitignore +0 -7
@@ -2,7 +2,6 @@
|
|
2
2
|
ENV["RAILS_ENV"] ||= "test"
|
3
3
|
|
4
4
|
root_path = File.join(Dir.pwd, "..")
|
5
|
-
engine_name = ENV["ENGINE_NAME"]
|
6
5
|
engine_spec_dir = File.join(Dir.pwd, "spec")
|
7
6
|
dummy_app_path = File.expand_path(File.join(root_path, "spec", "decidim_dummy_app"))
|
8
7
|
|
@@ -46,4 +45,3 @@ Dir["#{engine_spec_dir}/support/**/*.rb"].each { |f| require f }
|
|
46
45
|
Dir["#{engine_spec_dir}/shared/**/*.rb"].each { |f| require f }
|
47
46
|
|
48
47
|
require_relative "spec_helper"
|
49
|
-
require_relative "i18n_spec"
|
@@ -1,11 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
RSpec.configure do |config|
|
2
3
|
config.before(:each) do
|
3
4
|
# Set geocoder configuration in test mode
|
4
5
|
Decidim.geocoder = {
|
5
6
|
static_map_url: "http://www.example.org",
|
6
|
-
here_app_id:
|
7
|
-
here_app_code:
|
7
|
+
here_app_id: "1234",
|
8
|
+
here_app_code: "5678"
|
8
9
|
}
|
9
10
|
Geocoder.configure(lookup: :test)
|
10
11
|
end
|
11
|
-
end
|
12
|
+
end
|
@@ -5,8 +5,8 @@ RSpec.configure do |config|
|
|
5
5
|
end
|
6
6
|
|
7
7
|
config.around(:each) do |example|
|
8
|
-
I18n.available_locales = %w
|
9
|
-
Decidim.available_locales = %w
|
8
|
+
I18n.available_locales = %w(en ca es)
|
9
|
+
Decidim.available_locales = %w(en ca es)
|
10
10
|
|
11
11
|
previous_locale = I18n.locale
|
12
12
|
example.run
|
@@ -61,7 +61,7 @@ module Decidim
|
|
61
61
|
|
62
62
|
def test_env
|
63
63
|
gsub_file "#{dummy_app_path}/config/environments/test.rb",
|
64
|
-
|
64
|
+
/allow_forgery_protection = (.*)/, "allow_forgery_protection = true"
|
65
65
|
end
|
66
66
|
|
67
67
|
private
|
@@ -1,6 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module AutoprefixerRails
|
2
3
|
class Sprockets
|
3
|
-
|
4
|
+
singleton_class.send(:alias_method, :call_original, :call)
|
4
5
|
|
5
6
|
def self.call(input)
|
6
7
|
filename = input[:name]
|
@@ -8,9 +9,9 @@ module AutoprefixerRails
|
|
8
9
|
# Disable autoprefixer for the graphiql-rails gem's assets because it
|
9
10
|
# breaks some of the API tests when the '-webkit' prefixes are applied to
|
10
11
|
# its CSS.
|
11
|
-
return if filename
|
12
|
+
return if filename =~ %r{^graphiql/.*}
|
12
13
|
|
13
|
-
|
14
|
+
call_original(input)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
@@ -11,14 +11,14 @@ module Decidim
|
|
11
11
|
helper_method :meetings, :geocoded_meetings, :meeting
|
12
12
|
|
13
13
|
def index
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
return unless search.results.empty? && params.dig("filter", "date") != "past"
|
15
|
+
|
16
|
+
@past_meetings = search_klass.new(search_params.merge(date: "past"))
|
17
|
+
unless @past_meetings.results.empty?
|
18
|
+
params[:filter] ||= {}
|
19
|
+
params[:filter][:date] = "past"
|
20
|
+
@forced_past_meetings = true
|
21
|
+
@search = @past_meetings
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -9,15 +9,15 @@ module Decidim
|
|
9
9
|
def meetings_data_for_map(geocoded_meetings)
|
10
10
|
geocoded_meetings.map do |meeting|
|
11
11
|
meeting.slice(:latitude, :longitude, :address).merge(title: translated_attribute(meeting.title),
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
description: translated_attribute(meeting.description),
|
13
|
+
startTimeDay: l(meeting.start_time, format: "%d"),
|
14
|
+
startTimeMonth: l(meeting.start_time, format: "%B"),
|
15
|
+
startTimeYear: l(meeting.start_time, format: "%Y"),
|
16
|
+
startTime: "#{meeting.start_time.strftime("%H:%M")} - #{meeting.end_time.strftime("%H:%M")}",
|
17
|
+
icon: icon("meetings", width: 40, height: 70, remove_icon_class: true),
|
18
|
+
location: translated_attribute(meeting.location),
|
19
|
+
locationHints: translated_attribute(meeting.location_hints),
|
20
|
+
link: meeting_path(meeting))
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -16,7 +16,7 @@ module Decidim
|
|
16
16
|
|
17
17
|
validates :title, presence: true
|
18
18
|
|
19
|
-
geocoded_by :address, http_headers:
|
19
|
+
geocoded_by :address, http_headers: ->(proposal) { { "Referer" => proposal.feature.organization.host } }
|
20
20
|
|
21
21
|
def closed?
|
22
22
|
closed_at.present?
|
@@ -1,18 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= render partial: "decidim/meetings/meetings/tags", locals: { meeting: model } %>
|
10
|
-
<div class="address card__extra">
|
11
|
-
<div class="address__icon">
|
12
|
-
<%= icon "meetings", remove_icon_class: true, width: 40, height: 70 %>
|
13
|
-
</div>
|
14
|
-
<%= render partial: "decidim/shared/address_details", locals: { icon_name: "meetings", geolocalizable: model } %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
</article>
|
1
|
+
<%= content_for(:title, translated_attribute(model.title)) %>
|
2
|
+
<%= render partial: "decidim/meetings/meetings/datetime", locals: { meeting: model } %>
|
3
|
+
<%== translated_attribute model.description %>
|
4
|
+
<div class="address card__extra">
|
5
|
+
<div class="address__icon">
|
6
|
+
<%= icon "meetings", remove_icon_class: true, width: 40, height: 70 %>
|
7
|
+
</div>
|
8
|
+
<%= render partial: "decidim/shared/address_details", locals: { icon_name: "meetings", geolocalizable: model } %>
|
18
9
|
</div>
|
@@ -2,4 +2,98 @@ fr:
|
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
4
|
close_meeting:
|
5
|
-
attendees_count: Nombre de participants
|
5
|
+
attendees_count: Nombre de participants
|
6
|
+
attending_organizations: Liste des organisations qui ont assisté à la rencontre
|
7
|
+
closing_report: Signaler
|
8
|
+
contributions_count: Nombre de contributions
|
9
|
+
proposal_ids: Propositions créées lors de la rencontre
|
10
|
+
meeting:
|
11
|
+
address: Adresse
|
12
|
+
decidim_category_id: Catégorie
|
13
|
+
decidim_scope_id: Domaine d'application
|
14
|
+
description: Description
|
15
|
+
end_time: Heure de fin
|
16
|
+
location: Lieu
|
17
|
+
location_hints: Indicateurs d’emplacement
|
18
|
+
start_time: Heure de début
|
19
|
+
title: Titre
|
20
|
+
decidim:
|
21
|
+
features:
|
22
|
+
meetings:
|
23
|
+
name: Rencontres
|
24
|
+
meetings:
|
25
|
+
actions:
|
26
|
+
attachments: Documents liés
|
27
|
+
close: Fermer
|
28
|
+
confirm_destroy: Êtes-vous sûr de vouloir supprimer cette rencontre?
|
29
|
+
destroy: Supprimer
|
30
|
+
edit: Modifier
|
31
|
+
new: Nouveau
|
32
|
+
preview: Aperçu
|
33
|
+
title: Actions
|
34
|
+
admin:
|
35
|
+
meeting_closes:
|
36
|
+
edit:
|
37
|
+
close: Fermer
|
38
|
+
title: Clore la rencontre
|
39
|
+
meetings:
|
40
|
+
close:
|
41
|
+
invalid: Il y a eu un problème au moment de clore cette réunion
|
42
|
+
success: Rencontre cloturée avec succès
|
43
|
+
create:
|
44
|
+
invalid: Il y a eu un problème lors de la création de cette rencontre
|
45
|
+
success: Rencontre créée avec succès
|
46
|
+
destroy:
|
47
|
+
success: La rencontre a été supprimée avec succès
|
48
|
+
edit:
|
49
|
+
update: Mettre à jour
|
50
|
+
index:
|
51
|
+
title: Rencontres
|
52
|
+
new:
|
53
|
+
create: Créer
|
54
|
+
title: Créer une rencontre
|
55
|
+
update:
|
56
|
+
invalid: Il y a eu un problème lors de la mise à jour de cette rencontre
|
57
|
+
success: Réncontre mise à jour avec succès
|
58
|
+
models:
|
59
|
+
meeting:
|
60
|
+
name: Rencontre
|
61
|
+
meetings:
|
62
|
+
filters:
|
63
|
+
category: Catégorie
|
64
|
+
category_prompt: Sélectionner une catégorie
|
65
|
+
date: Date
|
66
|
+
past: Passées
|
67
|
+
scopes: Domaines d'application
|
68
|
+
search: Rechercher
|
69
|
+
upcoming: À venir
|
70
|
+
filters_small_view:
|
71
|
+
close_modal: Fermer la fenêtre de dialogue
|
72
|
+
filter: Filtrer
|
73
|
+
filter_by: Filtrer par
|
74
|
+
unfold: Déplier
|
75
|
+
index:
|
76
|
+
view_meeting: Voir la rencontre
|
77
|
+
meetings:
|
78
|
+
no_meetings_warning: Aucune rencontre ne correspond à vos critères de recherche ou aucune rencontre n'est prévue.
|
79
|
+
upcoming_meetings_warning: À l'heure actuelle, il n'y a pas de rencontre planifiées, mais ici, vous trouverez une liste de toutes les réunions passées.
|
80
|
+
show:
|
81
|
+
attendees: Nombre de participants
|
82
|
+
contributions: Décompte des contributions
|
83
|
+
meeting_report: Compte rendu de la rencontre
|
84
|
+
organizations: Organisations participantes
|
85
|
+
models:
|
86
|
+
meeting:
|
87
|
+
fields:
|
88
|
+
closed: Clos
|
89
|
+
end_time: Heure de fin
|
90
|
+
map: Carte
|
91
|
+
start_time: Date de début
|
92
|
+
title: Titre
|
93
|
+
resource_links:
|
94
|
+
meetings_through_proposals:
|
95
|
+
meeting_results: 'Résultats associés :'
|
96
|
+
result_meetings: 'Rencontres connexes :'
|
97
|
+
proposals_from_meeting:
|
98
|
+
meeting_proposals: 'Propositions connexes :'
|
99
|
+
proposal_meetings: 'Rencontre connexes :'
|
@@ -16,6 +16,13 @@ Decidim.register_feature(:meetings) do |feature|
|
|
16
16
|
resource.template = "decidim/meetings/meetings/linked_meetings"
|
17
17
|
end
|
18
18
|
|
19
|
+
feature.register_stat :meetings_count, primary: true, priority: Decidim::StatsRegistry::MEDIUM_PRIORITY do |features, start_at, end_at|
|
20
|
+
meetings = Decidim::Meetings::Meeting.where(feature: features)
|
21
|
+
meetings = meetings.where("created_at >= ?", start_at) if start_at.present?
|
22
|
+
meetings = meetings.where("created_at <= ?", end_at) if end_at.present?
|
23
|
+
meetings.count
|
24
|
+
end
|
25
|
+
|
19
26
|
feature.seeds do
|
20
27
|
Decidim::ParticipatoryProcess.all.each do |process|
|
21
28
|
next unless process.steps.any?
|
@@ -1,10 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe Decidim::Meetings::Admin::CloseMeeting do
|
4
5
|
let(:meeting) { create :meeting }
|
5
6
|
let(:form) do
|
6
7
|
double(
|
7
|
-
|
8
|
+
invalid?: invalid,
|
8
9
|
closing_report: { en: "Great meeting" },
|
9
10
|
attendees_count: 10,
|
10
11
|
contributions_count: 15,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe Decidim::Meetings::Admin::CreateMeeting do
|
@@ -12,11 +13,11 @@ describe Decidim::Meetings::Admin::CreateMeeting do
|
|
12
13
|
let(:longitude) { 2.1234 }
|
13
14
|
let(:form) do
|
14
15
|
double(
|
15
|
-
|
16
|
-
title: {en: "title"},
|
17
|
-
description: {en: "description"},
|
18
|
-
location: {en: "location"},
|
19
|
-
location_hints: {en: "location_hints"},
|
16
|
+
invalid?: invalid,
|
17
|
+
title: { en: "title" },
|
18
|
+
description: { en: "description" },
|
19
|
+
location: { en: "location" },
|
20
|
+
location_hints: { en: "location_hints" },
|
20
21
|
start_time: 1.day.from_now,
|
21
22
|
end_time: 1.day.from_now + 1.hour,
|
22
23
|
address: address,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe Decidim::Meetings::Admin::UpdateMeeting do
|
@@ -11,11 +12,11 @@ describe Decidim::Meetings::Admin::UpdateMeeting do
|
|
11
12
|
let(:longitude) { 2.1234 }
|
12
13
|
let(:form) do
|
13
14
|
double(
|
14
|
-
|
15
|
-
title: {en: "title"},
|
16
|
-
description: {en: "description"},
|
17
|
-
location: {en: "location"},
|
18
|
-
location_hints: {en: "location_hints"},
|
15
|
+
invalid?: invalid,
|
16
|
+
title: { en: "title" },
|
17
|
+
description: { en: "description" },
|
18
|
+
location: { en: "location" },
|
19
|
+
location_hints: { en: "location_hints" },
|
19
20
|
start_time: 1.day.from_now,
|
20
21
|
end_time: 1.day.from_now + 1.hour,
|
21
22
|
scope: scope,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe "Explore meetings", type: :feature do
|
@@ -83,7 +84,7 @@ describe "Explore meetings", type: :feature do
|
|
83
84
|
end
|
84
85
|
|
85
86
|
context "No meetings scheduled" do
|
86
|
-
let!(:meetings){ [] }
|
87
|
+
let!(:meetings) { [] }
|
87
88
|
|
88
89
|
it "shows the correct warning" do
|
89
90
|
visit_feature
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# frozen_literal_string: true
|
2
3
|
|
3
4
|
require "spec_helper"
|
@@ -52,9 +53,10 @@ describe Decidim::Meetings::Admin::MeetingForm do
|
|
52
53
|
end
|
53
54
|
|
54
55
|
before do
|
55
|
-
Geocoder::Lookup::Test.add_stub(
|
56
|
-
|
57
|
-
|
56
|
+
Geocoder::Lookup::Test.add_stub(
|
57
|
+
address,
|
58
|
+
[{ "latitude" => latitude, "longitude" => longitude }]
|
59
|
+
)
|
58
60
|
end
|
59
61
|
|
60
62
|
subject { described_class.from_params(attributes).with_context(context) }
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe Decidim::Meetings::MeetingSearch do
|
@@ -39,7 +40,7 @@ describe Decidim::Meetings::MeetingSearch do
|
|
39
40
|
let(:default_params) { { feature: nil } }
|
40
41
|
|
41
42
|
it "raises an error" do
|
42
|
-
expect{ subject.results }.to raise_error(StandardError, "Missing feature")
|
43
|
+
expect { subject.results }.to raise_error(StandardError, "Missing feature")
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
@@ -103,7 +104,7 @@ describe Decidim::Meetings::MeetingSearch do
|
|
103
104
|
end
|
104
105
|
|
105
106
|
context "when `global` is being sent" do
|
106
|
-
let!(:resource_without_scope) { create(:meeting, feature: current_feature, scope: nil)}
|
107
|
+
let!(:resource_without_scope) { create(:meeting, feature: current_feature, scope: nil) }
|
107
108
|
let(:params) { default_params.merge(scope_id: ["global"]) }
|
108
109
|
|
109
110
|
it "returns resources without a scope" do
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "decidim/admin/test/manage_attachments_examples"
|
2
3
|
|
3
4
|
RSpec.shared_examples "manage meetings attachments" do
|
@@ -8,7 +9,6 @@ RSpec.shared_examples "manage meetings attachments" do
|
|
8
9
|
login_as user, scope: :user
|
9
10
|
visit decidim_admin.manage_feature_path(participatory_process_id: participatory_process, feature_id: current_feature)
|
10
11
|
within find("tr", text: translated(meeting.title)) do
|
11
|
-
|
12
12
|
find("a.action-icon--attachments").click
|
13
13
|
end
|
14
14
|
end
|
@@ -6,14 +6,15 @@ RSpec.shared_examples "manage meetings" do
|
|
6
6
|
let(:longitude) { 2.1234 }
|
7
7
|
|
8
8
|
before do
|
9
|
-
Geocoder::Lookup::Test.add_stub(
|
10
|
-
|
11
|
-
|
9
|
+
Geocoder::Lookup::Test.add_stub(
|
10
|
+
address,
|
11
|
+
[{ "latitude" => latitude, "longitude" => longitude }]
|
12
|
+
)
|
12
13
|
end
|
13
14
|
|
14
15
|
it "updates a meeting" do
|
15
16
|
within find("tr", text: translated(meeting.title)) do
|
16
|
-
page.find(
|
17
|
+
page.find("a.action-icon--edit").click
|
17
18
|
end
|
18
19
|
|
19
20
|
within ".edit_meeting" do
|
@@ -86,14 +87,14 @@ RSpec.shared_examples "manage meetings" do
|
|
86
87
|
fill_in :meeting_address, with: address
|
87
88
|
|
88
89
|
page.execute_script("$('#datetime_field_meeting_start_time').focus()")
|
89
|
-
page.find(
|
90
|
-
page.find(
|
91
|
-
page.find(
|
90
|
+
page.find(".datepicker-dropdown .day", text: "12").click
|
91
|
+
page.find(".datepicker-dropdown .hour", text: "10:00").click
|
92
|
+
page.find(".datepicker-dropdown .minute", text: "10:50").click
|
92
93
|
|
93
94
|
page.execute_script("$('#datetime_field_meeting_end_time').focus()")
|
94
|
-
page.find(
|
95
|
-
page.find(
|
96
|
-
page.find(
|
95
|
+
page.find(".datepicker-dropdown .day", text: "12").click
|
96
|
+
page.find(".datepicker-dropdown .hour", text: "12:00").click
|
97
|
+
page.find(".datepicker-dropdown .minute", text: "12:50").click
|
97
98
|
|
98
99
|
select scope.name, from: :meeting_decidim_scope_id
|
99
100
|
select translated(category.name), from: :meeting_decidim_category_id
|
@@ -120,7 +121,7 @@ RSpec.shared_examples "manage meetings" do
|
|
120
121
|
|
121
122
|
it "deletes a meeting" do
|
122
123
|
within find("tr", text: translated(meeting2.title)) do
|
123
|
-
page.find(
|
124
|
+
page.find("a.action-icon--remove").click
|
124
125
|
end
|
125
126
|
|
126
127
|
within ".callout-wrapper" do
|
@@ -140,7 +141,7 @@ RSpec.shared_examples "manage meetings" do
|
|
140
141
|
|
141
142
|
it "updates a meeting" do
|
142
143
|
within find("tr", text: translated(meeting.title)) do
|
143
|
-
page.find(
|
144
|
+
page.find("a.action-icon--edit").click
|
144
145
|
end
|
145
146
|
|
146
147
|
within ".edit_meeting" do
|
@@ -199,14 +200,14 @@ RSpec.shared_examples "manage meetings" do
|
|
199
200
|
|
200
201
|
fill_in :meeting_address, with: address
|
201
202
|
page.execute_script("$('#datetime_field_meeting_start_time').focus()")
|
202
|
-
page.find(
|
203
|
-
page.find(
|
204
|
-
page.find(
|
203
|
+
page.find(".datepicker-dropdown .day", text: "12").click
|
204
|
+
page.find(".datepicker-dropdown .hour", text: "10:00").click
|
205
|
+
page.find(".datepicker-dropdown .minute", text: "10:50").click
|
205
206
|
|
206
207
|
page.execute_script("$('#datetime_field_meeting_end_time').focus()")
|
207
|
-
page.find(
|
208
|
-
page.find(
|
209
|
-
page.find(
|
208
|
+
page.find(".datepicker-dropdown .day", text: "12").click
|
209
|
+
page.find(".datepicker-dropdown .hour", text: "12:00").click
|
210
|
+
page.find(".datepicker-dropdown .minute", text: "12:50").click
|
210
211
|
|
211
212
|
select scope.name, from: :meeting_decidim_scope_id
|
212
213
|
select translated(category.name), from: :meeting_decidim_category_id
|
@@ -233,7 +234,7 @@ RSpec.shared_examples "manage meetings" do
|
|
233
234
|
|
234
235
|
it "closes a meeting with a report" do
|
235
236
|
within find("tr", text: translated(meeting.title)) do
|
236
|
-
page.find(
|
237
|
+
page.find("a.action-icon--close").click
|
237
238
|
end
|
238
239
|
|
239
240
|
within ".edit_close_meeting" do
|
@@ -267,7 +268,7 @@ RSpec.shared_examples "manage meetings" do
|
|
267
268
|
|
268
269
|
it "can update the information" do
|
269
270
|
within find("tr", text: translated(meeting.title)) do
|
270
|
-
page.find(
|
271
|
+
page.find("a.action-icon--close").click
|
271
272
|
end
|
272
273
|
|
273
274
|
within ".edit_close_meeting" do
|