Permalink
Browse files

Add OpenSearch for looking up commands.

  • Loading branch information...
1 parent 98fd688 commit 754e2f3a02c8cc9083a56db5903d44e909ede8b6 @djanowski djanowski committed Oct 5, 2012
Showing with 20 additions and 1 deletion.
  1. +1 −1 app.rb
  2. +18 −0 public/opensearch.xml
  3. +1 −0 views/layout.haml
View
2 app.rb
@@ -87,7 +87,7 @@ def version_name(tag)
Ohm.redis = redis
-Cuba.use Rack::Static, urls: ["/images", "/presentation"], root: File.join(ROOT_PATH, "public")
+Cuba.use Rack::Static, urls: ["/images", "/presentation", "/opensearch.xml"], root: File.join(ROOT_PATH, "public")
Cuba.define do
def render(path, locals = {})
View
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
+ <ShortName>redis.io</ShortName>
+ <Description>Look up a Redis command</Description>
+ <Contact>redis-db@googlegroups.com</Contact>
+ <Url type="text/html" method="GET" template="http://redis.io/commands/{searchTerms}" />
+ <Image width="16" type="image/png" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAXXWlDQ1BJQ0MgUHJvZmlsZQAAeAHVWWdYFEuz7tnILrvkHJeccwbJSZLkjMKypCVLBskgSlBQFBFQJIskwYSICEgQRZAgIBhARUVRMaAg6Q56zvm++3z3/rt/7jzP9LxTVV1dM1XT3VUDAOcyOTw8GMEAQEhoVISdqQHJxdWNhJ0FBIADtIAEGMmUyHB9GxtL8L8eP6YAtMuckNnV9b+K/c8MRh/fSAoAkA3M9vaJpITA+CoACANKeEQUAMg1mP4oNiocxqh7MGaJgA2E8dNd7P8Hr+xi798Yjfot42BnCACaAwAaApkc4Q8AURimk2Io/rAeohEAGKZQH2ooAMwuMNahBJB9AOAshmWkQ0LCdnEfjMW9/02P/79hMtn7H51ksv8/+M+zwD3hgY2okeHB5PjfN/+XTUhwNPy+fh9McEsID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jB+T2ahNipmLGgOhbQQRVCBMtIu0XasgCILoD2iXi1zUYhSCNglGm75zV1ALN6ZSOdM0GZpfOc+Z9/0658G4sDpwufeej9/5nXPuFb7v438ydzh9TJbkTstxZ49+Lpf/5Sf2Anzqy2QlxbsmIIalhqZE0/AFVD+8h7kwN+t7YswwMJ0tFLbqYAHAbCaT0CIYkYR/GRBZNsZPnUby0iiiQyegv36Bn7duoLK1iZgsw4c3AU+a7J8vzIj5ga68gDSiHEijM/8IvLOsj49h7d5dArmCUv4+Vi0LvywTxR0dPbE4hhJJEPuifLExOh0hVKIM9VAPvMo27OUy9DcvITSNCAFKWxvsH2W41K9mVUUfATh0LtWMhHjYkfRlIZBUFHSENaiSBK1/AKmbtwP6DFjMnQ0AmNmWbWPFtFBxHAKELia6U+PtQlxdI4osDaEQWlUFLZSJy2Gw36+eg+2rFGh6HjRKwslKtvtAPOlq8/kSpTL2OiWIFQvrmT6D79PUYGcW66QPWYS4qO8EqCkyDjTEUXXdgOaKaQYArcSGk7AsGyYK1VodUJeHk42dmbB63PR86jJ32qIxAe0U0B2NUGAY3KPvNSNYXAL3qzcWxZLtTgZN5AwtVDfXxhk2qVFMmcvivV43M+RgbiD7sV4eDCuZkO/3bti2WnFcGpOCdCQcBBvkwFPZT2yYyTbZv9VqIF9s0vOeqZp3aMo4SCt9PRk7d0QL5SKS1MuUmVVCCZGJHpVlB43k86rjPnurW1NPq8ZHuhZ3/4IQop0U6fPRcPZkXM2lQvIZDmDheZccZyq/UX285LpfSFWmV6izbReALywEFKct3Qx05ZpigzXfM95V7cWvjrNAeg502K8ufwHsGoSQ6Jyk5dLS9wbW/f4AZQhSoyzmE4cAAAAASUVORK5CYII=</Image>
+ <Query role="example" searchTerms="hincrby" />
+ <AdultContent>false</AdultContent>
+ <Language>en</Language>
+ <OutputEncoding>UTF-8</OutputEncoding>
+ <InputEncoding>UTF-8</InputEncoding>
+ <moz:browser
+ Update="http://redis.io/opensearch.xml"
+ updateCheckDays="1" />
+</OpenSearchDescription>
+
+
View
@@ -5,6 +5,7 @@
%meta(charset="utf-8")
%link(rel="stylesheet" href="/styles.css?#{File.mtime("views/styles.sass").to_i}" type="text/css")
%link(rel="shortcut icon" href="/images/favicon.png")
+ %link(rel="search" type="application/opensearchdescription+xml" title="Look up a Redis command" href="/opensearch.xml")
%script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js")
%script(src="/app.js?#{File.mtime("views/app.js").to_i}" defer async)
%meta(name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0")

0 comments on commit 754e2f3

Please sign in to comment.