Class: BuildTool::Cfg::GitRemoteDeclarationNodeVisitor
Instance Attribute Summary
#configuration
Instance Method Summary
collapse
Methods inherited from ListVisitor
#visit, #visit_nodes
#initialize, #visit_Object
Instance Method Details
#visit_GitRemoteDeclarationNode(node) ⇒ Object
332
333
334
335
336
337
338
|
# File 'lib/build-tool/cfg/visitor.rb', line 332
def visit_GitRemoteDeclarationNode( node )
name = node.values[0]
@remote = BuildTool::VCS::GitRemote.new( name )
stmts = node.values[1]
visit_nodes( stmts )
return @remote
end
|
#visit_GitRemotePushNode(node) ⇒ Object
353
354
355
356
357
358
359
360
361
362
363
364
|
# File 'lib/build-tool/cfg/visitor.rb', line 353
def visit_GitRemotePushNode( node )
if node.values.length == 2
@remote.push_server = configuration.server( node.values[0] )
if @remote.push_server.nil?
raise ConfigurationError, "Unknown server #{node.values[0]} configured."
end
@remote.push_path = node.values[1]
else
@remote.push_server = BuildTool::Server.new( "unnamed" )
@remote.push_server.host = node.values[0]
end
end
|
#visit_GitRemoteUrlNode(node) ⇒ Object
340
341
342
343
344
345
346
347
348
349
350
351
|
# File 'lib/build-tool/cfg/visitor.rb', line 340
def visit_GitRemoteUrlNode( node )
if node.values.length == 2
@remote.server = configuration.server( node.values[0] )
if @remote.server.nil?
raise ConfigurationError, "Unknown server #{node.values[0]} configured."
end
@remote.path = node.values[1]
else
@remote.server = BuildTool::Server.new( "unnamed" )
@remote.server.host = node.values[0]
end
end
|