From c9f9dd8040594a8d041ecd19dbc3d5374eebdeb7 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 2 Mar 2025 13:21:07 +0000 Subject: [PATCH 1/4] Remove unused VCS info partial --- .../template/darkfish/_sidebar_VCS_info.rhtml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml deleted file mode 100644 index 22a12d9e95..0000000000 --- a/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<%- if !svninfo.empty? then %> - -<%- end -%> From b798dc3d801487f1fc44445eb6436dccddc14ba7 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 2 Mar 2025 13:22:56 +0000 Subject: [PATCH 2/4] Remove unused svn info logic --- lib/rdoc/generator/darkfish.rb | 35 ---------------------------------- 1 file changed, 35 deletions(-) diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb index 8e2be10ccf..04c83307e8 100644 --- a/lib/rdoc/generator/darkfish.rb +++ b/lib/rdoc/generator/darkfish.rb @@ -351,7 +351,6 @@ def generate_class klass, template_file = nil search_index_rel_prefix += @asset_rel_path if @file_output asset_rel_prefix = rel_prefix + @asset_rel_path - svninfo = get_svninfo(current) breadcrumb = # used in templates breadcrumb = generate_nesting_namespaces_breadcrumb(current, rel_prefix) @@ -363,7 +362,6 @@ def generate_class klass, template_file = nil here = binding # suppress 1.9.3 warning here.local_variable_set(:asset_rel_prefix, asset_rel_prefix) - here.local_variable_set(:svninfo, svninfo) here end end @@ -639,39 +637,6 @@ def time_delta_string seconds return "#{seconds / 31536000} years" end - # %q$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $" - SVNID_PATTERN = / - \$Id:\s - (\S+)\s # filename - (\d+)\s # rev - (\d{4}-\d{2}-\d{2})\s # Date (YYYY-MM-DD) - (\d{2}:\d{2}:\d{2}Z)\s # Time (HH:MM:SSZ) - (\w+)\s # committer - \$$ - /x - - ## - # Try to extract Subversion information out of the first constant whose - # value looks like a subversion Id tag. If no matching constant is found, - # and empty hash is returned. - - def get_svninfo klass - constants = klass.constants or return {} - - constants.find { |c| c.value =~ SVNID_PATTERN } or return {} - - filename, rev, date, time, committer = $~.captures - commitdate = Time.parse "#{date} #{time}" - - return { - :filename => filename, - :rev => Integer(rev), - :commitdate => commitdate, - :commitdelta => time_delta_string(Time.now - commitdate), - :committer => committer, - } - end - ## # Creates a template from its components and the +body_file+. # From b6ff8eb68a64c9ed7528115b96373830416a2a6e Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 2 Mar 2025 13:23:36 +0000 Subject: [PATCH 3/4] Remove unused Darkfish#time_delta_string method --- lib/rdoc/generator/darkfish.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb index 04c83307e8..c5d92c83c7 100644 --- a/lib/rdoc/generator/darkfish.rb +++ b/lib/rdoc/generator/darkfish.rb @@ -618,25 +618,6 @@ def setup @modsort = get_sorted_module_list @classes end - ## - # Return a string describing the amount of time in the given number of - # seconds in terms a human can understand easily. - - def time_delta_string seconds - return 'less than a minute' if seconds < 60 - return "#{seconds / 60} minute#{seconds / 60 == 1 ? '' : 's'}" if - seconds < 3000 # 50 minutes - return 'about one hour' if seconds < 5400 # 90 minutes - return "#{seconds / 3600} hours" if seconds < 64800 # 18 hours - return 'one day' if seconds < 86400 # 1 day - return 'about one day' if seconds < 172800 # 2 days - return "#{seconds / 86400} days" if seconds < 604800 # 1 week - return 'about one week' if seconds < 1209600 # 2 week - return "#{seconds / 604800} weeks" if seconds < 7257600 # 3 months - return "#{seconds / 2419200} months" if seconds < 31536000 # 1 year - return "#{seconds / 31536000} years" - end - ## # Creates a template from its components and the +body_file+. # From d774bb91aeca71cb7b65e380cb4359063b7ed7ca Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 2 Mar 2025 13:25:22 +0000 Subject: [PATCH 4/4] Remove unused _sidebar_in_files partial --- .../generator/template/darkfish/_sidebar_in_files.rhtml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml deleted file mode 100644 index 74869a4b51..0000000000 --- a/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -