File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -70,4 +70,13 @@ def asciinema_video(id, speed: 1)
70
70
|</ div>
71
71
HTML
72
72
end
73
+
74
+ def rspec_documentation
75
+ hash = Hash . new { |h , k | h [ k ] = [ ] }
76
+ Dir [ "#{ root } /source/documentation/*/*" ] . each do |dir |
77
+ version , gem = dir . scan ( %r{/source/documentation/([^/]+)/([^/]+)} ) . first . flatten
78
+ hash [ gem ] << version
79
+ end
80
+ hash
81
+ end
73
82
end
Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ section
17
17
h2 API Documentation
18
18
19
19
p
20
- | You can find detailed API documentation on the Rubydoc.info site:
20
+ | You can find detailed API documentation for versions below
21
21
22
22
ul
23
- li = link_to 'http://rubydoc.info/gems/rspec-core', 'http://rubydoc.info/gems/rspec-core'
24
- li = link_to 'http://rubydoc.info/gems/rspec-expectations', 'http://rubydoc.info/gems/rspec-expectations'
25
- li = link_to 'http://rubydoc.info/gems/rspec-mocks', 'http://rubydoc.info/gems/rspec-mocks'
26
- li = link_to 'http://rubydoc.info/gems/rspec-rails', 'http://rubydoc.info/gems/rspec-rails'
23
+ - rspec_documentation.each do |gem, versions|
24
+ li
25
+ b
26
+ | #{ gem} :  ;
27
+ - versions.sort.reverse.each do |version|
28
+ = link_to version, "/documentation/#{version}/#{gem}/"
29
+ |   ;
You can’t perform that action at this time.
0 commit comments