Class: EmberCliDeployRedis::Configuration
- Inherits:
-
Object
- Object
- EmberCliDeployRedis::Configuration
- Defined in:
- lib/ember_cli_deploy_redis/configuration.rb
Instance Attribute Summary collapse
-
#default_app_name ⇒ Object
Returns the value of attribute default_app_name.
- #keyspace ⇒ Object
-
#on_revision_activated_block ⇒ Object
readonly
Returns the value of attribute on_revision_activated_block.
-
#redis ⇒ Object
Returns the value of attribute redis.
-
#revision_specifier_query_param ⇒ Object
Returns the value of attribute revision_specifier_query_param.
Instance Method Summary collapse
- #on_revision_activated(&block) ⇒ Object
- #redis_key_for_revision_file(application, revision, filename) ⇒ Object
- #redis_key_for_revision_list(application) ⇒ Object
- #revision_has_been_activated(revision) ⇒ Object
-
#web_application_names ⇒ Object
Array of names of Ember applications that will be supported.
- #web_application_names=(names) ⇒ Object
Instance Attribute Details
#default_app_name ⇒ Object
Returns the value of attribute default_app_name.
11 12 13 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 11 def default_app_name @default_app_name end |
#keyspace ⇒ Object
5 6 7 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 5 def keyspace @keyspace ||= 'ember-cli-deploy' end |
#on_revision_activated_block ⇒ Object (readonly)
Returns the value of attribute on_revision_activated_block.
37 38 39 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 37 def on_revision_activated_block @on_revision_activated_block end |
#redis ⇒ Object
Returns the value of attribute redis.
3 4 5 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 3 def redis @redis end |
#revision_specifier_query_param ⇒ Object
Returns the value of attribute revision_specifier_query_param.
28 29 30 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 28 def revision_specifier_query_param @revision_specifier_query_param end |
Instance Method Details
#on_revision_activated(&block) ⇒ Object
33 34 35 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 33 def on_revision_activated(&block) @on_revision_activated_block = block end |
#redis_key_for_revision_file(application, revision, filename) ⇒ Object
47 48 49 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 47 def redis_key_for_revision_file(application, revision, filename) [[redis_key_for_revision_list(application), revision].join(":"), filename].join("/") end |
#redis_key_for_revision_list(application) ⇒ Object
43 44 45 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 43 def redis_key_for_revision_list(application) [keyspace, application.name].compact.join(":") end |
#revision_has_been_activated(revision) ⇒ Object
39 40 41 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 39 def revision_has_been_activated(revision) @on_activate_revision_block.call(revision) if @on_activate_revision_block end |
#web_application_names ⇒ Object
Array of names of Ember applications that will be supported.
19 20 21 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 19 def web_application_names @web_application_names ||= [default_app_name] end |
#web_application_names=(names) ⇒ Object
23 24 25 26 |
# File 'lib/ember_cli_deploy_redis/configuration.rb', line 23 def web_application_names=(names) fail ArgumentError, "names must be an array" unless names.respond_to? :each @web_application_names = names end |