Class: ScmWeb::ViewCvs
Instance Attribute Summary collapse
-
#cvs_host_name ⇒ Object
Returns the value of attribute cvs_host_name.
-
#cvs_server_path ⇒ Object
Returns the value of attribute cvs_server_path.
-
#module_regexp ⇒ Object
Returns the value of attribute module_regexp.
-
#project_unix_name ⇒ Object
Returns the value of attribute project_unix_name.
-
#uri_specs ⇒ Object
The variables to use in uri_specs are:.
Instance Method Summary collapse
-
#initialize(uri_specs = {}, cvs_host_name = nil, cvs_server_path = nil, project_unix_name = nil, module_regexp = nil) ⇒ ViewCvs
constructor
A new instance of ViewCvs.
- #scms ⇒ Object
Methods inherited from Base
Methods included from FileUri
Constructor Details
#initialize(uri_specs = {}, cvs_host_name = nil, cvs_server_path = nil, project_unix_name = nil, module_regexp = nil) ⇒ ViewCvs
Returns a new instance of ViewCvs.
6 7 8 9 |
# File 'lib/scm_web/view_cvs.rb', line 6 def initialize(uri_specs={}, cvs_host_name=nil, cvs_server_path=nil, project_unix_name=nil, module_regexp=nil) @uri_specs, @cvs_host_name, @cvs_server_path, @project_unix_name, @module_regexp = uri_specs, cvs_host_name, cvs_server_path, project_unix_name, module_regexp end |
Instance Attribute Details
#cvs_host_name ⇒ Object
Returns the value of attribute cvs_host_name.
4 5 6 |
# File 'lib/scm_web/view_cvs.rb', line 4 def cvs_host_name @cvs_host_name end |
#cvs_server_path ⇒ Object
Returns the value of attribute cvs_server_path.
4 5 6 |
# File 'lib/scm_web/view_cvs.rb', line 4 def cvs_server_path @cvs_server_path end |
#module_regexp ⇒ Object
Returns the value of attribute module_regexp.
4 5 6 |
# File 'lib/scm_web/view_cvs.rb', line 4 def module_regexp @module_regexp end |
#project_unix_name ⇒ Object
Returns the value of attribute project_unix_name.
4 5 6 |
# File 'lib/scm_web/view_cvs.rb', line 4 def project_unix_name @project_unix_name end |
#uri_specs ⇒ Object
The variables to use in uri_specs are:
-
path
-
revision
-
previous_revision
17 18 19 |
# File 'lib/scm_web/view_cvs.rb', line 17 def uri_specs @uri_specs end |
Instance Method Details
#scms ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/scm_web/view_cvs.rb', line 21 def scms unless(@scms) require 'rscm' @scms = [] cvs_root = open(file_uri) do |data| data.each_line do |line| if line =~ @module_regexp mod = $1 unless(mod == "CVSROOT") scm = RSCM::Cvs.new scm.root = ":pserver:anonymous@#{cvs_host_name}:#{cvs_server_path}" scm.mod = mod @scms << scm end end end end end @scms end |