Sha256: be36e959d8e77f7a5f5e78349c71b50ff8a8fa3902a82d812a44926d2e610a5f

Contents?: true

Size: 899 Bytes

Versions: 11

Compression:

Stored size: 899 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::DumpPackageDefinitionText
  include Fig::Command::Action
  include Fig::Command::Action::Role::HasNoSubAction

  def options()
    return %w<--dump-package-definition-text>
  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 false
  end

  def apply_config?()
    return false
  end

  def execute()
    text = @execution_context.base_package.unparsed_text
    if text
      puts text.strip # Ensure one and only one ending newline.

      return EXIT_SUCCESS
    end

    $stderr.puts %q<There's no text for the package.>

    return EXIT_FAILURE
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fig-1.1.0 lib/fig/command/action/dump_package_definition_text.rb
fig-1.0.0 lib/fig/command/action/dump_package_definition_text.rb
fig-0.2.5 lib/fig/command/action/dump_package_definition_text.rb
fig-0.2.3 lib/fig/command/action/dump_package_definition_text.rb
fig-0.2.1 lib/fig/command/action/dump_package_definition_text.rb
fig-0.1.81 lib/fig/command/action/dump_package_definition_text.rb
fig-0.1.79 lib/fig/command/action/dump_package_definition_text.rb
fig-0.1.77 lib/fig/command/action/dump_package_definition_text.rb
fig-0.1.76 lib/fig/command/action/dump_package_definition_text.rb
fig-0.1.75 lib/fig/command/action/dump_package_definition_text.rb
fig-0.1.73 lib/fig/command/action/dump_package_definition_text.rb