Class: DamageControl::SCMWeb::ViewCVS
- Inherits:
-
Object
- Object
- DamageControl::SCMWeb::ViewCVS
- Defined in:
- lib/damagecontrol/scm_web.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#baseurl ⇒ Object
Returns the value of attribute baseurl.
Instance Method Summary collapse
- #change_url(change, anchor = false) ⇒ Object
- #changeset_url(changeset, anchor = false) ⇒ Object
-
#initialize(baseurl) ⇒ ViewCVS
constructor
A new instance of ViewCVS.
- #url ⇒ Object
Constructor Details
#initialize(baseurl) ⇒ ViewCVS
Returns a new instance of ViewCVS.
19 20 21 |
# File 'lib/damagecontrol/scm_web.rb', line 19 def initialize(baseurl) @baseurl = baseurl end |
Instance Attribute Details
#baseurl ⇒ Object
Returns the value of attribute baseurl.
17 18 19 |
# File 'lib/damagecontrol/scm_web.rb', line 17 def baseurl @baseurl end |
Instance Method Details
#change_url(change, anchor = false) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/damagecontrol/scm_web.rb', line 27 def change_url(change, anchor=false) result = nil if(change.previous_revision) result = "#{url}#{change.path}?r1=#{change.previous_revision}&r2=#{change.revision}" else # point to the viewcvs (rev) and fisheye (r) revisions (no diff view) result = "#{url}#{change.path}?rev=#{change.revision}&r=#{change.revision}" end anchor ? "<a href=\"#{result}\">#{change.path}</a>" : result end |
#changeset_url(changeset, anchor = false) ⇒ Object
38 39 40 |
# File 'lib/damagecontrol/scm_web.rb', line 38 def changeset_url(changeset, anchor=false) url end |
#url ⇒ Object
23 24 25 |
# File 'lib/damagecontrol/scm_web.rb', line 23 def url RSCM::PathConverter.ensure_trailing_slash(baseurl) end |