Forked from jackdempsey/ruby-search.ubiquity-command.js
Created
October 14, 2009 10:45
-
-
Save ouranos/209972 to your computer and use it in GitHub Desktop.
Revisions
-
jackdempsey revised this gist
Aug 30, 2008 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ CmdUtils.CreateCommand( help: "Select a ruby function", execute: function(directObject) { var url = "http://apidock.com/ruby/search?query={QUERY}&commit=Search" var urlString = url.replace("{QUERY}", directObject.text); Utils.openUrlInBrowser(urlString); }, -
jackdempsey revised this gist
Aug 30, 2008 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ CmdUtils.CreateCommand( help: "Select a ruby function", execute: function(directObject) { var url = "http://www.ruby-doc.org/q/{QUERY}" var urlString = url.replace("{QUERY}", directObject.text); Utils.openUrlInBrowser(urlString); }, -
jackdempsey created this gist
Aug 30, 2008 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ CmdUtils.CreateCommand( { name: "ruby", takes: {"function": noun_arb_text}, icon: "http://ruby-doc.org/favicon.ico", homepage: "http://jackndempsey.blogspot.com", author: {name: "Jack Dempsey", email: "jack.dempsey@gmail.com"}, license: "MPL,GPL", description: "Search ruby functions documentation", help: "Select a ruby function", execute: function(directObject) { var url = "http://www.google.com/search?hl=en&q={QUERY}+&btnI=I'm+Feeling+Lucky&aq=f〈=en'" var urlString = url.replace("{QUERY}", directObject.text); Utils.openUrlInBrowser(urlString); }, preview: function(pblock, directObject) { searchText = jQuery.trim(directObject.text); if(searchText.length <= 0) { pblock.innerHTML = "Search ruby function documentation"; return; } var previewTemplate = "Search ruby function documentation of ${query}"; var previewData = {query: searchText}; pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData); } });