bri 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog +6 -0
- data/README.rdoc +7 -0
- data/bin/bri +1 -0
- data/lib/bri.rb +2 -0
- data/lib/bri/match/base.rb +1 -1
- data/lib/bri/renderer.rb +8 -3
- data/lib/bri/search/class.rb +3 -3
- data/spec/lib/bri/match/class_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b20f64d2f12c1afba4d051de9aa6a091167743eefdc88410dddec663795e271f
|
4
|
+
data.tar.gz: 6c34a20f61319303f3877cdda56d757fc29a83ee8b89c8b2a9c4529b8f02d372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6732a87a376c437b97f84f06617baea7b7e2f23ac208d1124adad119ff52beb65081208ec3d11a863a72718e43a5aeacb15a73fc76aad63ef0c2ab84e44e9c40
|
7
|
+
data.tar.gz: bc7d3406f8cca348c58f1435e88174d46f159243ff09661b9ddc0114bdc967d6954e1be263602692af4af98f24e3bf2285a8f69fb9d04311fc54f9ec7753b13b
|
data/Changelog
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
0.4.3
|
2
|
+
- If multiple documentations are found that are all class documentations,
|
3
|
+
display all of these. This is useful in cases that gems extend core
|
4
|
+
classes e.g. ActiveSupport.
|
5
|
+
- Reduce the amount of vertical whitespace caused by rendering empty rdoc nodes
|
6
|
+
|
1
7
|
0.4.2
|
2
8
|
- Fix broken --list-names option
|
3
9
|
- Fix broken multiple choice display
|
data/README.rdoc
CHANGED
@@ -39,6 +39,13 @@ Bri is a Beautiful RI formatter.
|
|
39
39
|
# the given search term, and finally looking for the term
|
40
40
|
# anywhere in the method name
|
41
41
|
|
42
|
+
= Note on ri docs generated by rvm
|
43
|
+
|
44
|
+
If you're using `rvm docs generate` and can't see the listing of
|
45
|
+
methods in class documentations, this is due to rvm marking all methods
|
46
|
+
as private during generation. A workaround for now is to generate the ri
|
47
|
+
documentation with `rdoc --ri`.
|
48
|
+
|
42
49
|
= Caveats
|
43
50
|
I'm reviving this project that has been left rotting for nearly 8 years.
|
44
51
|
Due to bitrot, changes in rdoc internals and trying to understand my code
|
data/bin/bri
CHANGED
data/lib/bri.rb
CHANGED
@@ -18,6 +18,8 @@ module Bri
|
|
18
18
|
"No matching results found"
|
19
19
|
elsif results.size == 1
|
20
20
|
results.first.to_s
|
21
|
+
elsif results.all? { |r| r.is_a?(Bri::Match::Class) }
|
22
|
+
results.map(&:to_s)
|
21
23
|
else
|
22
24
|
qualified_methods = results.map(&:full_name).sort
|
23
25
|
ERB.new( Bri::Templates::MULTIPLE_CHOICES, nil, '<>' ).result( binding )
|
data/lib/bri/match/base.rb
CHANGED
data/lib/bri/renderer.rb
CHANGED
@@ -54,9 +54,14 @@ module Bri
|
|
54
54
|
|
55
55
|
else
|
56
56
|
text = extract_text( element, width, alignment_width )
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
|
58
|
+
if text == "\n"
|
59
|
+
nil
|
60
|
+
else
|
61
|
+
styled_text = replace_markup( text )
|
62
|
+
wrapped_text = wrap_to_width( styled_text, width )
|
63
|
+
indent( wrapped_text )
|
64
|
+
end
|
60
65
|
end
|
61
66
|
end
|
62
67
|
|
data/lib/bri/search/class.rb
CHANGED
@@ -3,9 +3,9 @@ module Bri
|
|
3
3
|
class Class < Base
|
4
4
|
def search( type = :fully_qualified )
|
5
5
|
# NOTE: classes are only searched as fully qualified for the time being
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
Bri::Mall.instance.stores.select { |s| s.module_names.include?( @term ) }.each do |store|
|
7
|
+
@matches << Bri::Match::Class.new( store.load_class( @term ), store )
|
8
|
+
end
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -47,7 +47,7 @@ describe Bri::Match::Class do
|
|
47
47
|
|
48
48
|
describe "#description_paragraphs" do
|
49
49
|
it "should be empty for an undocumented class" do
|
50
|
-
empty_class.description_paragraphs.should == [
|
50
|
+
empty_class.description_paragraphs.should == []
|
51
51
|
end
|
52
52
|
|
53
53
|
it "should contain rendered text for a documented class" do
|