Sha256: 5d1c0c6cc2f30185dd2f715df5436f497999aad0c7023cf1e66619d3a8c20750

Contents?: true

Size: 627 Bytes

Versions: 23

Compression:

Stored size: 627 Bytes

Contents

require "bard/command"

module Bard::CLI::Run
  def self.included mod
    mod.class_eval do

      # HACK: we don't use Thor::Base#run, so its okay to stomp on it here
      original_verbose, $VERBOSE = $VERBOSE, nil
      Thor::THOR_RESERVED_WORDS -= ["run"]
      $VERBOSE = original_verbose

      desc "run <command>", "run the given command on production"
      def run *args
        server = config[:production]
        server.run! *args.join(" "), verbose: true
      rescue Bard::Command::Error => e
        puts red("!!! ") + "Running command failed: #{yellow(e.message)}"
        exit 1
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
bard-1.4.4 lib/bard/cli/run.rb
bard-1.4.3 lib/bard/cli/run.rb
bard-1.4.2 lib/bard/cli/run.rb
bard-1.4.1 lib/bard/cli/run.rb
bard-1.4.0 lib/bard/cli/run.rb
bard-1.3.9 lib/bard/cli/run.rb
bard-1.3.8 lib/bard/cli/run.rb
bard-1.3.7 lib/bard/cli/run.rb
bard-1.3.6 lib/bard/cli/run.rb
bard-1.3.5 lib/bard/cli/run.rb
bard-1.3.4 lib/bard/cli/run.rb
bard-1.3.3 lib/bard/cli/run.rb
bard-1.3.2 lib/bard/cli/run.rb
bard-1.3.1 lib/bard/cli/run.rb
bard-1.3.0 lib/bard/cli/run.rb
bard-1.2.0 lib/bard/cli/run.rb
bard-1.1.2 lib/bard/cli/run.rb
bard-1.1.1 lib/bard/cli/run.rb
bard-1.1.0 lib/bard/cli/run.rb
bard-1.0.8 lib/bard/cli/run.rb