Sha256: bcc120c2ede162f325aafa77b8ec0cac993f86cf9d430cfefd8449a56a5ec2ae

Contents?: true

Size: 350 Bytes

Versions: 7

Compression:

Stored size: 350 Bytes

Contents

module KnifeSolo
  module DeprecatedCommand

    def self.included(other)
      other.class_eval do
        def self.deprecated
          "`knife #{common_name}` is deprecated! Please use:\n  #{superclass.banner}"
        end

        banner deprecated
      end
    end

    def run
      ui.warn self.class.deprecated
      super
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
knife-solo-0.3.0.pre3 lib/knife-solo/deprecated_command.rb
knife-solo-0.3.0.pre2 lib/knife-solo/deprecated_command.rb
knife-solo-0.3.0.pre1 lib/knife-solo/deprecated_command.rb
knife-solo-0.2.0 lib/knife-solo/deprecated_command.rb
knife-solo-0.2.0.pre1 lib/knife-solo/deprecated_command.rb
knife-solo-0.1.0 lib/knife-solo/deprecated_command.rb
knife-solo-0.1.0.pre1 lib/knife-solo/deprecated_command.rb