Class: BuildTool::Cfg::GitSvnDeclarationNodeVisitor
Instance Attribute Summary
Attributes inherited from VisitorBase
#configuration
Instance Method Summary
collapse
#visit_GitDeclarationNode, #visit_GitRemoteDeclarationNode, #visit_GitTrackNode
#visit_GitRemoteDeclarationNode, #visit_GitRemotePushNode, #visit_GitRemoteUrlNode
Methods inherited from ListVisitor
#visit, #visit_nodes
Methods inherited from VisitorBase
#visit_Object
Constructor Details
Returns a new instance of GitSvnDeclarationNodeVisitor.
390
391
392
|
# File 'lib/build-tool/cfg/visitor.rb', line 390
def initialize( configuration, vcs )
super( configuration, vcs )
end
|
Instance Method Details
#visit_GitSvnDeclarationNode(node) ⇒ Object
394
395
396
397
398
399
400
|
# File 'lib/build-tool/cfg/visitor.rb', line 394
def visit_GitSvnDeclarationNode( node )
visit_nodes( node.values )
if @remote.server.nil? and @remote.path.nil?
@vcs.remote.delete( "origin" )
end
return @vcs
end
|
#visit_GitSvnExternalNode(node) ⇒ Object
402
403
404
405
|
# File 'lib/build-tool/cfg/visitor.rb', line 402
def visit_GitSvnExternalNode( node )
( name, value ) = node.value.split( '#' )
@vcs.add_external( name, value )
end
|
#visit_RemotePathNode(node) ⇒ Object
420
421
422
|
# File 'lib/build-tool/cfg/visitor.rb', line 420
def visit_RemotePathNode( node )
@vcs.remote_path = node.value
end
|
#visit_RepositoryDeclarationNode(node) ⇒ Object
407
408
409
410
|
# File 'lib/build-tool/cfg/visitor.rb', line 407
def visit_RepositoryDeclarationNode( node )
visitor = RepositoryDeclarationNodeVisitor.new( configuration )
@vcs.repository = node.accept( visitor )
end
|
#visit_UseRepositoryNode(node) ⇒ Object
412
413
414
415
416
417
418
|
# File 'lib/build-tool/cfg/visitor.rb', line 412
def visit_UseRepositoryNode( node )
repo = configuration.repository( node.value )
if repo.nil?
raise ConfigurationError, "Unknown repository #{node.value}!"
end
@vcs.repository = repo
end
|