jumzies-google-mini 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/google-mini.gemspec +53 -0
- data/lib/google-mini/search.rb +3 -3
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/google-mini.gemspec
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{google-mini}
|
5
|
+
s.version = "0.0.3"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Jimmy Baker"]
|
9
|
+
s.date = %q{2009-05-18}
|
10
|
+
s.email = %q{jimmybaker@me.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".document",
|
17
|
+
".gitignore",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"google-mini.gemspec",
|
23
|
+
"lib/google-mini.rb",
|
24
|
+
"lib/google-mini/google-mini.rb",
|
25
|
+
"lib/google-mini/keymatch.rb",
|
26
|
+
"lib/google-mini/result.rb",
|
27
|
+
"lib/google-mini/search.rb",
|
28
|
+
"test/google-mini_test.rb",
|
29
|
+
"test/test_helper.rb"
|
30
|
+
]
|
31
|
+
s.homepage = %q{http://github.com/jumzies/google-mini}
|
32
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
33
|
+
s.require_paths = ["lib"]
|
34
|
+
s.rubygems_version = %q{1.3.3}
|
35
|
+
s.summary = %q{The Google Mini gem simply lets you query your Google Mini appliance with the ease you'd expect from a Ruby library.}
|
36
|
+
s.test_files = [
|
37
|
+
"test/google-mini_test.rb",
|
38
|
+
"test/test_helper.rb"
|
39
|
+
]
|
40
|
+
|
41
|
+
if s.respond_to? :specification_version then
|
42
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
43
|
+
s.specification_version = 3
|
44
|
+
|
45
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
46
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
47
|
+
else
|
48
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
49
|
+
end
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
52
|
+
end
|
53
|
+
end
|
data/lib/google-mini/search.rb
CHANGED
@@ -11,7 +11,7 @@ class Search
|
|
11
11
|
|
12
12
|
# ask the google mini for search results
|
13
13
|
response = Search.get(url)
|
14
|
-
|
14
|
+
puts response.inspect
|
15
15
|
# results
|
16
16
|
if response['GSP'].has_key?('RES')
|
17
17
|
if response['GSP']['RES']['R'].kind_of?(Array)
|
@@ -32,8 +32,8 @@ class Search
|
|
32
32
|
|
33
33
|
# synonyms
|
34
34
|
if response['GSP'].has_key?('Synonyms')
|
35
|
-
if response['GSP']['Synonyms'].kind_of?(Array)
|
36
|
-
response['GSP']['Synonyms'].map{ |
|
35
|
+
if response['GSP']['Synonyms']['OneSynonym'].kind_of?(Array)
|
36
|
+
response['GSP']['Synonyms']['OneSynonym'].map{ |synonym| @synonyms << synonym }
|
37
37
|
else
|
38
38
|
response['GSP']['Synonyms'].map{ |k,v| @synonyms << v }
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jumzies-google-mini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Baker
|
@@ -38,6 +38,7 @@ files:
|
|
38
38
|
- README.rdoc
|
39
39
|
- Rakefile
|
40
40
|
- VERSION
|
41
|
+
- google-mini.gemspec
|
41
42
|
- lib/google-mini.rb
|
42
43
|
- lib/google-mini/google-mini.rb
|
43
44
|
- lib/google-mini/keymatch.rb
|