Fix missing methods in cask DSL.
This commit is contained in:
parent
85c061295d
commit
77d25da5e5
@ -282,6 +282,10 @@ module Cask
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def respond_to_missing?(*)
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
def method_missing(method, *)
|
def method_missing(method, *)
|
||||||
if method
|
if method
|
||||||
Utils.method_missing_message(method, token)
|
Utils.method_missing_message(method, token)
|
||||||
@ -291,10 +295,6 @@ module Cask
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def respond_to_missing?(*)
|
|
||||||
super || true
|
|
||||||
end
|
|
||||||
|
|
||||||
def appdir
|
def appdir
|
||||||
cask.config.appdir
|
cask.config.appdir
|
||||||
end
|
end
|
||||||
|
@ -18,6 +18,10 @@ module Cask
|
|||||||
@command.run!(executable, **options)
|
@command.run!(executable, **options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def respond_to_missing?(*)
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
def method_missing(method, *)
|
def method_missing(method, *)
|
||||||
if method
|
if method
|
||||||
underscored_class = self.class.name.gsub(/([[:lower:]])([[:upper:]][[:lower:]])/, '\1_\2').downcase
|
underscored_class = self.class.name.gsub(/([[:lower:]])([[:upper:]][[:lower:]])/, '\1_\2').downcase
|
||||||
@ -28,10 +32,6 @@ module Cask
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def respond_to_missing?(*)
|
|
||||||
super || true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -80,12 +80,11 @@ module Cask
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.method_missing_message(method, token, section = nil)
|
def self.method_missing_message(method, token, section = nil)
|
||||||
poo = []
|
message = +"Unexpected method '#{method}' called "
|
||||||
poo << "Unexpected method '#{method}' called"
|
message << "during #{section} " if section
|
||||||
poo << "during #{section}" if section
|
message << "on Cask #{token}."
|
||||||
poo << "on Cask #{token}."
|
|
||||||
|
|
||||||
opoo("#{poo.join(" ")}\n#{error_message_with_suggestions}")
|
opoo "#{message}\n#{error_message_with_suggestions}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user