Module: Deliv::Deploy
- Defined in:
- lib/deliv/deploy.rb,
lib/deliv/deploy/git.rb,
lib/deliv/deploy/config.rb,
lib/deliv/deploy/railtie.rb,
lib/deliv/deploy/version.rb
Defined Under Namespace
Classes: Config, ConfigError, Git, Railtie
Constant Summary
collapse
- REQUIRED_ENV =
%w[AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION].freeze
- VERSION =
'0.0.1'.freeze
Class Method Summary
collapse
Class Method Details
.environments ⇒ Object
18
19
20
|
# File 'lib/deliv/deploy.rb', line 18
def self.environments
Dir[Rails.root.join('config', 'environments', '*.rb')].map { |f| File.basename(f, '.*').to_sym }
end
|
.local_environments ⇒ Object
22
23
24
|
# File 'lib/deliv/deploy.rb', line 22
def self.local_environments
%i[test development]
end
|
.remote_environments ⇒ Object
26
27
28
|
# File 'lib/deliv/deploy.rb', line 26
def self.remote_environments
environments - local_environments
end
|
.verify_env! ⇒ Object
14
15
16
|
# File 'lib/deliv/deploy.rb', line 14
def self.verify_env!
REQUIRED_ENV.each { |e| raise "Missing `ENV['#{e}']`" unless ENV[e].present? }
end
|