Module: ScmWeb::FileUri
- Included in:
- Base, Tracker::Trac::TracProject
- Defined in:
- lib/scm_web/file_uri.rb
Instance Method Summary collapse
-
#file_uri(path = "", options = {:type=>"overview"}) ⇒ Object
TODO: rename to file_uri to avoid the clash that is currently in Trac Returns the URI for the file at
path.
Instance Method Details
#file_uri(path = "", options = {:type=>"overview"}) ⇒ Object
TODO: rename to file_uri to avoid the clash that is currently in Trac Returns the URI for the file at path. Options are:
:type (can be one of :overview, :raw or :html)
:revision (the revision of the file. must be specified when :type is :raw or :html)
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/scm_web/file_uri.rb', line 8 def file_uri(path="", ={:type=>"overview"}) type = [:type] raise "No :type specified" unless type uri_spec = uri_specs[type] raise "No uri_spec for #{type}" unless uri_spec project_unix_name = @project_unix_name path_prefix = [:path_prefix] revision = [:revision] previous_revision = [:previous_revision] eval("\"#{uri_spec}\"", binding) end |