Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rdoc/rdoc into no-hoe
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Jul 14, 2016
2 parents 4512e06 + 1d29d00 commit ba95a59
Show file tree
Hide file tree
Showing 203 changed files with 354 additions and 59 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.1.10
- 2.2.5
- 2.3.1
- ruby-head
- rbx-2
- jruby-1.7.25
- jruby-9.1.0.0
script: rake
matrix:
allow_failures:
- rvm: 1.8.7
- rvm: jruby-1.7.25
- rvm: jruby-9.1.0.0
- rvm: rbx-2
- rvm: ruby-head
10 changes: 9 additions & 1 deletion History.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

* Bug fixes
* Ensure badge data is included in result of JsonIndex template.
* Ensure items in the nil section are displayed in HTML output. Issue #399
by Daniel Svensson.
* Parse rb_intern_const correctly in C. PR #381 by Sho Hashimoto.
* Fix broken assets caused by #335 when serving ri. PR #360 by Alex Wood.
* Don't try to parse svg files. Issue #350 by Sigurd Svela.

* Minor enhancements
* Improve class name expansion/resolution in ri. PR #400 by NARUSE, Yui

=== 4.2.2 / 2016-02-09

Expand Down Expand Up @@ -693,7 +701,7 @@ Changes since RDoc 4.0.0.rc.2:

* Major enhancements
* RDoc HTML output has been improved:
* The search from Володя Колесников's (Vladimir Kolesnikov) Sdoc has been
* The search from Володя Колесников's (Vladimir Kolesnikov) SDoc has been
integrated.

The search index generation is a reusable component through
Expand Down
4 changes: 2 additions & 2 deletions LEGAL.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Darkfish::
* lib/rdoc/generator/template/darkfish/*
* lib/rdoc/generator/template/darkfish/images

Sdoc::
SDoc::
Portions of SDoc by (Володя Колесников) Vladimir Kolesnikov are included
under the MIT license as RDoc::Generator::JsonIndex. See
lib/rdoc/generator/json_index.rb for license information.
Expand All @@ -23,7 +23,7 @@ Sdoc::
* lib/rdoc/generator/template/json_index/*
* The +#search_index+ methods on RDoc::CodeObject subclasses were derived
from sdoc.
* RDoc::ClassModule#document_self_or_methods comes from Sdoc.
* RDoc::ClassModule#document_self_or_methods comes from SDoc.

peg-markdown::
RDoc's Markdown support is derived from peg-markdown by John MacFarlane. It
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,3 @@ task :diff_rubinius do
sh "diff #{diff_options} lib/rdoc #{rubinius_dir}/lib/rdoc; true"
sh "diff #{diff_options} test #{rubinius_dir}/test/rdoc; true"
end

3 changes: 2 additions & 1 deletion lib/rdoc.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
$DEBUG_RDOC = nil

# :main: README.rdoc
Expand Down Expand Up @@ -64,7 +65,7 @@ class Error < RuntimeError; end
##
# RDoc version you are using

VERSION = '4.3.0-alpha'
VERSION = '4.2.3'

##
# Method visibilities
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/alias.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Represent an alias, which is an old_name/new_name pair associated with a
# particular context
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/anon_class.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# An anonymous class like:
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/any_method.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# AnyMethod is the base class for objects representing methods

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/attr.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# An attribute created by \#attr, \#attr_reader, \#attr_writer or
# \#attr_accessor
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/class_module.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# ClassModule is the base class for objects representing either a class or a
# module.
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/code_object.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Base class for the RDoc code tree.
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/code_objects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
# This file was used to load all the RDoc::CodeObject subclasses at once. Now
# autoload handles this.

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/comment.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A comment holds the text comment for a RDoc::CodeObject and provides a
# unified way of cleaning it up and parsing it into an RDoc::Markup::Document.
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/constant.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A constant

Expand Down
5 changes: 4 additions & 1 deletion lib/rdoc/context.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'cgi'

##
Expand Down Expand Up @@ -788,7 +789,9 @@ def find_class_method_named(name)
# Finds a constant with +name+ in this context

def find_constant_named(name)
@constants.find {|m| m.name == name}
@constants.find do |m|
m.name == name || m.full_name == name
end
end

##
Expand Down
7 changes: 7 additions & 0 deletions lib/rdoc/context/section.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A section of documentation like:
#
Expand Down Expand Up @@ -57,6 +58,8 @@ def == other
self.class === other and @title == other.title
end

alias eql? ==

##
# Adds +comment+ to this section

Expand Down Expand Up @@ -127,6 +130,10 @@ def inspect # :nodoc:
"#<%s:0x%x %p>" % [self.class, object_id, title]
end

def hash # :nodoc:
@title.hash
end

##
# The files comments in this section come from

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/cross_reference.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# RDoc::CrossReference is a reusable way to create cross references for names.

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/encoding.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: US-ASCII
# frozen_string_literal: false

##
# This class is a wrapper around File IO and Encoding that helps RDoc load
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/erb_partial.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Allows an ERB template to be rendered in the context (binding) of an
# existing ERB template evaluation.
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/erbio.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'erb'

##
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/extend.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A Module extension to a class with \#extend
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# RDoc uses generators to turn parsed source code in the form of an
# RDoc::CodeObject tree into some form of output. RDoc comes with the HTML
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/darkfish.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
# -*- mode: ruby; ruby-indent-level: 2; tab-width: 2 -*-

require 'erb'
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/json_index.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
require 'json'
begin
require 'zlib'
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/markup.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Handle common RDoc::Markup tasks for various CodeObjects
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/pot.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Generates a POT file.
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/pot/message_extractor.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Extracts message from RDoc::Store

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/pot/po.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Generates a PO format text

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/pot/po_entry.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A PO entry in PO

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/generator/ri.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# Generates ri data files

Expand Down
3 changes: 2 additions & 1 deletion lib/rdoc/generator/template/darkfish/_head.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<title><%= h @title %></title>

<script type="text/javascript">
var rdoc_rel_prefix = "<%= rel_prefix %>/";
var rdoc_rel_prefix = "<%= asset_rel_prefix %>/";
var index_rel_prefix = "<%= rel_prefix %>/";
</script>

<script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
Expand Down
12 changes: 6 additions & 6 deletions lib/rdoc/generator/template/darkfish/css/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
font-weight: 400;
src: local("Source Code Pro"),
local("SourceCodePro-Regular"),
url("fonts/SourceCodePro-Regular.ttf") format("truetype");
url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
}

@font-face {
Expand All @@ -26,7 +26,7 @@
font-weight: 700;
src: local("Source Code Pro Bold"),
local("SourceCodePro-Bold"),
url("fonts/SourceCodePro-Bold.ttf") format("truetype");
url("../fonts/SourceCodePro-Bold.ttf") format("truetype");
}

/*
Expand All @@ -46,7 +46,7 @@
font-weight: 300;
src: local("Lato Light"),
local("Lato-Light"),
url("fonts/Lato-Light.ttf") format("truetype");
url("../fonts/Lato-Light.ttf") format("truetype");
}

@font-face {
Expand All @@ -55,7 +55,7 @@
font-weight: 300;
src: local("Lato Light Italic"),
local("Lato-LightItalic"),
url("fonts/Lato-LightItalic.ttf") format("truetype");
url("../fonts/Lato-LightItalic.ttf") format("truetype");
}

@font-face {
Expand All @@ -64,7 +64,7 @@
font-weight: 700;
src: local("Lato Regular"),
local("Lato-Regular"),
url("fonts/Lato-Regular.ttf") format("truetype");
url("../fonts/Lato-Regular.ttf") format("truetype");
}

@font-face {
Expand All @@ -73,7 +73,7 @@
font-weight: 700;
src: local("Lato Italic"),
local("Lato-Italic"),
url("fonts/Lato-RegularItalic.ttf") format("truetype");
url("../fonts/Lato-RegularItalic.ttf") format("truetype");
}

/*
Expand Down
14 changes: 7 additions & 7 deletions lib/rdoc/generator/template/darkfish/js/darkfish.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function hookSearch() {
var html = '';

// TODO add relative path to <script> per-page
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
if (result.params)
html += '<span class="params">' + result.params + '</span>';
html += '</a>';
Expand Down Expand Up @@ -121,9 +121,9 @@ function highlightClickTarget( event ) {
};
};

function loadAsync(path, success) {
function loadAsync(path, success, prefix) {
$.ajax({
url: rdoc_rel_prefix + path,
url: prefix + path,
dataType: 'script',
success: success,
cache: true
Expand Down Expand Up @@ -154,8 +154,8 @@ $(document).ready( function() {
});
}

loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
loadAsync('js/search.js', search_success_function('search_loaded'));
loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
});
1 change: 1 addition & 0 deletions lib/rdoc/ghost_method.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# GhostMethod represents a method referenced only by a comment

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/i18n.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# This module provides i18n realated features.

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/i18n/locale.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A message container for a locale.
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/i18n/text.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# An i18n supported text.
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/include.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# A Module included in a class with \#include
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/known_classes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
module RDoc

##
Expand Down
2 changes: 1 addition & 1 deletion lib/rdoc/markdown.kpeg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# data = File.read("README.md")
# formatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
# html = RDoc::Markdown.parse(data).accept(@formatter)
# html = RDoc::Markdown.parse(data).accept(formatter)
#
# # do something with html
#
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/markdown/entities.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# HTML entity name map for RDoc::Markdown

Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/markdown/literals_1_8.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
# :markup: markdown

##
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/markdown/literals_1_9.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: UTF-8
# frozen_string_literal: false
# :markup: markdown

##
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/markup.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
##
# RDoc::Markup parses plain text documents and attempts to decompose them into
# their constituent parts. Some of these parts are high-level: paragraphs,
Expand Down
Loading

0 comments on commit ba95a59

Please sign in to comment.