Properly include Empty argument to calls
This commit is contained in:
parent
ad402fd6d0
commit
8d8e9ae8ea
@ -8,7 +8,7 @@ module VagrantPlugins
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def has_capability_func
|
||||
spec = client.has_capability_spec
|
||||
spec = client.has_capability_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.has_capability(args).has_capability
|
||||
end
|
||||
@ -52,8 +52,9 @@ module VagrantPlugins
|
||||
def capability(cap_name, *args)
|
||||
logger.debug("executing capability #{cap_name}")
|
||||
spec, cb = capability_func(cap_name)
|
||||
args << Type::Direct.new(value: args)
|
||||
cb.call(cap_name, generate_funcspec_args(spec, *args))
|
||||
cb.call(cap_name,
|
||||
generate_funcspec_args(spec,
|
||||
Type::Direct.new(value: args), *args))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -7,7 +7,7 @@ module VagrantPlugins
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def parent_func
|
||||
spec = client.parent_spec
|
||||
spec = client.parent_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.parent(args).parent
|
||||
end
|
||||
|
||||
@ -6,7 +6,7 @@ module VagrantPlugins
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def push_func
|
||||
spec = client.push_spec
|
||||
spec = client.push_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.push(args)
|
||||
end
|
||||
|
||||
@ -7,7 +7,7 @@ module VagrantPlugins
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def usable_func
|
||||
spec = client.usable_spec
|
||||
spec = client.usable_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.usable(args).usable
|
||||
end
|
||||
@ -26,7 +26,7 @@ module VagrantPlugins
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def enable_func
|
||||
spec = client.enable_spec
|
||||
spec = client.enable_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.enable(args)
|
||||
end
|
||||
@ -42,8 +42,11 @@ module VagrantPlugins
|
||||
run_func(machine, folders, opts)
|
||||
end
|
||||
|
||||
# Generate callback and spec for required arguments
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def disable_func
|
||||
spec = client.disable_spec
|
||||
spec = client.disable_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.disable(args)
|
||||
end
|
||||
@ -63,7 +66,7 @@ module VagrantPlugins
|
||||
#
|
||||
# @return [SDK::FuncSpec, Proc]
|
||||
def cleanup_func
|
||||
spec = client.cleanup_spec
|
||||
spec = client.cleanup_spec(Empty.new)
|
||||
cb = proc do |args|
|
||||
client.cleanup(args)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user