Sha256: ab4e2d44e2729d0e4a83ef86b66101c2957de0db479f40623ebd9b68961f88b1

Contents?: true

Size: 974 Bytes

Versions: 40

Compression:

Stored size: 974 Bytes

Contents

require 'fig/command/action'
require 'fig/command/action/role/has_no_sub_action'

module  Fig; end
class   Fig::Command; end
module  Fig::Command::Action; end

class Fig::Command::Action::Get
  include Fig::Command::Action
  include Fig::Command::Action::Role::HasNoSubAction

  def options()
    return %w<--get>
  end

  def descriptor_requirement()
    return nil
  end

  def modifies_repository?()
    return false
  end

  def load_base_package?()
    return true
  end

  def register_base_package?()
    return true
  end

  def apply_config?()
    return true
  end

  def apply_base_config?()
    return true
  end

  def configure(options)
    @variable = options.variable_to_get
  end

  def execute()
    # Ruby v1.8 emits "nil" for nil, whereas ruby v1.9 emits the empty
    # string, so, for consistency, we need to ensure that we always emit the
    # empty string.
    puts @execution_context.environment[@variable] || ''

    return EXIT_SUCCESS
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
fig-1.23.0 lib/fig/command/action/get.rb
fig-1.22.1.beta.1 lib/fig/command/action/get.rb
fig-1.22.0 lib/fig/command/action/get.rb
fig-1.21.1.beta.2 lib/fig/command/action/get.rb
fig-1.21.1.beta.1 lib/fig/command/action/get.rb
fig-1.21.0 lib/fig/command/action/get.rb
fig-1.20.1.beta.1 lib/fig/command/action/get.rb
fig-1.20.0 lib/fig/command/action/get.rb
fig-1.19.0 lib/fig/command/action/get.rb
fig-1.18.0 lib/fig/command/action/get.rb
fig-1.17.0 lib/fig/command/action/get.rb
fig-1.16.1.beta.1 lib/fig/command/action/get.rb
fig-1.16.0 lib/fig/command/action/get.rb
fig-1.15.1.beta.2 lib/fig/command/action/get.rb
fig-1.15.1.beta.1 lib/fig/command/action/get.rb
fig-1.15.0 lib/fig/command/action/get.rb
fig-1.14.0 lib/fig/command/action/get.rb
fig-1.13.0 lib/fig/command/action/get.rb
fig-1.12.0 lib/fig/command/action/get.rb
fig-1.11.0 lib/fig/command/action/get.rb