Sha256: f3eeddf42d1e5dc0a0a44375677c24c587d77d1c958871f91e53f91d08d8e3a1

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

Decidim::DecidimAwesome.configure do |config|
  if ENV.fetch("FEATURES", nil) == "disabled"
    [
      :allow_images_in_full_editor,
      :allow_images_in_small_editor,
      :allow_images_in_proposals,
      :use_markdown_editor,
      :allow_images_in_markdown_editor,
      :auto_save_forms,
      :intergram_for_admins,
      :intergram_for_public,
      :scoped_styles,
      :proposal_custom_fields,
      :menu,
      :scoped_admins,
      :custom_redirects,
      :validate_title_min_length,
      :validate_title_max_caps_percent,
      :validate_title_max_marks_together,
      :validate_title_start_with_caps,
      :validate_body_min_length,
      :validate_body_max_caps_percent,
      :validate_body_max_marks_together,
      :validate_body_start_with_caps,
      :weighted_proposal_voting,
      :additional_proposal_scopes
    ].each do |conf|
      config.send("#{conf}=", :disabled)
    end

    config.disabled_components = [:awesome_map, :awesome_iframe]
  end
end

if Decidim::DecidimAwesome.legacy_version?
  Rails.application.config.to_prepare do
    Decidim::Api::Schema.max_complexity = 5000
    Decidim::Api::Schema.max_depth = 50
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-decidim_awesome-0.10.2 lib/decidim/decidim_awesome/test/initializer.rb
decidim-decidim_awesome-0.10.1 lib/decidim/decidim_awesome/test/initializer.rb
decidim-decidim_awesome-0.10.0 lib/decidim/decidim_awesome/test/initializer.rb