[DRE-commits] r1649 - in website: plugin src
paulvt at alioth.debian.org
paulvt at alioth.debian.org
Sun May 27 13:39:24 UTC 2007
Author: paulvt
Date: 2007-05-27 13:39:24 +0000 (Sun, 27 May 2007)
New Revision: 1649
Modified:
website/plugin/fileadate.rb
website/plugin/filecdate.rb
website/plugin/filemdate.rb
website/src/default.template
Log:
* Changed the file{a,c,m}date tags to support the format parameter.
* Modified the default format to follow the date tag.
* Changed the wikiLink root URL to point to our wiki.debian.org spot,
instead of our no longer existing wiki on alioth.
Modified: website/plugin/fileadate.rb
===================================================================
--- website/plugin/fileadate.rb 2007-05-27 12:47:24 UTC (rev 1648)
+++ website/plugin/fileadate.rb 2007-05-27 13:39:24 UTC (rev 1649)
@@ -10,11 +10,14 @@
class FileADateTag < Tags::DefaultTag
infos( :name => 'Custom/FileADate', :author => 'Paul van Tilburg',
- :summary => "Puts the access time and date of the file on the page")
+ :summary => "Puts the access time and date of the file on the page")
+ param 'format', '%A, %B %d %H:%M:%S %Z %Y',
+ 'The format of the date (same op tions as Ruby\'s Time#strftime).'
+
register_tag 'fileatime'
def process_tag(tag, chain)
- return File.atime( chain.last.node_info[:src] ).to_s
+ return File.atime( chain.last.node_info[:src] ).strftime( param( 'format' ) )
end
end # class FileADateTag
Modified: website/plugin/filecdate.rb
===================================================================
--- website/plugin/filecdate.rb 2007-05-27 12:47:24 UTC (rev 1648)
+++ website/plugin/filecdate.rb 2007-05-27 13:39:24 UTC (rev 1649)
@@ -12,9 +12,12 @@
infos( :name => 'Custom/FileCDate', :author => 'Paul van Tilburg',
:summary => "Puts the create time and date of the file on the page" )
+ param 'format', '%A, %B %d %H:%M:%S %Z %Y',
+ 'The format of the date (same op tions as Ruby\'s Time#strftime).'
+
register_tag 'filecatime'
def process_tag(tag, chain)
- return File.ctime( chain.last.node_info[:src] ).to_s
+ return File.ctime( chain.last.node_info[:src] ).strftime( param( 'format' ) )
end
end # class FileCDateTag
Modified: website/plugin/filemdate.rb
===================================================================
--- website/plugin/filemdate.rb 2007-05-27 12:47:24 UTC (rev 1648)
+++ website/plugin/filemdate.rb 2007-05-27 13:39:24 UTC (rev 1649)
@@ -13,10 +13,13 @@
:summary =>
"Puts the modification time and date of the file on the page" )
+ param 'format', '%A, %B %d %H:%M:%S %Z %Y',
+ 'The format of the date (same op tions as Ruby\'s Time#strftime).'
+
register_tag 'filemtime'
def process_tag(tag, chain)
- return File.mtime( chain.last.node_info[:src] ).to_s
+ return File.mtime( chain.last.node_info[:src] ).strftime( param( 'format' ) )
end
end # class FileMDateTag
Modified: website/src/default.template
===================================================================
--- website/src/default.template 2007-05-27 12:47:24 UTC (rev 1648)
+++ website/src/default.template 2007-05-27 13:39:24 UTC (rev 1649)
@@ -16,7 +16,7 @@
<div id="headerbar" class="bar">
<span class="left">Navigation: {breadcrumbTrail: }</span>
<span class="right">Language: {langbar: }</span>
- <span class="right">WikiLink: {wikilink: {rootURL: /cgi-bin/wiki/index.cgi?,
+ <span class="right">WikiLink: {wikilink: {rootURL: "http://wiki.debian.org/DebianRubyExtras/",
replacementChar: ""}}</span>
<div style="clear:both"></div>
</div>
@@ -30,9 +30,8 @@
</div>
<div id="footer" class="bar">
- This page was last updated on <b>{filemtime: }</b> by
- <b> {svnAuthor:} </b><br/>
- This site is generated with <a href="http://webgen.rubyforge.org">webgen</a> on <b>{date: }</b>
+ This page was last updated on <b>{filemtime: }</b> by <b>{svnAuthor:}.</b><br/>
+ This site is generated with <a href="http://webgen.rubyforge.org">webgen</a> on <b>{date: }.</b>
</div>
</div>
</body>
More information about the Pkg-ruby-extras-commits
mailing list