Sha256: e2b16e5f48ef64ffe28851f1ed11a33177e6e85e1d2d0753adce82f9cebcef28

Contents?: true

Size: 527 Bytes

Versions: 52

Compression:

Stored size: 527 Bytes

Contents

require 'gli/exceptions'

module Opsicle
  module Errors

    class DeployFailed < StandardError
      def initialize(command=nil)
        @command = command
        super("#{command_string} failed!")
      end

      def command_string
        command_string = @command ? @command[:name] : 'deploy'

        if command_string == 'execute_recipes' && @command[:args]["recipes"]
          command_string += " (running [#{@command[:args]["recipes"].join(', ')}])"
        end

        command_string
      end
    end

  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
opsicle-2.15.0 lib/opsicle/errors.rb
opsicle-2.14.2 lib/opsicle/errors.rb
opsicle-2.14.1 lib/opsicle/errors.rb
opsicle-2.14.0 lib/opsicle/errors.rb
opsicle-2.13.1 lib/opsicle/errors.rb
opsicle-2.13.0 lib/opsicle/errors.rb
opsicle-2.12.5 lib/opsicle/errors.rb
opsicle-2.12.3 lib/opsicle/errors.rb
opsicle-2.12.2 lib/opsicle/errors.rb
opsicle-2.12.1 lib/opsicle/errors.rb
opsicle-2.12.0 lib/opsicle/errors.rb
opsicle-2.11.3 lib/opsicle/errors.rb
opsicle-2.11.1 lib/opsicle/errors.rb
opsicle-2.11.0 lib/opsicle/errors.rb
opsicle-2.10.1 lib/opsicle/errors.rb
opsicle-2.10.0 lib/opsicle/errors.rb
opsicle-2.9.6 lib/opsicle/errors.rb
opsicle-2.9.4 lib/opsicle/errors.rb
opsicle-2.9.3 lib/opsicle/errors.rb
opsicle-2.9.2 lib/opsicle/errors.rb