Module: DeployPin
- Extended by:
- DeploymentState
- Defined in:
- lib/deploy_pin/task.rb,
lib/deploy_pin.rb,
lib/deploy_pin/engine.rb,
lib/deploy_pin/runner.rb,
lib/deploy_pin/version.rb,
lib/deploy_pin/database.rb,
lib/deploy_pin/collector.rb,
app/models/deploy_pin/record.rb,
lib/deploy_pin/task_criteria.rb,
lib/deploy_pin/deployment_state.rb,
lib/deploy_pin/parallel_wrapper.rb,
app/models/deploy_pin/application_record.rb,
lib/generators/deploy_pin/task/task_generator.rb,
lib/generators/deploy_pin/install/install_generator.rb
Overview
This module is used to track the state of a deployment.
Defined Under Namespace
Modules: Database, DeploymentState, ParallelWrapper, Runner Classes: ApplicationRecord, Collector, Engine, InstallGenerator, Record, Task, TaskCriteria, TaskGenerator
Constant Summary collapse
- OPTIONS =
%i[ tasks_path fallback_group groups statement_timeout run_formatter list_formatter task_wrapper deployment_state_transition ].freeze
- DEFAULTS =
{ task_wrapper: ->(_task, task_runner) { task_runner.call } }.freeze
- VERSION =
'1.5.1'
Constants included from DeploymentState
DeploymentState::DEPLOYMENT_ONGOING_TASK, DeploymentState::DEPLOYMENT_OVER_TASK, DeploymentState::DEPLOYMENT_PENDING_TASK, DeploymentState::ONGOING, DeploymentState::PENDING, DeploymentState::STORE_KEY
Class Method Summary collapse
Methods included from DeploymentState
deployment_tasks_code, ongoing_deployment?, pending_deployment?
Class Method Details
.enabled?(option) ⇒ Boolean
53 54 55 |
# File 'lib/deploy_pin.rb', line 53 def self.enabled?(option) instance_variable_defined?("@#{option}") end |
.setup(&block) ⇒ Object
41 42 43 |
# File 'lib/deploy_pin.rb', line 41 def self.setup(&block) instance_eval(&block) end |
.setup_defaults! ⇒ Object
45 46 47 48 49 |
# File 'lib/deploy_pin.rb', line 45 def self.setup_defaults! DEFAULTS.each do |option, value| instance_variable_set(:"@#{option}", value) end end |