Module: Capistrano::DSL::Env

Extended by:
Forwardable
Included in:
Capistrano::DSL
Defined in:
lib/capistrano/dsl/env.rb

Instance Method Summary collapse

Instance Method Details

#asset_timestampObject



38
39
40
# File 'lib/capistrano/dsl/env.rb', line 38

def asset_timestamp
  env.timestamp.strftime("%Y%m%d%H%M.%S")
end

#envObject



30
31
32
# File 'lib/capistrano/dsl/env.rb', line 30

def env
  Configuration.env
end

#release_roles(*names) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/capistrano/dsl/env.rb', line 21

def release_roles(*names)
  if names.last.is_a? Hash
    names.last[:exclude] = :no_release
  else
    names << { exclude: :no_release }
  end
  roles(*names)
end

#release_timestampObject



34
35
36
# File 'lib/capistrano/dsl/env.rb', line 34

def release_timestamp
  env.timestamp.strftime("%Y%m%d%H%M%S")
end

#role_properties(*names, &block) ⇒ Object



17
18
19
# File 'lib/capistrano/dsl/env.rb', line 17

def role_properties(*names, &block)
  env.role_properties_for(names, &block)
end

#roles(*names) ⇒ Object



13
14
15
# File 'lib/capistrano/dsl/env.rb', line 13

def roles(*names)
  env.roles_for(names.flatten)
end