Skip to content

Commit b798dc3

Browse files
committed
Remove unused svn info logic
1 parent c9f9dd8 commit b798dc3

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

lib/rdoc/generator/darkfish.rb

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -639,39 +637,6 @@ def time_delta_string seconds
639637
return "#{seconds / 31536000} years"
640638
end
641639

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-
675640
##
676641
# Creates a template from its components and the +body_file+.
677642
#

0 commit comments

Comments
 (0)