Unified · Split
| @@ -4,9 +4,9 @@ module Docs · 3 unmodified lines | |||
| 4 | def call | 4 | def call |
| 5 | at_css('ul')['class'] = 'commands' if root_page? | 5 | at_css('ul')['class'] = 'commands' if root_page? |
| 6 | 6 | ||
| 7 | css('nav', 'aside', 'form').remove | 7 | css('nav', 'aside', 'form', '.anchor-link').remove |
| 8 | 8 | ||
| 9 | css('> article', 'pre > code').each do |node| | 9 | css('> article', '.article-main', 'pre > code', '.container').each do |node| |
| 10 | node.before(node.children).remove | 10 | node.before(node.children).remove |
| 11 | end | 11 | end |
| 12 | 12 | ||
| @@ -7,18 +7,19 @@ module Docs · 6 unmodified lines | |||
| 7 | 7 | ||
| 8 | def get_type | 8 | def get_type |
| 9 | case at_css('aside > ul:last-child a').content.strip | 9 | case at_css('aside > ul:last-child a').content.strip |
| 10 | when 'DEL' then 'Keys' | 10 | when 'DEL' then 'Keys' |
| 11 | when 'APPEND' then 'Strings' | 11 | when 'APPEND' then 'Strings' |
| 12 | when 'HDEL' then 'Hashes' | 12 | when 'HDEL' then 'Hashes' |
| 13 | when 'BLPOP' then 'Lists' | 13 | when 'BLPOP' then 'Lists' |
| 14 | when 'SADD' then 'Sets' | 14 | when 'SADD' then 'Sets' |
| 15 | when 'ZADD' then 'Sorted Sets' | 15 | when 'ZADD' then 'Sorted Sets' |
| 16 | when 'PSUBSCRIBE' then 'Pub/Sub' | 16 | when 'PSUBSCRIBE' then 'Pub/Sub' |
| 17 | when 'DISCARD' then 'Transactions' | 17 | when 'DISCARD' then 'Transactions' |
| 18 | when 'EVAL' then 'Scripting' | 18 | when 'EVAL' then 'Scripting' |
| 19 | when 'AUTH' then 'Connection' | 19 | when 'AUTH' then 'Connection' |
| 20 | when 'BGREWRITEAOF' then 'Server' | 20 | when 'BGREWRITEAOF' then 'Server' |
| 21 | when 'PFADD' then 'HyperLogLog' | 21 | when 'PFADD' then 'HyperLogLog' |
| 22 | when 'CLUSTER ADDSLOTS' then 'Cluster' | ||
| 22 | else 'Miscellaneous' | 23 | else 'Miscellaneous' |
| 23 | end | 24 | end |
| 24 | end | 25 | end |
| @@ -1,8 +1,12 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Redis < UrlScraper | 2 | class Redis < UrlScraper |
| 3 | self.type = 'redis' | 3 | self.type = 'redis' |
| 4 | self.version = 'up to 2.8.19' | 4 | self.version = 'up to 3.0.0' |
| 5 | self.base_url = 'http://redis.io/commands' | 5 | self.base_url = 'http://redis.io/commands' |
| 6 | self.links = { | ||
| 7 | home: 'http://redis.io/', | ||
| 8 | code: 'https://github.com/antirez/redis' | ||
| 9 | } | ||
| 6 | 10 | ||
| 7 | html_filters.push 'redis/entries', 'redis/clean_html', 'title' | 11 | html_filters.push 'redis/entries', 'redis/clean_html', 'title' |
| 8 | 12 | ||