Remove from string mappers
This commit is contained in:
parent
72b8547cce
commit
e6a3e16b48
@ -39,21 +39,6 @@ module VagrantPlugins
|
||||
project
|
||||
end
|
||||
end
|
||||
|
||||
# Build a synced folder client from a serialized proto string
|
||||
class BasisFromString < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
i << Input.new(type: String)
|
||||
i << Input.new(type: Broker)
|
||||
end
|
||||
super(inputs: inputs, output: Client::Basis, func: method(:converter))
|
||||
end
|
||||
|
||||
def converter(proto, broker)
|
||||
Client::Basis.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -53,21 +53,6 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
# Build a machine client from a serialized proto string
|
||||
class MachineFromString < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
i << Input.new(type: String)
|
||||
i << Input.new(type: Broker)
|
||||
end
|
||||
super(inputs: inputs, output: Client::Target::Machine, func: method(:converter))
|
||||
end
|
||||
|
||||
def converter(proto, broker)
|
||||
Client::Target::Machine.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
|
||||
# Build a machine from a target
|
||||
class MachineFromTarget < Mapper
|
||||
def initialize
|
||||
|
||||
@ -58,21 +58,6 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
# Build a machine client from a serialized proto string
|
||||
class ProjectFromString < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
i << Input.new(type: String)
|
||||
i << Input.new(type: Broker)
|
||||
end
|
||||
super(inputs: inputs, output: Client::Project, func: method(:converter))
|
||||
end
|
||||
|
||||
def converter(proto, broker)
|
||||
Client::Project.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
|
||||
class ProjectFromTarget < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
|
||||
@ -50,21 +50,6 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
# Build a synced folder client from a serialized proto string
|
||||
class SyncedFolderFromString < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
i << Input.new(type: String)
|
||||
i << Input.new(type: Broker)
|
||||
end
|
||||
super(inputs: inputs, output: Client::SyncedFolder, func: method(:converter))
|
||||
end
|
||||
|
||||
def converter(proto, broker)
|
||||
Client::SyncedFolder.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
|
||||
# Build a synced folder from a synced folder client
|
||||
class SyncedFolderFromProto < Mapper
|
||||
def initialize
|
||||
|
||||
@ -52,21 +52,6 @@ module VagrantPlugins
|
||||
Client::TargetIndex.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
|
||||
# Build a target index client from a serialized proto string
|
||||
class TargetIndexFromString < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
i << Input.new(type: String)
|
||||
i << Input.new(type: Broker)
|
||||
end
|
||||
super(inputs: inputs, output: Client::TargetIndex, func: method(:converter))
|
||||
end
|
||||
|
||||
def converter(proto, broker)
|
||||
Client::TargetIndex.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -53,21 +53,6 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
# Build a terminal client from a serialized proto string
|
||||
class TerminalFromString < Mapper
|
||||
def initialize
|
||||
inputs = [].tap do |i|
|
||||
i << Input.new(type: String)
|
||||
i << Input.new(type: Broker)
|
||||
end
|
||||
super(inputs: inputs, output: Client::Terminal, func: method(:converter))
|
||||
end
|
||||
|
||||
def converter(proto, broker)
|
||||
Client::Terminal.load(proto, broker: broker)
|
||||
end
|
||||
end
|
||||
|
||||
class TerminalFromProject < Mapper
|
||||
def initialize
|
||||
super(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user