Module: Pulitzer

Defined in:
lib/pulitzer.rb,
lib/pulitzer/engine.rb,
lib/pulitzer/version.rb,
app/models/pulitzer/tag.rb,
app/models/pulitzer/post.rb,
app/models/pulitzer/layout.rb,
app/models/pulitzer/partial.rb,
app/models/pulitzer/version.rb,
app/models/pulitzer/post_tag.rb,
app/helpers/pulitzer/main_helper.rb,
app/helpers/pulitzer/posts_helper.rb,
app/jobs/pulitzer/clone_version_job.rb,
app/models/pulitzer/content_element.rb,
lib/pulitzer/content_element_helper.rb,
app/models/pulitzer/free_form_section.rb,
app/controllers/pulitzer/tags_controller.rb,
app/models/pulitzer/content_element_type.rb,
app/models/pulitzer/free_form_section_type.rb,
app/jobs/pulitzer/reprocess_content_image_job.rb,
app/validators/pulitzer/content_element_validator.rb,
app/models/pulitzer/post_type_content_element_type.rb

Defined Under Namespace

Modules: ContentElementHelper, MainHelper, PostsHelper Classes: ApplicationController, BaseUploader, CloneVersion, CloneVersionJob, ContentElement, ContentElementType, ContentElementValidator, ContentElementsController, CreatePartialContentElements, CreatePostContentElements, CreatePostTag, CreatePostTypeContentElements, CreatePostTypeFreeFormSections, CreateSingletonPost, DestroyPostTypeContentElements, DestroyPostTypeFreeFormSections, Engine, FreeFormSection, FreeFormSectionType, FreeFormSectionTypesController, ImageUploader, Layout, LayoutsController, Partial, PartialsController, Post, PostTag, PostTagsController, PostType, PostTypeContentElementType, PostTypeContentElementTypesController, PostTypesController, PostsController, ReprocessContentImageJob, Tag, TagsController, UpdateContentElement, UpdatePostTypeContentElements, UpdatePostTypeFreeFormSections, UpdateSingletonPost, UpdateVersionStatus, Version, VersionsController

Constant Summary collapse

VERSION =
'0.4.12'

Class Method Summary collapse

Class Method Details

.config(options) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/pulitzer.rb', line 14

def self.config(options)
  base_controller_name = options[:base_controller_name]
  @@base_controller         = base_controller_name.constantize
  @@metadata_closure        = options[:metadata_authorization]
  @@authentication_closure  = options[:authentication]
  @@tagging_models          = options[:tagging_models] || []
  @@layout                  = options[:layout] || 'application'
  @@partial_folder          = options[:partial_folder] || 'pulitzer_partials'
  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)


40
41
42
# File 'lib/pulitzer.rb', line 40

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

.skip_metadata_auth?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/pulitzer.rb', line 36

def self.
  self..blank?
end