Module: Decidim::DecidimAwesome::Admin::SystemCheckerHelpers
- Defined in:
- app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb
Instance Method Summary collapse
- #decidim_version ⇒ Object
- #decidim_version_valid? ⇒ Boolean
- #exists?(spec, file) ⇒ Boolean
- #images_migrated? ⇒ Boolean
- #overrides ⇒ Object
- #pending_image_migrations ⇒ Object
- #valid?(spec, file) ⇒ Boolean
Instance Method Details
#decidim_version ⇒ Object
7 8 9 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 7 def decidim_version Decidim.version end |
#decidim_version_valid? ⇒ Boolean
11 12 13 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 11 def decidim_version_valid? @decidim_version_valid ||= Gem::Dependency.new("", DecidimAwesome::COMPAT_DECIDIM_VERSION).match?("", decidim_version, true) end |
#exists?(spec, file) ⇒ Boolean
19 20 21 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 19 def exists?(spec, file) SystemChecker.exists?(spec, file) end |
#images_migrated? ⇒ Boolean
27 28 29 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 27 def images_migrated? pending_image_migrations.zero? end |
#overrides ⇒ Object
15 16 17 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 15 def overrides SystemChecker.to_h end |
#pending_image_migrations ⇒ Object
31 32 33 34 35 36 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 31 def pending_image_migrations @pending_image_migrations ||= begin images = Decidim::DecidimAwesome::EditorImage.where(organization: current_organization) images.count - images.joins(:file_attachment).count end end |
#valid?(spec, file) ⇒ Boolean
23 24 25 |
# File 'app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb', line 23 def valid?(spec, file) SystemChecker.valid?(spec, file) end |