| @@ -2,8 +2,7 @@ module Docs · 1 unmodified line |
| 2 | 2 | class Rethinkdb < UrlScraper |
| 3 | 3 | self.name = 'RethinkDB' |
| 4 | 4 | self.type = 'rethinkdb' |
| 5 | | − self.release = '2.2.5' |
| 6 | | − self.base_url = 'https://rethinkdb.com/api/javascript/' |
| 5 | + self.release = '2.3.0' |
| 7 | 6 | self.links = { |
| 8 | 7 | home: 'https://rethinkdb.com/', |
| 9 | 8 | code: 'https://github.com/rethinkdb/rethinkdb' |
| @@ -14,13 +13,41 @@ module Docs · 4 unmodified lines |
| 14 | 13 | options[:trailing_slash] = false |
| 15 | 14 | options[:container] = '.docs-article' |
| 16 | 15 | |
| 17 | | − options[:fix_urls] = ->(url) do |
| 18 | | − url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python)}, 'rethinkdb.com/api/javascript/' |
| 19 | | − end |
| 20 | | − |
| 21 | 16 | options[:attribution] = <<-HTML |
| 22 | 17 | © RethinkDB contributors<br> |
| 23 | 18 | Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. |
| 24 | 19 | HTML |
| 20 | + |
| 21 | + version 'JavaScript' do |
| 22 | + self.base_url = 'https://rethinkdb.com/api/javascript/' |
| 23 | + |
| 24 | + options[:fix_urls] = ->(url) do |
| 25 | + url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python|java)}, 'rethinkdb.com/api/javascript/' |
| 26 | + end |
| 27 | + end |
| 28 | + |
| 29 | + version 'Ruby' do |
| 30 | + self.base_url = 'https://rethinkdb.com/api/ruby/' |
| 31 | + |
| 32 | + options[:fix_urls] = ->(url) do |
| 33 | + url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python|java)}, 'rethinkdb.com/api/ruby/' |
| 34 | + end |
| 35 | + end |
| 36 | + |
| 37 | + version 'Python' do |
| 38 | + self.base_url = 'https://rethinkdb.com/api/python/' |
| 39 | + |
| 40 | + options[:fix_urls] = ->(url) do |
| 41 | + url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python|java)}, 'rethinkdb.com/api/python/' |
| 42 | + end |
| 43 | + end |
| 44 | + |
| 45 | + version 'Java' do |
| 46 | + self.base_url = 'https://rethinkdb.com/api/java/' |
| 47 | + |
| 48 | + options[:fix_urls] = ->(url) do |
| 49 | + url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python|java)}, 'rethinkdb.com/api/java/' |
| 50 | + end |
| 51 | + end |
| 25 | 52 | end |
| 26 | 53 | end |