Module: Locomotive::Mounter
- Defined in:
- lib/locomotive/mounter/version.rb,
lib/locomotive/mounter.rb,
lib/locomotive/mounter/config.rb,
lib/locomotive/mounter/fields.rb,
lib/locomotive/mounter/engine_api.rb,
lib/locomotive/mounter/exceptions.rb,
lib/locomotive/mounter/reader/api.rb,
lib/locomotive/mounter/writer/api.rb,
lib/locomotive/mounter/models/base.rb,
lib/locomotive/mounter/models/page.rb,
lib/locomotive/mounter/models/site.rb,
lib/locomotive/mounter/utils/output.rb,
lib/locomotive/mounter/reader/runner.rb,
lib/locomotive/mounter/writer/runner.rb,
lib/locomotive/mounter/models/snippet.rb,
lib/locomotive/mounter/mounting_point.rb,
lib/locomotive/mounter/reader/api/base.rb,
lib/locomotive/mounter/writer/api/base.rb,
lib/locomotive/mounter/extensions/compass.rb,
lib/locomotive/mounter/models/theme_asset.rb,
lib/locomotive/mounter/models/translation.rb,
lib/locomotive/mounter/reader/file_system.rb,
lib/locomotive/mounter/writer/file_system.rb,
lib/locomotive/mounter/models/content_type.rb,
lib/locomotive/mounter/extensions/sprockets.rb,
lib/locomotive/mounter/models/content_asset.rb,
lib/locomotive/mounter/models/content_entry.rb,
lib/locomotive/mounter/models/content_field.rb,
lib/locomotive/mounter/reader/api/site_reader.rb,
lib/locomotive/mounter/writer/api/site_writer.rb,
lib/locomotive/mounter/models/editable_element.rb,
lib/locomotive/mounter/reader/api/pages_reader.rb,
lib/locomotive/mounter/reader/file_system/base.rb,
lib/locomotive/mounter/writer/api/pages_writer.rb,
lib/locomotive/mounter/writer/file_system/base.rb,
lib/locomotive/mounter/reader/api/snippets_reader.rb,
lib/locomotive/mounter/writer/api/snippets_writer.rb,
lib/locomotive/mounter/models/content_select_option.rb,
lib/locomotive/mounter/reader/api/theme_assets_reader.rb,
lib/locomotive/mounter/reader/api/translations_reader.rb,
lib/locomotive/mounter/reader/file_system/site_reader.rb,
lib/locomotive/mounter/writer/api/theme_assets_writer.rb,
lib/locomotive/mounter/writer/api/translations_writer.rb,
lib/locomotive/mounter/writer/file_system/site_writer.rb,
lib/locomotive/mounter/reader/api/content_types_reader.rb,
lib/locomotive/mounter/reader/file_system/pages_reader.rb,
lib/locomotive/mounter/writer/api/content_types_writer.rb,
lib/locomotive/mounter/writer/file_system/pages_writer.rb,
lib/locomotive/mounter/reader/api/content_assets_reader.rb,
lib/locomotive/mounter/writer/api/content_assets_writer.rb,
lib/locomotive/mounter/reader/api/content_entries_reader.rb,
lib/locomotive/mounter/utils/yaml_front_matters_template.rb,
lib/locomotive/mounter/writer/api/content_entries_writer.rb,
lib/locomotive/mounter/reader/file_system/snippets_reader.rb,
lib/locomotive/mounter/writer/file_system/snippets_writer.rb,
lib/locomotive/mounter/reader/file_system/theme_assets_reader.rb,
lib/locomotive/mounter/reader/file_system/translations_reader.rb,
lib/locomotive/mounter/writer/file_system/theme_assets_writer.rb,
lib/locomotive/mounter/writer/file_system/translations_writer.rb,
lib/locomotive/mounter/reader/file_system/content_types_reader.rb,
lib/locomotive/mounter/writer/file_system/content_types_writer.rb,
lib/locomotive/mounter/reader/file_system/content_assets_reader.rb,
lib/locomotive/mounter/writer/file_system/content_assets_writer.rb,
lib/locomotive/mounter/reader/file_system/content_entries_reader.rb,
lib/locomotive/mounter/writer/file_system/content_entries_writer.rb
Overview
Defined Under Namespace
Modules: Extensions, Fields, Models, Reader, Utils, Writer
Classes: ApiReadException, ApiWriteException, Config, DefaultException, DuplicateContentEntryException, EngineApi, FieldDoesNotExistException, ImplementationIsMissingException, MountingPoint, PaginatedCollection, ReaderException, UnknownContentTypeException, UnknownTemplateException, WriterException, WrongCredentials
Constant Summary
collapse
- TEMPLATE_EXTENSIONS =
%w(liquid haml)
- VERSION =
'1.5.1'
- @@logger =
::Logger.new(STDOUT).tap { |log| log.level = ::Logger::DEBUG }
- @@mount_point =
nil
- @@locale =
I18n.locale
Class Method Summary
collapse
Class Method Details
.locale ⇒ Object
89
90
91
|
# File 'lib/locomotive/mounter.rb', line 89
def self.locale
@@locale
end
|
.locale=(locale) ⇒ Object
93
94
95
|
# File 'lib/locomotive/mounter.rb', line 93
def self.locale=(locale)
@@locale = locale.to_sym
end
|
.logger ⇒ Object
81
82
83
|
# File 'lib/locomotive/mounter.rb', line 81
def self.logger
@@logger
end
|
.logger=(logger) ⇒ Object
85
86
87
|
# File 'lib/locomotive/mounter.rb', line 85
def self.logger=(logger)
@@logger = logger
end
|
.mount(options) ⇒ Object
77
78
79
|
# File 'lib/locomotive/mounter.rb', line 77
def self.mount(options)
@@mount_point = Locomotive::Mounter::Config[:reader].run!(options)
end
|
.with_locale(locale, &block) ⇒ Object
97
98
99
100
101
102
|
# File 'lib/locomotive/mounter.rb', line 97
def self.with_locale(locale, &block)
tmp, @@locale = @@locale, locale.try(:to_sym) || @@locale
yield.tap do
@@locale = tmp
end
end
|