Module: Pageflow

Defined in:
lib/pageflow.rb,
lib/pageflow/theme.rb,
lib/pageflow/seeds.rb,
lib/pageflow/hooks.rb,
lib/pageflow/quota.rb,
lib/pageflow/engine.rb,
lib/pageflow/themes.rb,
lib/pageflow/quotas.rb,
lib/pageflow/version.rb,
lib/pageflow/file_type.rb,
lib/pageflow/page_type.rb,
lib/pageflow/user_mixin.rb,
lib/pageflow/admin/tabs.rb,
lib/pageflow/file_types.rb,
app/models/pageflow/page.rb,
lib/pageflow/widget_type.rb,
lib/pageflow/widget_types.rb,
lib/pageflow/zencoder_api.rb,
app/models/pageflow/entry.rb,
app/models/pageflow/widget.rb,
lib/pageflow/configuration.rb,
app/models/pageflow/folder.rb,
lib/pageflow/ability_mixin.rb,
app/models/pageflow/theming.rb,
app/models/pageflow/account.rb,
lib/pageflow/view_component.rb,
app/models/pageflow/chapter.rb,
app/models/pageflow/revision.rb,
app/models/pageflow/edit_lock.rb,
app/models/pageflow/null_user.rb,
app/models/pageflow/video_file.rb,
app/models/pageflow/membership.rb,
app/models/pageflow/image_file.rb,
app/models/pageflow/audio_file.rb,
app/models/pageflow/file_usage.rb,
app/models/pageflow/home_button.rb,
lib/pageflow/built_in_page_type.rb,
lib/pageflow/revision_component.rb,
app/models/pageflow/draft_entry.rb,
app/models/pageflow/invited_user.rb,
app/mailers/pageflow/user_mailer.rb,
app/helpers/pageflow/pages_helper.rb,
app/helpers/pageflow/files_helper.rb,
lib/pageflow/built_in_widget_type.rb,
app/helpers/pageflow/quota_helper.rb,
app/helpers/pageflow/config_helper.rb,
app/helpers/pageflow/themes_helper.rb,
app/helpers/pageflow/folders_helper.rb,
app/models/pageflow/published_entry.rb,
app/jobs/pageflow/poll_zencoder_job.rb,
app/helpers/pageflow/entries_helper.rb,
app/helpers/pageflow/widgets_helper.rb,
app/helpers/pageflow/info_box_helper.rb,
app/helpers/pageflow/themings_helper.rb,
app/models/pageflow/entry_publication.rb,
app/helpers/pageflow/page_types_helper.rb,
app/helpers/pageflow/render_json_helper.rb,
app/models/pageflow/zencoder_attachment.rb,
app/helpers/pageflow/audio_files_helper.rb,
app/helpers/pageflow/media_query_helper.rb,
lib/pageflow/zencoder_output_definition.rb,
app/helpers/pageflow/admin/users_helper.rb,
app/jobs/pageflow/upload_file_to_s3_job.rb,
app/models/concerns/pageflow/hosted_file.rb,
app/jobs/pageflow/process_image_file_job.rb,
app/models/concerns/pageflow/suspendable.rb,
app/helpers/pageflow/social_share_helper.rb,
app/controllers/pageflow/pages_controller.rb,
app/models/pageflow/encoding_confirmation.rb,
app/controllers/pageflow/files_controller.rb,
app/models/concerns/pageflow/uploaded_file.rb,
app/helpers/pageflow/file_thumbnails_helper.rb,
app/controllers/pageflow/entries_controller.rb,
app/models/pageflow/thumbnail_file_resolver.rb,
app/helpers/pageflow/admin/revisions_helper.rb,
lib/generators/pageflow/user/user_generator.rb,
app/controllers/pageflow/chapters_controller.rb,
app/helpers/pageflow/stub_page_configuration.rb,
app/helpers/pageflow/background_image_helper.rb,
lib/generators/pageflow/theme/theme_generator.rb,
lib/pageflow/zencoder_video_output_definition.rb,
app/helpers/pageflow/admin/memberships_helper.rb,
lib/pageflow/zencoder_audio_output_definition.rb,
app/jobs/pageflow/submit_file_to_zencoder_job.rb,
app/views/components/pageflow/admin/users_tab.rb,
app/controllers/pageflow/revisions_controller.rb,
app/models/pageflow/with_file_usage_extension.rb,
app/views/components/pageflow/admin/tabs_view.rb,
lib/generators/pageflow/seeds/seeds_generator.rb,
app/controllers/concerns/pageflow/edit_locking.rb,
app/controllers/pageflow/edit_locks_controller.rb,
app/models/pageflow/cname_theming_request_scope.rb,
lib/generators/pageflow/cancan/cancan_generator.rb,
app/views/components/pageflow/admin/members_tab.rb,
lib/generators/pageflow/assets/assets_generator.rb,
lib/generators/pageflow/routes/routes_generator.rb,
lib/generators/pageflow/resque/resque_generator.rb,
app/controllers/pageflow/application_controller.rb,
app/views/components/pageflow/admin/entries_tab.rb,
app/controllers/pageflow/editor/files_controller.rb,
lib/generators/pageflow/install/install_generator.rb,
app/views/components/pageflow/admin/revisions_tab.rb,
lib/pageflow/zencoder_meta_data_output_definition.rb,
app/controllers/pageflow/editor/entries_controller.rb,
app/controllers/pageflow/editor/widgets_controller.rb,
app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb,
app/controllers/concerns/pageflow/quota_verification.rb,
app/state_machines/pageflow/image_file_state_machine.rb,
app/jobs/pageflow/request_meta_data_from_zencoder_job.rb,
app/controllers/pageflow/editor/file_usages_controller.rb,
app/state_machines/pageflow/encoded_file_state_machine.rb,
app/views/components/pageflow/admin/grouped_folder_list.rb,
app/views/components/pageflow/admin/embedded_index_table.rb,
app/views/components/pageflow/admin/entry_user_badge_list.rb,
lib/generators/pageflow/initializer/initializer_generator.rb,
app/views/components/pageflow/admin/custom_scopes_renderer.rb,
app/controllers/pageflow/editor/entry_publications_controller.rb,
app/controllers/pageflow/editor/encoding_confirmations_controller.rb,
lib/generators/pageflow/active_admin_menu/active_admin_menu_generator.rb

Defined Under Namespace

Modules: AbilityMixin, Admin, AudioFilesHelper, BackgroundImageHelper, ConfigHelper, EditLocking, Editor, EncodedFileStateMachine, EntriesHelper, FileThumbnailsHelper, FilesHelper, FoldersHelper, Generators, HostedFile, ImageFileStateMachine, InfoBoxHelper, MediaQueryHelper, PageTypesHelper, PagesHelper, QuotaHelper, QuotaVerification, RenderJsonHelper, RevisionComponent, Seeds, SocialShareHelper, Suspendable, ThemesHelper, ThemingsHelper, UploadedFile, UserMixin, WidgetsHelper, WithFileUsageExtension Classes: Account, ApplicationController, AudioFile, BuiltInPageType, BuiltInWidgetType, Chapter, ChaptersController, CnameThemingRequestScope, Configuration, DraftEntry, EditLock, EditLocksController, EncodingConfirmation, Engine, EntriesController, Entry, EntryPublication, FileType, FileTypes, FileUsage, FilesController, Folder, HomeButton, Hooks, ImageFile, InvitedUser, Membership, NullUser, Page, PageType, PagesController, PollMetaDataFromZencoderJob, PollZencoderJob, ProcessImageFileJob, PublishedEntry, Quota, Quotas, RequestMetaDataFromZencoderJob, Revision, RevisionsController, StubPageConfiguration, SubmitFileToZencoderJob, Theme, Themes, Theming, ThumbnailFileResolver, UploadFileToS3Job, UserMailer, VideoFile, ViewComponent, Widget, WidgetType, WidgetTypes, ZencoderApi, ZencoderAttachment, ZencoderAudioOutputDefinition, ZencoderMetaDataOutputDefinition, ZencoderOutputDefinition, ZencoderVideoOutputDefinition

Constant Summary collapse

VERSION =
"0.7.0.alpha"

Class Method Summary collapse

Class Method Details

.after_configure(&block) ⇒ Object


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

def self.after_configure(&block)
  @after_configure_blocks ||= []
  @after_configure_blocks << block
end

.config(options = {}) ⇒ Object


4
5
6
7
8
9
10
11
12
13
# File 'lib/pageflow.rb', line 4

def self.config(options = {})
  unless @config
    if options[:ignore_not_configured]
      return Configuration.new
    else
      raise('Pageflow has not been configured yet')
    end
  end
  @config
end

.configure(&block) ⇒ Object


15
16
17
18
# File 'lib/pageflow.rb', line 15

def self.configure(&block)
  @configure_blocks ||= []
  @configure_blocks << block
end

.configure!Object


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/pageflow.rb', line 20

def self.configure!
  return unless @finalized

  config = Configuration.new
  @configure_blocks ||= []

  @configure_blocks.each do |block|
    block.call(config)
  end

  @after_configure_blocks.each do |block|
    block.call(config)
  end

  @config = config
end

.finalize!Object


37
38
39
40
# File 'lib/pageflow.rb', line 37

def self.finalize!
  @finalized = true
  configure!
end

.routes(router) ⇒ Object


47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/pageflow.rb', line 47

def self.routes(router)
  router.instance_eval do
    namespace :admin do
      resources :users do
        resources :memberships
      end

      resources :entries do
        resources :memberships
      end
    end

    mount Pageflow::Engine, at: '/'
  end
end