Module: Pulitzer

Defined in:
lib/pulitzer.rb,
lib/pulitzer/engine.rb,
lib/pulitzer/version.rb,
app/models/pulitzer/tag.rb,
lib/pulitzer/exceptions.rb,
app/models/pulitzer/post.rb,
app/models/pulitzer/style.rb,
app/models/pulitzer/partial.rb,
app/models/pulitzer/version.rb,
app/models/pulitzer/post_tag.rb,
app/models/pulitzer/partial_tag.rb,
lib/pulitzer/controller_helpers.rb,
app/helpers/pulitzer/main_helper.rb,
app/models/pulitzer/partial_type.rb,
app/helpers/pulitzer/posts_helper.rb,
app/models/pulitzer/custom_option.rb,
app/jobs/pulitzer/clone_version_job.rb,
app/models/pulitzer/content_element.rb,
lib/pulitzer/content_element_helper.rb,
app/models/pulitzer/background_style.rb,
app/models/pulitzer/arrangement_style.rb,
app/models/pulitzer/free_form_section.rb,
app/models/pulitzer/post_type_element.rb,
app/models/pulitzer/custom_option_list.rb,
app/models/pulitzer/justification_style.rb,
app/models/pulitzer/sequence_flow_style.rb,
app/controllers/pulitzer/tags_controller.rb,
app/models/pulitzer/content_element_type.rb,
app/jobs/pulitzer/clone_post_type_version.rb,
app/models/pulitzer/free_form_section_type.rb,
lib/generators/pulitzer/post_type_generator.rb,
app/jobs/pulitzer/reprocess_content_image_job.rb,
app/validators/pulitzer/content_element_validator.rb,
app/controllers/pulitzer/custom_options_controller.rb,
app/models/pulitzer/post_type_content_element_type.rb,
app/controllers/pulitzer/custom_option_lists_controller.rb

Defined Under Namespace

Modules: ContentElementHelper, ControllerHelpers, MainHelper, PostTypeElement, PostsHelper Classes: ApplicationController, ApplicationRecord, ArrangementStyle, ArrangementStylesController, BackgroundStyle, BackgroundStylesController, BaseUploader, ClonePostTypeVersion, CloneVersion, CloneVersionJob, ContentElement, ContentElementType, ContentElementValidator, ContentElementsController, CreateFreeFormSectionPartials, CreatePartialContentElements, CreatePostContentElements, CreatePostTag, CreatePostTypeContentElements, CreatePostTypeFreeFormSections, CreateSingletonPost, CustomOption, CustomOptionList, CustomOptionListsController, CustomOptionsController, DestroyPostTypeContentElements, DestroyPostTypeFreeFormSections, Engine, FreeFormSection, FreeFormSectionType, FreeFormSectionTypesController, GeneratorElementType, ImageUploader, JustificationStyle, JustificationStylesController, LayoutsController, Partial, PartialTag, PartialTagsController, PartialType, PartialTypesController, PartialsController, Post, PostTag, PostTagsController, PostType, PostTypeContentElementType, PostTypeContentElementTypesController, PostTypeGenerator, PostTypeVersion, PostTypeVersionsController, PostTypesController, PostsController, ReprocessContentImageJob, SectionMissingError, SequenceFlowStyle, SequenceFlowStylesController, Style, StylesController, Tag, TagsController, UpdateContentElement, UpdatePostTypeContentElements, UpdatePostTypeFreeFormSections, UpdateSingletonPost, UpdateVersionStatus, Version, VersionAccessError, VersionMissingError, VersionProcessingError, VersionsController

Constant Summary collapse

VERSION =
'0.15.30'

Class Method Summary collapse

Class Method Details

.config(options) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/pulitzer.rb', line 16

def self.config(options)
  base_controller_name = options[:base_controller_name]
  @@base_controller         = base_controller_name.constantize
  @@missing_image_path      = options[:missing_image_path] || "/assets/missing.png"
  @@metadata_closure        = options[:metadata_authorization]
  @@authentication_closure  = options[:authentication]
  @@unpublish_authorization = options[:unpublish_authorization]
  @@publish_callback        = options[:publish_callback]
  @@tagging_models          = options[:tagging_models] || []
  @@layout                  = options[:layout] || 'application'
  @@partial_folder          = options[:partial_folder] || 'pulitzer_partials'
  @@preview_namespace       = options[:preview_namespace] || 'pulitzer_preview'
  @@public_controller       = options[:public_controller] || 'pulitzer'
  default_text_editor       = [{ name: 'None', template: 'pulitzer/text_editors/none', kind: 'TinyMCE'}]
  user_text_editors         = options[:text_editor_toolbars].flatten || nil
  @@text_editor_toolbars    = default_text_editor.push(*user_text_editors).compact
  if options.has_key?( :active_job_queues)
    queue_options = options[:active_job_queues]
    @@clone_queue           = queue_options.has_key?(:clone_post_version) ? queue_options[:clone_post_version] : :default
    @@image_queue           = queue_options.has_key?(:image_queue) ? queue_options[:image_reprocessing] : :default
  else
    @@clone_queue           = :default
    @@image_queue           = :default
  end
  @@aws_acl                 = options[:aws_acl] if options.has_key? :aws_acl
end

.skip_authentication?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/pulitzer.rb', line 47

def self.skip_authentication?
  self.authentication_closure.blank?
end

.skip_metadata_auth?Boolean

Returns:

  • (Boolean)


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

def self.
  self..blank?
end

.skip_publish_callback?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/pulitzer.rb', line 51

def self.skip_publish_callback?
  self.publish_callback.blank?
end