aef-launchy-opensearch 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING.txt +674 -0
- data/History.txt +43 -0
- data/Manifest.txt +13 -0
- data/README.rdoc +164 -0
- data/Rakefile +20 -0
- data/bin/launchy-opensearch +120 -0
- data/lib/launchy_opensearch.rb +30 -0
- data/lib/launchy_opensearch/launchy_opensearch.rb +167 -0
- data/spec/fixtures/discogs.xml +12 -0
- data/spec/fixtures/launchy.ini +60 -0
- data/spec/fixtures/secure-wikipedia-english.xml +13 -0
- data/spec/fixtures/youtube.xml +13 -0
- data/spec/launchy_opensearch_spec.rb +276 -0
- metadata +123 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
|
2
|
+
<os:ShortName>Discogs</os:ShortName>
|
3
|
+
<os:Description>Discogs search all</os:Description>
|
4
|
+
<os:InputEncoding>UTF-8</os:InputEncoding>
|
5
|
+
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAAAAAAAABoAwAAJgAAACAgAAAAAAAAqAwAAI4DAAAoAAAAEAAAACAAAAABABgAAAAAAEADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa3N7a3N7a3N7a3N7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa3N7QkJCQkJCKTk5EBAQEBAQAAAAEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAQkJCvcbGa3N7QkJCISkpEBAQEBAQAAAAAAAAEBAQAAAAAAAAAAAAAAAAAAAAISkpQkJCa3N7vcbGa3N7ISkpEBAQEBAQAAAAAAAAAAAAEBAQAAAAAAAAAAAAISkpKTk5QkJCQkJCa3N7a3N7KTk5ISkpEBAQAAAAAAAAAAAAAAAAISkpAAAAAAAAEBAQISkpISkpKTk5KTk5EBAQGGNrGGNrCAgICAgIAAAAAAAAAAAAAAAAAAAAa3N7AAAAEBAQE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EpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABKSkoAAAAAAAAAAAAAAAAYGBgYGBgYGBgYGBgYGBgYGBgxMTExMTExMTFKSkqEc3POxsbn5+ecjIxaY2MYGBgYGBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYGBgYGBgYGBgYGBgxMTExMTExMTExMTExMTFKSkpaY2O9ra29ra0xMTEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxMTEAAAAAAAAAAAAYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgxMTExMTExMTExMTEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxMTEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxMTEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABaY2NKSkpKSkpKSkpKSkpaY2MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8A///4AB//4AAH/8AAA/8AAAD/AAAA/gAAAHwAAAA8AAAAOAAAABgAAAAYAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAYAAAAGAAAABwAAAA8AAAAPgAAAH8AAAD/AAAA/4AAAf/gAAf/8AAP//wAP///gf/w==</os:Image>
|
6
|
+
<UpdateInterval>7</UpdateInterval>
|
7
|
+
<UpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/discogs.xml</UpdateUrl>
|
8
|
+
<IconUpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/discogs.ico</IconUpdateUrl>
|
9
|
+
<SearchForm>http://www.discogs.com/</SearchForm>
|
10
|
+
<os:Url type="text/html" method="GET" template="http://www.discogs.com/search?type=all&q={searchTerms}&btn=Search">
|
11
|
+
</os:Url>
|
12
|
+
</SearchPlugin>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
[GenOps]
|
2
|
+
skin=/usr/share/launchy/skins/Default
|
3
|
+
|
4
|
+
[General]
|
5
|
+
donateTime=@Variant(\0\0\0\x10\0%u\x85\x2\a\xe3L\xff)
|
6
|
+
version=212
|
7
|
+
|
8
|
+
[runner]
|
9
|
+
cmds\1\name=cmd
|
10
|
+
cmds\1\file=/usr/bin/xterm
|
11
|
+
cmds\1\args=-hold -e $$
|
12
|
+
cmds\size=1
|
13
|
+
version=2
|
14
|
+
|
15
|
+
[weby]
|
16
|
+
sites\1\name=Google
|
17
|
+
sites\1\base=http://www.google.com/
|
18
|
+
sites\1\query="search?source=launchy&q=%s"
|
19
|
+
sites\1\default=true
|
20
|
+
sites\2\name=Live Search
|
21
|
+
sites\2\base=http://search.live.com/
|
22
|
+
sites\2\query="results.aspx?q=%s"
|
23
|
+
sites\3\name=Yahoo
|
24
|
+
sites\3\base=http://search.yahoo.com/
|
25
|
+
sites\3\query="search?p=%s"
|
26
|
+
sites\4\name=MSN
|
27
|
+
sites\4\base=http://search.msn.com/
|
28
|
+
sites\4\query="results.aspx?q=%s"
|
29
|
+
sites\5\name=Weather
|
30
|
+
sites\5\base=http://www.weather.com/
|
31
|
+
sites\5\query=weather/local/%s
|
32
|
+
sites\6\name=Amazon
|
33
|
+
sites\6\base=http://www.amazon.com/
|
34
|
+
sites\6\query="gp/search/?keywords=%s&index=blended"
|
35
|
+
sites\7\name=YouTube
|
36
|
+
sites\7\base=http://www.youtube.com/
|
37
|
+
sites\7\query="results?search_query=%s"
|
38
|
+
sites\8\name=Wikipedia
|
39
|
+
sites\8\base=http://en.wikipedia.com/
|
40
|
+
sites\8\query="wiki/Special:Search?search=%s&fulltext=Search"
|
41
|
+
sites\9\name=Dictionary
|
42
|
+
sites\9\base=http://www.dictionary.com/
|
43
|
+
sites\9\query=browse/%s
|
44
|
+
sites\10\name=Thesaurus
|
45
|
+
sites\10\base=http://www.thesaurus.com/
|
46
|
+
sites\10\query=browse/%s
|
47
|
+
sites\11\name=Netflix
|
48
|
+
sites\11\base=http://www.netflix.com/
|
49
|
+
sites\11\query="Search?v1=%s"
|
50
|
+
sites\12\name=E-Mail
|
51
|
+
sites\12\base=mailto:
|
52
|
+
sites\12\query=%s
|
53
|
+
sites\13\name=IMDB
|
54
|
+
sites\13\base=http://www.imdb.com/
|
55
|
+
sites\13\query="find?s=all&q=%s"
|
56
|
+
sites\14\name=Maps
|
57
|
+
sites\14\base=http://maps.google.com/
|
58
|
+
sites\14\query="maps?f=q&hl=en&geocode=&q=%s&ie=UTF8&z=12&iwloc=addr&om=1"
|
59
|
+
sites\size=14
|
60
|
+
version=2
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
|
2
|
+
<os:ShortName>SSL Wikipedia (English)</os:ShortName>
|
3
|
+
<os:Description>Return articles from english wikipedia using https url</os:Description>
|
4
|
+
<os:InputEncoding>UTF-8</os:InputEncoding>
|
5
|
+
<os:Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAABzklEQVQ4y6WTL6vycBTHP9stgmETGWIaF6bFNA0qWMQZxDIQ34cv4WLwDYhJsK1o0CQKDhUMNllQg2tiERQUBMGwGx7Y83i9T/LArxzO+XK+f36CKIoeb5TIm/U+QKFQwLIshsMhhUIBgGq1ynA4pF6vo2kaAPV6Hcuy0DQNTdNoNptYloVo2zbr9RpVVX3UXq8HQKVSAUBRFO73O7PZDNd1uVwuAMxmsz8Uut0usixjmiaKogDQ7/eRZRld1/n8/CQajdJut5/Ob7fbfAiC8HU+n0mlUpRKJcbjMYfDgev1SjKZxDRNbrcbq9WKzWYDQDab5Xg8stls/orY6XQAMAwDANd16ff7xGIxEomET0tRFNLpNOfz+dkF27ZxHIdcLucLN51OWS6XhEIh/2xJkggEAti2/WrjYrHAMAx0XX/iqqqq71A+n2e/3/+eg0ajwW6388XUdR3HcTidTpim6VMYDAb+zocgCF//gsiyTCqVIhKJcDweGQwGSJJEuVzm8XgQDAYZj8f/T+JutyMcDvsZcF2X+XwOQK1WYzKZ/IiiKHo/32g08kajkRePx/1eq9Xyttvty+yvAMVi0ctkMk+9eDzuFYvFl1nh3e/8DVlGxpnqRIOzAAAAAElFTkSuQmCC</os:Image>
|
6
|
+
<UpdateInterval>7</UpdateInterval>
|
7
|
+
<UpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/securewikipedia.xml</UpdateUrl>
|
8
|
+
<IconUpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/securewikipedia.png</IconUpdateUrl>
|
9
|
+
<SearchForm>https://secure.wikimedia.org/wikipedia/en/wiki/</SearchForm>
|
10
|
+
<os:Url type="text/html" method="GET" template="https://secure.wikimedia.org/wikipedia/en/wiki/Special:Search?go=Go&search={searchTerms}">
|
11
|
+
</os:Url><os:Url type="application/x-suggestions+json" method="GET" template="https://secure.wikimedia.org/wikipedia/en/w/api.php?action=opensearch&search={searchTerms}">
|
12
|
+
</os:Url>
|
13
|
+
</SearchPlugin>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
|
2
|
+
<os:ShortName>YouTube</os:ShortName>
|
3
|
+
<os:Description>YouTube - Videos</os:Description>
|
4
|
+
<os:InputEncoding>UTF-8</os:InputEncoding>
|
5
|
+
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAD//////////4OD//9paf//bm7//2Fh//9ZWf//Wlr//1pa//9WVv//ZGT//3Bw//9jY///goL//////////////////11d//8sLP//QUH//ygo//84OP//RET//y4u//8xMf//UVH//y4u//8PD///ZWX//x0d//9aWv////////////88PP//Cgr///////8zM///1NT///////+lpf//ubn///////+urv//fHz////////g4P//Fhb/////////////MzP//woK////////NDT//8vL//9ycv//paX//7Cw//9jY///s7P//8nJ//9XV///eXn//yIi/////////////zMz//8LC///+/v//zMz///Gxv//hYX//6Ki//+srP//W1v//6ys//+3t///2tr//93d//8PD/////////////80NP//AgL///b2//8nJ///5ub//56e//+5uf//oaH//+/v//+5uf//oKD//+Li///f3///AgL/////////////MzP//wUF////////Skr//0pK//9NTf//NTX//97e//+ysv//Nzf//xIS//+mpv//Kyv//z09/////////////xkZ///Y2P////////////8nJ///EBD//wAA///y8v//Ly///wAA//8mJv//Hh7//6mp//92dv////////////+vr///Jib//xMS//8eIP//MzP//zY2//84OP//Hh///y4u//9XV///hoj//8LC///R0f//qqr/////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA/8zMzP/u7u7/IiIi/wAAAP8iIiL//////zMzM/8AAAD/AAAA/////////////////////////////////wAAAP/MzMz//////yIiIv/u7u7/ERER/7u7u/8AAAD/iIiI/xEREf///////////////////////////+7u7v8AAAD/zMzM//////8iIiL/7u7u/xEREf+7u7v/AAAA/8zMzP8RERH///////////////////////////93d3f/AAAA/1VVVf/u7u7/IiIi/wAAAP8iIiL//////wAAAP/MzMz/ERER///////////////////////d3d3/AAAA/4iIiP8AAAD/3d3d/////////////////////////////////////////////////////////////////wAAAP//////AAAA////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</os:Image>
|
6
|
+
<UpdateInterval>7</UpdateInterval>
|
7
|
+
<UpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/youtube.xml</UpdateUrl>
|
8
|
+
<IconUpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/youtube.ico</IconUpdateUrl>
|
9
|
+
<SearchForm>http://www.youtube.com/index</SearchForm>
|
10
|
+
<os:Url type="text/html" method="GET" template="http://www.youtube.com/results?search_query={searchTerms}&search=Search">
|
11
|
+
</os:Url><os:Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?hl=en&ds=yt&json=t&q={searchTerms}">
|
12
|
+
</os:Url>
|
13
|
+
</SearchPlugin>
|
@@ -0,0 +1,276 @@
|
|
1
|
+
# Copyright 2009 Alexander E. Fischer <aef@raxys.net>
|
2
|
+
#
|
3
|
+
# This file is part of LaunchyOpenSearch.
|
4
|
+
#
|
5
|
+
# LaunchyOpenSearch is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU General Public License
|
16
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
require 'lib/launchy_opensearch'
|
19
|
+
|
20
|
+
require 'fileutils'
|
21
|
+
require 'tmpdir'
|
22
|
+
|
23
|
+
require 'rubygems'
|
24
|
+
require 'sys/uname'
|
25
|
+
|
26
|
+
module LaunchyOpenSearchSpecHelper
|
27
|
+
# If there is a way to get the executable path of the currently running ruby
|
28
|
+
# interpreter, please tell me how.
|
29
|
+
warn 'Attention: If the ruby interpreter to be tested with is not ruby in the ' +
|
30
|
+
"default path, you have to change this manually in #{__FILE__} line #{__LINE__ + 1}"
|
31
|
+
RUBY_PATH = 'ruby'
|
32
|
+
|
33
|
+
def executable_path
|
34
|
+
"#{RUBY_PATH} bin/launchy-opensearch"
|
35
|
+
end
|
36
|
+
|
37
|
+
def fixture_path(name)
|
38
|
+
File.join('spec/fixtures', name)
|
39
|
+
end
|
40
|
+
|
41
|
+
def windows?
|
42
|
+
Sys::Uname.sysname.downcase.include?('windows')
|
43
|
+
end
|
44
|
+
|
45
|
+
def info_youtube
|
46
|
+
{
|
47
|
+
:name => 'YouTube',
|
48
|
+
:base => 'http://www.youtube.com/',
|
49
|
+
:query => '"results?search_query=%s&search=Search"',
|
50
|
+
:default => 'false'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
def info_discogs
|
55
|
+
{
|
56
|
+
:name => 'Discogs',
|
57
|
+
:base => 'http://www.discogs.com/',
|
58
|
+
:query => '"search?type=all&q=%s&btn=Search"',
|
59
|
+
:default => 'false'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
def info_wikipedia
|
64
|
+
{
|
65
|
+
:name => 'SSL Wikipedia (English)',
|
66
|
+
:base => 'https://secure.wikimedia.org/',
|
67
|
+
:query => '"wikipedia/en/wiki/Special:Search?go=Go&search=%s"',
|
68
|
+
:default => 'false'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe Aef::LaunchyOpenSearch do
|
74
|
+
include LaunchyOpenSearchSpecHelper
|
75
|
+
|
76
|
+
before(:each) do
|
77
|
+
# Before ruby 1.8.7, the tmpdir standard library had no method to create
|
78
|
+
# a temporary directory (mktmpdir).
|
79
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.8.7')
|
80
|
+
@folder_path = File.join(Dir.tmpdir, 'launchy_opensearch_spec')
|
81
|
+
Dir.mkdir(@folder_path)
|
82
|
+
else
|
83
|
+
@folder_path = Dir.mktmpdir('launchy_opensearch_spec')
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
after(:each) do
|
88
|
+
FileUtils.rm_rf(@folder_path)
|
89
|
+
end
|
90
|
+
|
91
|
+
context 'library' do
|
92
|
+
it "should be able to determine Launchy's config file path correctly" do
|
93
|
+
if windows?
|
94
|
+
path = File.join(ENV['APPDATA'], 'Launchy', 'Launchy.ini')
|
95
|
+
else
|
96
|
+
path = File.join(ENV['HOME'], '.launchy', 'launchy.ini')
|
97
|
+
end
|
98
|
+
|
99
|
+
Aef::LaunchyOpenSearch.launchy_config_path.should eql(path)
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should be able to parse useful information out of OpenSearch XML documents" do
|
103
|
+
content = File.read(fixture_path('youtube.xml'))
|
104
|
+
result = Aef::LaunchyOpenSearch.parse_opensearch(content)
|
105
|
+
|
106
|
+
result.should be_an_instance_of(Hash)
|
107
|
+
|
108
|
+
result[:name].should eql(info_youtube[:name])
|
109
|
+
result[:base].should eql(info_youtube[:base])
|
110
|
+
result[:query].should eql(info_youtube[:query])
|
111
|
+
result[:default].should eql(info_youtube[:default])
|
112
|
+
end
|
113
|
+
|
114
|
+
it "should be able to parse useful information out of OpenSearch XML document files" do
|
115
|
+
result = Aef::LaunchyOpenSearch.parse_opensearch_file(fixture_path('discogs.xml'))
|
116
|
+
|
117
|
+
result.should be_an_instance_of(Hash)
|
118
|
+
|
119
|
+
result[:name].should eql(info_discogs[:name])
|
120
|
+
result[:base].should eql(info_discogs[:base])
|
121
|
+
result[:query].should eql(info_discogs[:query])
|
122
|
+
result[:default].should eql(info_discogs[:default])
|
123
|
+
end
|
124
|
+
|
125
|
+
it "should be able to parse useful information out of multiple OpenSearch XML document files" do
|
126
|
+
files = [
|
127
|
+
fixture_path('youtube.xml'),
|
128
|
+
fixture_path('discogs.xml'),
|
129
|
+
fixture_path('secure-wikipedia-english.xml')
|
130
|
+
]
|
131
|
+
|
132
|
+
result = Aef::LaunchyOpenSearch.parse_opensearch_files(files)
|
133
|
+
|
134
|
+
result.should be_an_instance_of(Array)
|
135
|
+
result.should include(info_youtube)
|
136
|
+
result.should include(info_discogs)
|
137
|
+
result.should include(info_wikipedia)
|
138
|
+
end
|
139
|
+
|
140
|
+
it "should be able to read a Launchy configuration ini file" do
|
141
|
+
result = Aef::LaunchyOpenSearch.read_config_hash(fixture_path('launchy.ini'))
|
142
|
+
|
143
|
+
result.should be_an_instance_of(Hash)
|
144
|
+
|
145
|
+
result.keys.sort.should eql(['General', 'GenOps', 'runner', 'weby'].sort)
|
146
|
+
|
147
|
+
result['General'].should have(2).items
|
148
|
+
result['General']['version'].should eql('212')
|
149
|
+
|
150
|
+
result['runner'].should have(5).items
|
151
|
+
result['runner']['cmds\\1\\file'].should eql('/usr/bin/xterm')
|
152
|
+
|
153
|
+
result['GenOps'].should have(1).items
|
154
|
+
result['GenOps']['skin'].should eql('/usr/share/launchy/skins/Default')
|
155
|
+
|
156
|
+
result['weby'].should have(45).items
|
157
|
+
result['weby']['sites\\size'].should eql('14')
|
158
|
+
result['weby']['sites\\6\\query'].should eql('"gp/search/?keywords=%s&index=blended"')
|
159
|
+
end
|
160
|
+
|
161
|
+
it "should be able to extract an array of engine hashes from a config file hash" do
|
162
|
+
config_hash = Aef::LaunchyOpenSearch.read_config_hash(fixture_path('launchy.ini'))
|
163
|
+
|
164
|
+
result = Aef::LaunchyOpenSearch.extract_config_hash(config_hash)
|
165
|
+
|
166
|
+
result.should be_an_instance_of(Array)
|
167
|
+
result.should have(14).items
|
168
|
+
|
169
|
+
result.should include(:name => 'Live Search',
|
170
|
+
:base => 'http://search.live.com/',
|
171
|
+
:query => '"results.aspx?q=%s"')
|
172
|
+
|
173
|
+
result.should include(:name => 'Dictionary',
|
174
|
+
:base => 'http://www.dictionary.com/',
|
175
|
+
:query => 'browse/%s')
|
176
|
+
end
|
177
|
+
|
178
|
+
it "should be able to patch an array of engines with additional engines" do
|
179
|
+
config_hash = Aef::LaunchyOpenSearch.read_config_hash(fixture_path('launchy.ini'))
|
180
|
+
|
181
|
+
engines = Aef::LaunchyOpenSearch.extract_config_hash(config_hash)
|
182
|
+
engines << info_discogs
|
183
|
+
|
184
|
+
lambda {
|
185
|
+
Aef::LaunchyOpenSearch.patch_config_hash(config_hash, engines)
|
186
|
+
}.should change{ config_hash['weby'].size }.from(45).to(49)
|
187
|
+
|
188
|
+
name_key = config_hash['weby'].find {|key, value| value == 'Discogs'}.first
|
189
|
+
name_key =~ /^.*\\(.*)\\.*$/
|
190
|
+
|
191
|
+
config_hash['weby']["sites\\#$1\\base"].should eql(info_discogs[:base])
|
192
|
+
config_hash['weby']["sites\\#$1\\query"].should eql(info_discogs[:query])
|
193
|
+
config_hash['weby']["sites\\#$1\\default"].should eql(info_discogs[:default])
|
194
|
+
end
|
195
|
+
|
196
|
+
it "should be able to write a config hash to ini file" do
|
197
|
+
config_file_path = File.join(@folder_path, 'launchy.ini')
|
198
|
+
|
199
|
+
config_hash = Aef::LaunchyOpenSearch.read_config_hash(fixture_path('launchy.ini'))
|
200
|
+
|
201
|
+
engines = Aef::LaunchyOpenSearch.extract_config_hash(config_hash)
|
202
|
+
engines << info_discogs
|
203
|
+
|
204
|
+
Aef::LaunchyOpenSearch.patch_config_hash(config_hash, engines)
|
205
|
+
|
206
|
+
Aef::LaunchyOpenSearch.write_config_hash(config_hash, config_file_path)
|
207
|
+
File.exist?(config_file_path).should be_true
|
208
|
+
|
209
|
+
Aef::LaunchyOpenSearch.read_config_hash(config_file_path)['weby'].sort.should eql(config_hash['weby'].sort)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
context 'commandline tool' do
|
214
|
+
it "should be able add an engine from an OpenSearch XML file to Launchy's ini-file" do
|
215
|
+
config_file_path = File.join(@folder_path, 'launchy.ini')
|
216
|
+
|
217
|
+
FileUtils.copy(fixture_path('launchy.ini'), config_file_path)
|
218
|
+
|
219
|
+
lambda {
|
220
|
+
`#{executable_path} -c #{config_file_path} #{fixture_path('discogs.xml')}`
|
221
|
+
}.should change{
|
222
|
+
Aef::LaunchyOpenSearch.read_config_hash(config_file_path)['weby']['sites\\size']
|
223
|
+
}.from('14').to('15')
|
224
|
+
end
|
225
|
+
|
226
|
+
it "should be able replace current engines with an engine from an OpenSearch XML file" do
|
227
|
+
config_file_path = File.join(@folder_path, 'launchy.ini')
|
228
|
+
|
229
|
+
FileUtils.copy(fixture_path('launchy.ini'), config_file_path)
|
230
|
+
|
231
|
+
lambda {
|
232
|
+
`#{executable_path} --mode replace -c #{config_file_path} #{fixture_path('discogs.xml')}`
|
233
|
+
}.should change{
|
234
|
+
Aef::LaunchyOpenSearch.read_config_hash(config_file_path)['weby']['sites\\size']
|
235
|
+
}.from('14').to('1')
|
236
|
+
end
|
237
|
+
|
238
|
+
it "should be able to replace current engines with multiple engines from OpenSearch XML files" do
|
239
|
+
config_file_path = File.join(@folder_path, 'launchy.ini')
|
240
|
+
|
241
|
+
FileUtils.copy(fixture_path('launchy.ini'), config_file_path)
|
242
|
+
|
243
|
+
lambda {
|
244
|
+
`#{executable_path} -m replace --config #{config_file_path} #{fixture_path('discogs.xml')} #{fixture_path('youtube.xml')} #{fixture_path('secure-wikipedia-english.xml')}`
|
245
|
+
}.should change{
|
246
|
+
Aef::LaunchyOpenSearch.read_config_hash(config_file_path)['weby']['sites\\size']
|
247
|
+
}.from('14').to('3')
|
248
|
+
end
|
249
|
+
|
250
|
+
it 'should display correct version and licensing information with the --version switch' do
|
251
|
+
message = <<-EOF
|
252
|
+
LaunchyOpenSearch 1.2.1
|
253
|
+
|
254
|
+
Project: https://rubyforge.org/projects/aef/
|
255
|
+
RDoc: http://aef.rubyforge.org/launchy-opensearch/
|
256
|
+
Github: http://github.com/aef/launchy-opensearch/
|
257
|
+
|
258
|
+
Copyright 2009 Alexander E. Fischer <aef@raxys.net>
|
259
|
+
|
260
|
+
LaunchyOpenSearch is free software: you can redistribute it and/or modify
|
261
|
+
it under the terms of the GNU General Public License as published by
|
262
|
+
the Free Software Foundation, either version 3 of the License, or
|
263
|
+
(at your option) any later version.
|
264
|
+
|
265
|
+
This program is distributed in the hope that it will be useful,
|
266
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
267
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
268
|
+
GNU General Public License for more details.
|
269
|
+
|
270
|
+
You should have received a copy of the GNU General Public License
|
271
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
272
|
+
EOF
|
273
|
+
`#{executable_path} --version`.should eql(message)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aef-launchy-opensearch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexander E. Fischer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-04-05 00:00:00 -07:00
|
13
|
+
default_executable: launchy-opensearch
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: facets
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hpricot
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: sys-uname
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: user-choices
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hoe
|
57
|
+
type: :development
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.11.0
|
64
|
+
version:
|
65
|
+
description: LaunchyOpenSearch is a Ruby library and commandline tool that allows to parse OpenSearch XML files and include them as search engines in the Weby plugin of the keystroke app launcher Launchy by editing Launchy's ini config file.
|
66
|
+
email:
|
67
|
+
- aef@raxys.net
|
68
|
+
executables:
|
69
|
+
- launchy-opensearch
|
70
|
+
extensions: []
|
71
|
+
|
72
|
+
extra_rdoc_files:
|
73
|
+
- History.txt
|
74
|
+
- Manifest.txt
|
75
|
+
- COPYING.txt
|
76
|
+
- README.rdoc
|
77
|
+
files:
|
78
|
+
- History.txt
|
79
|
+
- Manifest.txt
|
80
|
+
- README.rdoc
|
81
|
+
- COPYING.txt
|
82
|
+
- Rakefile
|
83
|
+
- bin/launchy-opensearch
|
84
|
+
- lib/launchy_opensearch.rb
|
85
|
+
- lib/launchy_opensearch/launchy_opensearch.rb
|
86
|
+
- spec/launchy_opensearch_spec.rb
|
87
|
+
- spec/fixtures/launchy.ini
|
88
|
+
- spec/fixtures/discogs.xml
|
89
|
+
- spec/fixtures/secure-wikipedia-english.xml
|
90
|
+
- spec/fixtures/youtube.xml
|
91
|
+
has_rdoc: true
|
92
|
+
homepage: https://rubyforge.org/projects/aef/
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options:
|
95
|
+
- --main
|
96
|
+
- README.rdoc
|
97
|
+
- --inline-source
|
98
|
+
- --line-numbers
|
99
|
+
- --title
|
100
|
+
- LaunchyOpenSearch
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: "0"
|
108
|
+
version:
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: "0"
|
114
|
+
version:
|
115
|
+
requirements: []
|
116
|
+
|
117
|
+
rubyforge_project: aef
|
118
|
+
rubygems_version: 1.2.0
|
119
|
+
signing_key:
|
120
|
+
specification_version: 2
|
121
|
+
summary: LaunchyOpenSearch is a Ruby library and commandline tool that allows to parse OpenSearch XML files and include them as search engines in the Weby plugin of the keystroke app launcher Launchy by editing Launchy's ini config file.
|
122
|
+
test_files: []
|
123
|
+
|