lib/packer/binary.rb in packer-binary-0.2.0 vs lib/packer/binary.rb in packer-binary-0.2.1
- old
+ new
@@ -38,42 +38,27 @@
# @note if the method is an invalid sub-command or if the command fails
# you will get a {Command::CommandFailure} exception
# @since 0.2.0
def method_missing(method, *args, &block)
if method.to_s =~ /(\w+)/
- Command.run("#{method.to_s.downcase} #{args}")
+ puts "#{method.to_s.downcase} #{args.join(' ')}"
+ Command.run("#{method.to_s.downcase} #{args.join(' ')}")
else
super
end
end
def respond_to_missing?(method, *)
method =~ /(\w+)/ || super
end
+ # The Convenience methods have been deprecated in favor of dynamic method
+ # handling.
# @deprecated Use {#method_missing} dynamic method handling for
# binary sub-commands
- def Build; end
-
- # @deprecated Use {#method_missing} dynamic method handling for
- # binary sub-commands
- def Fix; end
-
- # @deprecated Use {#method_missing} dynamic method handling for
- # binary sub-commands
- def Inspect; end
-
- # @deprecated Use {#method_missing} dynamic method handling for
- # binary sub-commands
- def Push; end
-
- # @deprecated Use {#method_missing} dynamic method handling for
- # binary sub-commands
- def Validate; end
-
- # @deprecated Use {#method_missing} dynamic method handling for
- # binary sub-commands
- def Version; end
+ def Version
+ Command.run('version')
+ end
# This class holds the global configuration items
class Configuration
attr_accessor :version
attr_accessor :download_path