Sha256: 25587219b2443c85772aeffa74c872b6f72a14b7b1647e70c608dc0e93c15a50

Contents?: true

Size: 627 Bytes

Versions: 5

Compression:

Stored size: 627 Bytes

Contents

require "terraspace-bundler"

class Terraspace::CLI
  class Bundle
    def initialize(options={})
      @options = options
    end

    def run
      Terraspace.check_project!
      TerraspaceBundler.config.deep_merge!(Terraspace.config.bundle)
      TerraspaceBundler::CLI.start(args)
    end

    # Allows bundle to be called without install. So both work:
    #
    #    terraspace bundle
    #    terraspace bundle install
    #
    def args
      args = @options[:args]
      if args.empty? or args.first.include?('--')
        args.unshift("install")
      end
      args = ["bundle"] + args
      args
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
terraspace-0.4.4 lib/terraspace/cli/bundle.rb
terraspace-0.4.3 lib/terraspace/cli/bundle.rb
terraspace-0.4.2 lib/terraspace/cli/bundle.rb
terraspace-0.4.1 lib/terraspace/cli/bundle.rb
terraspace-0.4.0 lib/terraspace/cli/bundle.rb