Update Redis documentation (3.0.0)

pull/200/head
Thibaut 10 years ago
parent 399e09e9fa
commit 2eccb7ebd8

@ -4,9 +4,9 @@ module Docs
def call def call
at_css('ul')['class'] = 'commands' if root_page? at_css('ul')['class'] = 'commands' if root_page?
css('nav', 'aside', 'form').remove css('nav', 'aside', 'form', '.anchor-link').remove
css('> article', 'pre > code').each do |node| css('> article', '.article-main', 'pre > code', '.container').each do |node|
node.before(node.children).remove node.before(node.children).remove
end end

@ -7,18 +7,19 @@ module Docs
def get_type def get_type
case at_css('aside > ul:last-child a').content.strip case at_css('aside > ul:last-child a').content.strip
when 'DEL' then 'Keys' when 'DEL' then 'Keys'
when 'APPEND' then 'Strings' when 'APPEND' then 'Strings'
when 'HDEL' then 'Hashes' when 'HDEL' then 'Hashes'
when 'BLPOP' then 'Lists' when 'BLPOP' then 'Lists'
when 'SADD' then 'Sets' when 'SADD' then 'Sets'
when 'ZADD' then 'Sorted Sets' when 'ZADD' then 'Sorted Sets'
when 'PSUBSCRIBE' then 'Pub/Sub' when 'PSUBSCRIBE' then 'Pub/Sub'
when 'DISCARD' then 'Transactions' when 'DISCARD' then 'Transactions'
when 'EVAL' then 'Scripting' when 'EVAL' then 'Scripting'
when 'AUTH' then 'Connection' when 'AUTH' then 'Connection'
when 'BGREWRITEAOF' then 'Server' when 'BGREWRITEAOF' then 'Server'
when 'PFADD' then 'HyperLogLog' when 'PFADD' then 'HyperLogLog'
when 'CLUSTER ADDSLOTS' then 'Cluster'
else 'Miscellaneous' else 'Miscellaneous'
end end
end end

@ -1,8 +1,12 @@
module Docs module Docs
class Redis < UrlScraper class Redis < UrlScraper
self.type = 'redis' self.type = 'redis'
self.version = 'up to 2.8.19' self.version = 'up to 3.0.0'
self.base_url = 'http://redis.io/commands' self.base_url = 'http://redis.io/commands'
self.links = {
home: 'http://redis.io/',
code: 'https://github.com/antirez/redis'
}
html_filters.push 'redis/entries', 'redis/clean_html', 'title' html_filters.push 'redis/entries', 'redis/clean_html', 'title'

Loading…
Cancel
Save