Sha256: ebb0c137ff399feb8ee6b6924b64c4271ab08a160988002ff72dd68778f58a96

Contents?: true

Size: 1 KB

Versions: 10

Compression:

Stored size: 1 KB

Contents

# -*- encoding: utf-8 -*-

require 'webgen/cli/utils'
require 'fileutils'
require 'erb'

module Webgen
  module CLI

    # The CLI command for creating a new extension bundle.
    class CreateBundleCommand < CmdParse::Command

      def initialize # :nodoc:
        super('bundle', takes_commands: false)
        short_desc('Create an extension bundle')
        long_desc(<<DESC)
Creates a new extension bundle. This command can either create a local bundle in the
website's ext/ directory or a bundle that can be distributed via Rubygems. In the
latter case you can optionally specify the directory under which the bundle should
be created.
DESC
        options.on("-d", "--distribution-format", "Create the bundle in distribution format") do
          @type = :gem
        end
        @type = :local
      end

      def execute(bundle_name, directory = nil) # :nodoc:
        directory ||= bundle_name
        command_parser.website.execute_task(:create_bundle, bundle_name, @type, directory)
      end

    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
webgen-1.7.3 lib/webgen/cli/commands/create_bundle.rb
webgen-1.7.2 lib/webgen/cli/commands/create_bundle.rb
webgen-1.7.1 lib/webgen/cli/commands/create_bundle.rb
webgen-1.7.0 lib/webgen/cli/commands/create_bundle.rb
webgen-1.6.0 lib/webgen/cli/commands/create_bundle.rb
webgen-1.5.2 lib/webgen/cli/commands/create_bundle.rb
webgen-1.5.1 lib/webgen/cli/commands/create_bundle.rb
webgen-1.5.0 lib/webgen/cli/commands/create_bundle.rb
webgen-1.4.1 lib/webgen/cli/commands/create_bundle.rb
webgen-1.4.0 lib/webgen/cli/commands/create_bundle.rb