@@ -351,7 +351,6 @@ def generate_class klass, template_file = nil
351351 search_index_rel_prefix += @asset_rel_path if @file_output
352352
353353 asset_rel_prefix = rel_prefix + @asset_rel_path
354- svninfo = get_svninfo ( current )
355354
356355 breadcrumb = # used in templates
357356 breadcrumb = generate_nesting_namespaces_breadcrumb ( current , rel_prefix )
@@ -363,7 +362,6 @@ def generate_class klass, template_file = nil
363362 here = binding
364363 # suppress 1.9.3 warning
365364 here . local_variable_set ( :asset_rel_prefix , asset_rel_prefix )
366- here . local_variable_set ( :svninfo , svninfo )
367365 here
368366 end
369367 end
@@ -620,58 +618,6 @@ def setup
620618 @modsort = get_sorted_module_list @classes
621619 end
622620
623- ##
624- # Return a string describing the amount of time in the given number of
625- # seconds in terms a human can understand easily.
626-
627- def time_delta_string seconds
628- return 'less than a minute' if seconds < 60
629- return "#{ seconds / 60 } minute#{ seconds / 60 == 1 ? '' : 's' } " if
630- seconds < 3000 # 50 minutes
631- return 'about one hour' if seconds < 5400 # 90 minutes
632- return "#{ seconds / 3600 } hours" if seconds < 64800 # 18 hours
633- return 'one day' if seconds < 86400 # 1 day
634- return 'about one day' if seconds < 172800 # 2 days
635- return "#{ seconds / 86400 } days" if seconds < 604800 # 1 week
636- return 'about one week' if seconds < 1209600 # 2 week
637- return "#{ seconds / 604800 } weeks" if seconds < 7257600 # 3 months
638- return "#{ seconds / 2419200 } months" if seconds < 31536000 # 1 year
639- return "#{ seconds / 31536000 } years"
640- end
641-
642- # %q$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $"
643- SVNID_PATTERN = /
644- \$ Id:\s
645- (\S +)\s # filename
646- (\d +)\s # rev
647- (\d {4}-\d {2}-\d {2})\s # Date (YYYY-MM-DD)
648- (\d {2}:\d {2}:\d {2}Z)\s # Time (HH:MM:SSZ)
649- (\w +)\s # committer
650- \$ $
651- /x
652-
653- ##
654- # Try to extract Subversion information out of the first constant whose
655- # value looks like a subversion Id tag. If no matching constant is found,
656- # and empty hash is returned.
657-
658- def get_svninfo klass
659- constants = klass . constants or return { }
660-
661- constants . find { |c | c . value =~ SVNID_PATTERN } or return { }
662-
663- filename , rev , date , time , committer = $~. captures
664- commitdate = Time . parse "#{ date } #{ time } "
665-
666- return {
667- :filename => filename ,
668- :rev => Integer ( rev ) ,
669- :commitdate => commitdate ,
670- :commitdelta => time_delta_string ( Time . now - commitdate ) ,
671- :committer => committer ,
672- }
673- end
674-
675621 ##
676622 # Creates a template from its components and the +body_file+.
677623 #
0 commit comments