Browse Source

Add Ruby version 3

MasterEnoc 5 years ago
parent
commit
a674156a00
2 changed files with 18 additions and 1 deletions
  1. 12 0
      docs/file-scrapers.md
  2. 6 1
      lib/docs/scrapers/rdoc/ruby.rb

+ 12 - 0
docs/file-scrapers.md

@@ -163,6 +163,18 @@ tar xj --strip-components=1
 ### Ruby / Minitest
 ### Ruby on Rails
 ### Ruby
+Download the tarball of Ruby from https://www.ruby-lang.org/en/downloads/, extract it, run
+`./configure && make html` in your terminal (while your are in the ruby directory) and move
+`.ext/html` to `path/to/devdocs/docs/ruby~$VERSION/`.
+
+Or run the following commands in your terminal:
+```sh
+curl https://cache.ruby-lang.org/pub/ruby/$VERSION/ruby-$RELEASE.tar.gz > ruby.tar; \
+tar -xf ruby.tar; cd ruby-$RELEASE; ./configure && make html; mv .ext/html path/to/devdocs/docs/ruby~$VERSION
+```
+
+To generate the htmls file you have to run `make` command but it does not install Ruby in your system, only generates html files so you have not
+to worry about cleaning or removing a new Ruby installation.
 
 ## Salt Stack
 

+ 6 - 1
lib/docs/scrapers/rdoc/ruby.rb

@@ -63,12 +63,16 @@ module Docs
       /\AXMP/]
 
     options[:attribution] = <<-HTML
-      Ruby Core &copy; 1993&ndash;2017 Yukihiro Matsumoto<br>
+      Ruby Core &copy; 1993&ndash;2020 Yukihiro Matsumoto<br>
       Licensed under the Ruby License.<br>
       Ruby Standard Library &copy; contributors<br>
       Licensed under their own licenses.
     HTML
 
+    version '3' do
+      self.release = '3.0.0'
+    end
+
     version '2.7' do
       self.release = '2.7.2'
     end
@@ -102,6 +106,7 @@ module Docs
           return version
         end
       end
+
     end
   end
 end