Module: Integral

Defined in:
lib/integral.rb,
lib/integral/engine.rb,
lib/integral/router.rb,
lib/integral/version.rb,
app/models/integral/link.rb,
app/models/integral/list.rb,
app/models/integral/page.rb,
app/models/integral/post.rb,
app/models/integral/role.rb,
app/models/integral/user.rb,
app/models/integral/basic.rb,
app/models/integral/object.rb,
lib/integral/list_renderer.rb,
app/models/integral/enquiry.rb,
app/models/integral/version.rb,
app/models/integral/category.rb,
app/models/integral/settings.rb,
app/models/integral/list_item.rb,
lib/integral/acts_as_integral.rb,
lib/integral/acts_as_listable.rb,
lib/integral/grids/files_grid.rb,
lib/integral/grids/lists_grid.rb,
lib/integral/grids/pages_grid.rb,
lib/integral/grids/posts_grid.rb,
lib/integral/grids/users_grid.rb,
lib/integral/breadcrumb_builder.rb,
lib/integral/google_tag_manager.rb,
lib/integral/list_item_renderer.rb,
app/helpers/integral/blog_helper.rb,
app/helpers/integral/mail_helper.rb,
app/models/integral/list_version.rb,
app/models/integral/page_version.rb,
app/models/integral/post_version.rb,
app/models/integral/post_viewing.rb,
app/models/integral/storage/file.rb,
app/models/integral/user_version.rb,
lib/integral/chart_renderer/base.rb,
lib/integral/chart_renderer/line.rb,
app/jobs/integral/application_job.rb,
app/models/integral/webhook/event.rb,
app/policies/integral/base_policy.rb,
app/policies/integral/list_policy.rb,
app/policies/integral/page_policy.rb,
app/policies/integral/post_policy.rb,
app/policies/integral/user_policy.rb,
lib/integral/chart_renderer/donut.rb,
lib/integral/swiper_list_renderer.rb,
app/helpers/integral/social_helper.rb,
app/mailers/integral/devise_mailer.rb,
lib/integral/grids/activities_grid.rb,
app/helpers/integral/gallery_helper.rb,
app/helpers/integral/support_helper.rb,
app/mailers/integral/contact_mailer.rb,
app/models/integral/role_assignment.rb,
lib/integral/grids/block_lists_grid.rb,
app/models/integral/category_version.rb,
app/models/integral/webhook/endpoint.rb,
app/policies/integral/version_policy.rb,
lib/integral/middleware/alias_router.rb,
app/models/integral/newsletter_signup.rb,
app/policies/integral/category_policy.rb,
app/policies/integral/settings_policy.rb,
app/decorators/integral/base_decorator.rb,
app/decorators/integral/list_decorator.rb,
app/decorators/integral/page_decorator.rb,
app/decorators/integral/post_decorator.rb,
app/decorators/integral/user_decorator.rb,
app/jobs/integral/webhook/delivery_job.rb,
app/models/integral/application_record.rb,
app/models/integral/resource_alternate.rb,
app/helpers/integral/application_helper.rb,
app/jobs/integral/newsletter_signup_job.rb,
lib/generators/integral/views_generator.rb,
lib/integral/partial_list_item_renderer.rb,
app/controllers/integral/blog_controller.rb,
app/controllers/integral/tags_controller.rb,
app/helpers/integral/backend/base_helper.rb,
app/models/integral/list_item_connection.rb,
app/models/integral/storage/file_version.rb,
app/serializers/integral/post_serializer.rb,
lib/generators/integral/assets_generator.rb,
app/controllers/integral/pages_controller.rb,
app/controllers/integral/posts_controller.rb,
app/decorators/integral/version_decorator.rb,
app/policies/integral/storage/file_policy.rb,
lib/generators/integral/install_generator.rb,
app/decorators/integral/category_decorator.rb,
lib/integral/bootstrap_pagination_renderer.rb,
app/controllers/integral/contact_controller.rb,
app/decorators/integral/paginating_decorator.rb,
app/models/concerns/integral/webhook/delivery.rb,
app/models/integral/notification/notification.rb,
app/models/integral/notification/subscription.rb,
app/controllers/integral/categories_controller.rb,
app/decorators/integral/storage/file_decorator.rb,
app/controllers/integral/application_controller.rb,
app/models/concerns/integral/webhook/observable.rb,
app/controllers/integral/backend/base_controller.rb,
app/controllers/integral/backend/lists_controller.rb,
app/controllers/integral/backend/pages_controller.rb,
app/controllers/integral/backend/posts_controller.rb,
app/controllers/integral/backend/users_controller.rb,
lib/integral/bootstrap_pagination_button_renderer.rb,
app/controllers/integral/backend/settings_controller.rb,
app/jobs/integral/storage/process_image_variants_job.rb,
app/controllers/integral/backend/activities_controller.rb,
app/controllers/integral/backend/categories_controller.rb,
app/models/concerns/integral/notification/subscribable.rb,
app/controllers/integral/backend/block_lists_controller.rb,
app/controllers/integral/backend/static_pages_controller.rb,
app/controllers/integral/backend/storage_files_controller.rb,
app/decorators/integral/notification/notification_decorator.rb,
app/controllers/integral/backend/notification_subscriptions_controller.rb

Overview

Integral namespace

Defined Under Namespace

Modules: ActsAsIntegral, ActsAsListable, ApplicationHelper, Backend, BlogHelper, ChartRenderer, GalleryHelper, Generators, Grids, MailHelper, Middleware, Notification, SocialHelper, Storage, SupportHelper, Webhook Classes: ApplicationController, ApplicationJob, ApplicationRecord, BaseDecorator, BasePolicy, Basic, BlogController, BootstrapPaginationButtonRenderer, BootstrapPaginationRenderer, BreadcrumbBuilder, CategoriesController, Category, CategoryDecorator, CategoryPolicy, CategoryVersion, ContactController, ContactMailer, DeviseMailer, Engine, Enquiry, GoogleTagManager, Link, List, ListDecorator, ListItem, ListItemConnection, ListItemRenderer, ListPolicy, ListRenderer, ListVersion, NewsletterSignup, NewsletterSignupJob, Object, Page, PageDecorator, PagePolicy, PageVersion, PagesController, PaginatingDecorator, PartialListItemRenderer, Post, PostDecorator, PostPolicy, PostSerializer, PostVersion, PostViewing, PostsController, ResourceAlternate, Role, RoleAssignment, Router, Settings, SettingsPolicy, SwiperListRenderer, TagsController, User, UserDecorator, UserPolicy, UserVersion, Version, VersionDecorator, VersionPolicy

Constant Summary collapse

ROOT_PATH =
Pathname.new(File.join(__dir__, ".."))
VERSION =

Integral Version

'2.0.0'.freeze
@@backend_namespace =
'admin'
@@backend_locales =
[:en]
@@frontend_locales =
[:en]
@@additional_settings =
{}
@@additional_post_params =
[]
@@additional_page_params =
[]
@@gtm_container_id =
''
@@blog_enabled =
true
@@blog_namespace =
'blog'
@@black_listed_paths =
['/admin']
@@root_path =
nil
@@frontend_parent_controller =
'Integral::ApplicationController'
@@image_sizes =
{
  thumbnail: [50, 50],
  small: [500, 500],
  medium: [800, 800],
  large: [1600, 1600]
}
@@image_transformation_options =
{
  format: :jpeg,
  sampling_factor: "4:2:0",
  strip: true,
  interlace: "JPEG",
  colorspace: "sRGB",
  quality: 80
}
@@additional_page_templates =
[]
@@compression_enabled =
true
@@image_compression_quality =
85
@@editable_persisted_images =
false
@@description_length_maximum =
300
@@description_length_minimum =
50
@@title_length_maximum =
60
@@title_length_minimum =
4
@@accepted_file_types =
['application/pdf', 'image/*', 'video/*']
@@maximum_file_size =

100MB

104857600

Class Method Summary collapse

Class Method Details

.blog_enabled?Boolean

Returns Shortcut to find out if blog is enabled.

Returns:

  • (Boolean)

    Shortcut to find out if blog is enabled



137
138
139
# File 'lib/integral.rb', line 137

def self.blog_enabled?
  Integral.blog_enabled == true
end

.compression_enabled?Boolean

Returns Compression status.

Returns:

  • (Boolean)

    Compression status



142
143
144
# File 'lib/integral.rb', line 142

def self.compression_enabled?
  Integral.compression_enabled == true
end

.configure {|_self| ... } ⇒ Object

Enables engine configuration

Yields:

  • (_self)

Yield Parameters:

  • _self (Integral)

    the object that the method was called on



43
44
45
# File 'lib/integral.rb', line 43

def self.configure
  yield(self)
end

.dynamic_homepage_enabled?Boolean

Returns Enables Dynamic Routing of the homepage using Integral::Middleware::Router.

Returns:

  • (Boolean)

    Enables Dynamic Routing of the homepage using Integral::Middleware::Router



147
148
149
# File 'lib/integral.rb', line 147

def self.dynamic_homepage_enabled?
  Integral.root_path.nil?
end

.multilingual_frontend?Boolean

Returns Whether or not the frontend is multilingual.

Returns:

  • (Boolean)

    Whether or not the frontend is multilingual



132
133
134
# File 'lib/integral.rb', line 132

def self.multilingual_frontend?
  Integral.frontend_locales.count > 1
end

.webpackerObject



34
35
36
37
38
39
# File 'lib/integral.rb', line 34

def webpacker
  @webpacker ||= ::Webpacker::Instance.new(
    root_path: ROOT_PATH,
    config_path: ROOT_PATH.join("config/webpacker.yml")
  )
end