Module: CopyTunerClient
- Defined in:
- lib/copy_tuner_client.rb,
lib/copy_tuner_client/cache.rb,
lib/copy_tuner_client/rails.rb,
lib/copy_tuner_client/client.rb,
lib/copy_tuner_client/engine.rb,
lib/copy_tuner_client/errors.rb,
lib/copy_tuner_client/poller.rb,
lib/copy_tuner_client/copyray.rb,
lib/copy_tuner_client/version.rb,
lib/copy_tuner_client/i18n_backend.rb,
lib/copy_tuner_client/request_sync.rb,
lib/copy_tuner_client/configuration.rb,
lib/copy_tuner_client/process_guard.rb,
lib/copy_tuner_client/prefixed_logger.rb,
lib/copy_tuner_client/translation_log.rb,
lib/copy_tuner_client/copyray_middleware.rb
Overview
cf) xray-rails : xray/middleware.rb
Defined Under Namespace
Modules: Rails Classes: Cache, Client, Configuration, ConnectionError, Copyray, CopyrayMiddleware, Engine, I18nBackend, InvalidApiKey, Poller, PrefixedLogger, ProcessGuard, RequestSync, TranslationLog
Constant Summary collapse
- VERSION =
Client version
'0.3.2'.freeze
- API_VERSION =
API version being used to communicate with the server
'2.0'.freeze
Class Attribute Summary collapse
-
.configuration ⇒ Configuration
Must act like a hash and return sensible values for all CopyTuner configuration options.
-
.poller ⇒ Poller
This is set when CopyTunerClient.configure is called.
Class Method Summary collapse
- .cache ⇒ Object
- .client ⇒ Object
-
.configure(apply = true) {|Configuration| ... } ⇒ Object
Call this method to modify defaults in your initializers.
-
.deploy ⇒ Object
Issues a new deploy, marking all draft blurbs as published.
-
.export ⇒ Object
Issues a new export, returning yaml representation of blurb cache.
-
.flush ⇒ Object
Flush queued changed synchronously.
-
.start_poller ⇒ Object
Starts the polling process.
Class Attribute Details
.configuration ⇒ Configuration
Must act like a hash and return sensible values for all CopyTuner configuration options. Usually set when configure is called.
14 15 16 |
# File 'lib/copy_tuner_client.rb', line 14 def configuration @configuration end |
Class Method Details
.cache ⇒ Object
43 44 45 |
# File 'lib/copy_tuner_client.rb', line 43 def self.cache CopyTunerClient.configuration.cache end |
.client ⇒ Object
47 48 49 |
# File 'lib/copy_tuner_client.rb', line 47 def self.client CopyTunerClient.configuration.client end |
.configure(apply = true) {|Configuration| ... } ⇒ Object
Call this method to modify defaults in your initializers.
63 64 65 66 67 68 69 70 |
# File 'lib/copy_tuner_client.rb', line 63 def self.configure(apply = true) self.configuration ||= Configuration.new yield configuration if apply configuration.apply end end |
.deploy ⇒ Object
Issues a new deploy, marking all draft blurbs as published. This is called when the copy_tuner:deploy rake task is invoked.
23 24 25 |
# File 'lib/copy_tuner_client.rb', line 23 def self.deploy client.deploy end |
.export ⇒ Object
Issues a new export, returning yaml representation of blurb cache. This is called when the copy_tuner:export rake task is invoked.
29 30 31 |
# File 'lib/copy_tuner_client.rb', line 29 def self.export cache.export end |
.flush ⇒ Object
Flush queued changed synchronously
39 40 41 |
# File 'lib/copy_tuner_client.rb', line 39 def self.flush cache.flush end |
.start_poller ⇒ Object
Starts the polling process.
34 35 36 |
# File 'lib/copy_tuner_client.rb', line 34 def self.start_poller poller.start end |