History

Update Redis documentation (3.0.0)

Thibaut committed 11 years ago

Commit 2eccb7e1 parent 399e09e3 files · +20 −15Browse files

Unified · Split

3 files
  1. lib/docs/filters/redis/clean_html.rb +2 −2
  2. lib/docs/filters/redis/entries.rb +13 −12
  3. lib/docs/scrapers/redis.rb +5 −1
lib/docs/filters/redis/clean_html.rb+2−2
@@ -4,9 +4,9 @@ module Docs · 3 unmodified lines
4 def call4 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').remove7 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).remove10 node.before(node.children).remove
11 end11 end
12 12
lib/docs/filters/redis/entries.rb+13−12
@@ -7,18 +7,19 @@ module Docs · 6 unmodified lines
7 7
8 def get_type8 def get_type
9 case at_css('aside > ul:last-child a').content.strip9 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 end24 end
24 end25 end
lib/docs/scrapers/redis.rb+5−1
@@ -1,8 +1,12 @@
1module Docs1module Docs
2 class Redis < UrlScraper2 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