Module: Consyncful

Defined in:
lib/consyncful/configuration.rb,
lib/consyncful/base.rb,
lib/consyncful/sync.rb,
lib/consyncful/stats.rb,
lib/consyncful/engine.rb,
lib/consyncful/version.rb,
lib/consyncful/item_mapper.rb,
lib/consyncful/sync_runner.rb,
lib/consyncful/persisted_item.rb,
app/controllers/consyncful/webhook_controller.rb

Overview

Handles Rails configurations for Consyncful

Defined Under Namespace

Classes: Base, Configuration, Engine, ItemMapper, PersistedItem, Railtie, Stats, Sync, SyncRunner, WebhookController

Constant Summary collapse

VERSION =
'1.1.2'
DEFAULT_CLIENT_OPTIONS =
{
  reuse_entries: true,
  api_url: 'cdn.contentful.com'
}.freeze
DEFAULT_SYNC_OPTIONS =
{
  limit: 100,
  type: 'all'
}.freeze

Class Method Summary collapse

Class Method Details

.clientObject



81
82
83
# File 'lib/consyncful/configuration.rb', line 81

def client
  @client ||= Contentful::Client.new(Consyncful.configuration.client_options)
end

.configurationObject



73
74
75
# File 'lib/consyncful/configuration.rb', line 73

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



77
78
79
# File 'lib/consyncful/configuration.rb', line 77

def configure
  yield configuration
end