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