Sha256: cc78ba75dc1f575a7ed46a2727a324b9b5a13d7919642cb16fe1377efeb64118

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

# frozen_string_literal: true

class Shoes
  module UI
    class CLI
      class PackageCommand < BaseCommand
        def run
          @packager = Shoes::Packager.new
          @packager.parse!(args)

          warn_on_unexpected_parameters(2)

          path = args[1]
          @packager.run(path)
        rescue OptionParser::InvalidOption => e
          puts "Whoops! #{e.message}"
          puts
          puts help

          false
        end

        def help
          help_from_options("shoes package [options] file",
                            Shoes::Packager.new.options) + <<-EOS

    Packages may be built either from a single .rb file, or a .yaml file with
    more options defined.
EOS
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-core-4.0.0.rc1 lib/shoes/ui/cli/package_command.rb