Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused darkfish parts #1303

Merged
merged 4 commits into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions lib/rdoc/generator/darkfish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -620,58 +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

# %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+.
#
Expand Down
19 changes: 0 additions & 19 deletions lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml

This file was deleted.

9 changes: 0 additions & 9 deletions lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml

This file was deleted.

Loading