onewheel-google 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +3 -16
- data/.gitignore +0 -3
- data/.travis.yml +0 -8
- data/Gemfile +0 -3
- data/LICENSE +0 -21
- data/Rakefile +0 -6
- data/onewheel-google.gemspec +0 -25
- data/spec/fixtures/mock_result.json +0 -373
- data/spec/onewheel_google_spec.rb +0 -28
- data/spec/spec_helper.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1326c369a80fde5353c10440b8b117a10f5654c
|
4
|
+
data.tar.gz: 0854658d20da07a1a5626608889e18a4997a3cfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc7de9de5a4ed66073ea3cdd3442cd4b9005da540e9b0f00996c031f4536f3b031f27c32535fceafe0184d30538fd8d378fef9511489d59aa52fbb400452907a
|
7
|
+
data.tar.gz: 8ef9366a5e402e3c96eef742781415dccae44749e15b0c0dac913c82a6720268ffdf982834bf4f4c71492b3ebeb63cdd116e64e0ff10a33f523659f59ab7e86f
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onewheel-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
@@ -115,21 +115,11 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- ".gitignore"
|
119
|
-
- ".travis.yml"
|
120
|
-
- Gemfile
|
121
|
-
- LICENSE
|
122
|
-
- Rakefile
|
123
118
|
- lib/onewheel-google.rb
|
124
|
-
- onewheel-google.gemspec
|
125
|
-
- spec/fixtures/mock_result.json
|
126
|
-
- spec/onewheel_google_spec.rb
|
127
|
-
- spec/spec_helper.rb
|
128
119
|
homepage: https://github.com/onewheelskyward/onewheel-google
|
129
120
|
licenses:
|
130
121
|
- MIT
|
131
|
-
metadata:
|
132
|
-
lita_plugin_type: handler
|
122
|
+
metadata: {}
|
133
123
|
post_install_message:
|
134
124
|
rdoc_options: []
|
135
125
|
require_paths:
|
@@ -150,7 +140,4 @@ rubygems_version: 2.5.1
|
|
150
140
|
signing_key:
|
151
141
|
specification_version: 4
|
152
142
|
summary: An abstracted way to access CSE.
|
153
|
-
test_files:
|
154
|
-
- spec/fixtures/mock_result.json
|
155
|
-
- spec/onewheel_google_spec.rb
|
156
|
-
- spec/spec_helper.rb
|
143
|
+
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015 Andrew Kreps
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
data/Rakefile
DELETED
data/onewheel-google.gemspec
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |spec|
|
2
|
-
spec.name = 'onewheel-google'
|
3
|
-
spec.version = '0.0.0'
|
4
|
-
spec.authors = ['Andrew Kreps']
|
5
|
-
spec.email = ['andrew.kreps@gmail.com']
|
6
|
-
spec.description = 'An interface of Google Custom Search Engine for searching.'
|
7
|
-
spec.summary = 'An abstracted way to access CSE.'
|
8
|
-
spec.homepage = 'https://github.com/onewheelskyward/onewheel-google'
|
9
|
-
spec.license = 'MIT'
|
10
|
-
spec.metadata = { 'lita_plugin_type' => 'handler' }
|
11
|
-
|
12
|
-
spec.files = `git ls-files`.split($/)
|
13
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
|
-
spec.require_paths = ['lib']
|
16
|
-
|
17
|
-
spec.add_runtime_dependency 'rest-client', '~> 1.8'
|
18
|
-
spec.add_runtime_dependency 'addressable', '~> 2.4'
|
19
|
-
|
20
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
21
|
-
spec.add_development_dependency 'rake', '~> 10.4'
|
22
|
-
spec.add_development_dependency 'rspec', '~> 3.3'
|
23
|
-
spec.add_development_dependency 'simplecov', '~> 0.10'
|
24
|
-
spec.add_development_dependency 'coveralls', '~> 0.8'
|
25
|
-
end
|
@@ -1,373 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"kind": "customsearch#search",
|
3
|
-
"url": {
|
4
|
-
"type": "application/json",
|
5
|
-
"template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"
|
6
|
-
},
|
7
|
-
"queries": {
|
8
|
-
"request": [
|
9
|
-
{
|
10
|
-
"title": "Google Custom Search - google",
|
11
|
-
"totalResults": "586000000",
|
12
|
-
"searchTerms": "google",
|
13
|
-
"count": 10,
|
14
|
-
"startIndex": 1,
|
15
|
-
"inputEncoding": "utf8",
|
16
|
-
"outputEncoding": "utf8",
|
17
|
-
"safe": "medium",
|
18
|
-
"cx": "016450909327860943906:3a3e35xbkzu"
|
19
|
-
}
|
20
|
-
],
|
21
|
-
"nextPage": [
|
22
|
-
{
|
23
|
-
"title": "Google Custom Search - google",
|
24
|
-
"totalResults": "586000000",
|
25
|
-
"searchTerms": "google",
|
26
|
-
"count": 10,
|
27
|
-
"startIndex": 11,
|
28
|
-
"inputEncoding": "utf8",
|
29
|
-
"outputEncoding": "utf8",
|
30
|
-
"safe": "medium",
|
31
|
-
"cx": "016450909327860943906:3a3e35xbkzu"
|
32
|
-
}
|
33
|
-
]
|
34
|
-
},
|
35
|
-
"context": {
|
36
|
-
"title": "Google"
|
37
|
-
},
|
38
|
-
"searchInformation": {
|
39
|
-
"searchTime": 0.379835,
|
40
|
-
"formattedSearchTime": "0.38",
|
41
|
-
"totalResults": "586000000",
|
42
|
-
"formattedTotalResults": "586,000,000"
|
43
|
-
},
|
44
|
-
"items": [
|
45
|
-
{
|
46
|
-
"kind": "customsearch#result",
|
47
|
-
"title": "Google",
|
48
|
-
"htmlTitle": "<b>Google</b>",
|
49
|
-
"link": "https://www.google.com/",
|
50
|
-
"displayLink": "www.google.com",
|
51
|
-
"snippet": "Search the world's information, including webpages, images, videos and more. \nGoogle has many special features to help you find exactly what you're looking ...",
|
52
|
-
"htmlSnippet": "Search the world's information, including webpages, images, videos and more. <br>\n<b>Google</b> has many special features to help you find exactly what you're looking ...",
|
53
|
-
"cacheId": "y14FcUQOGl4J",
|
54
|
-
"formattedUrl": "https://www.google.com/",
|
55
|
-
"htmlFormattedUrl": "https://www.<b>google</b>.com/",
|
56
|
-
"pagemap": {
|
57
|
-
"cse_thumbnail": [
|
58
|
-
{
|
59
|
-
"width": "217",
|
60
|
-
"height": "73",
|
61
|
-
"src": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSDjB4zxWMGFPE5Ufxh9imLrO9Y6hBgfEIW10yzopUjieRByDBCHPOhoRg"
|
62
|
-
}
|
63
|
-
],
|
64
|
-
"webpage": [
|
65
|
-
{
|
66
|
-
"image": "/images/branding/googleg/1x/googleg_standard_color_128dp.png"
|
67
|
-
}
|
68
|
-
],
|
69
|
-
"cse_image": [
|
70
|
-
{
|
71
|
-
"src": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png"
|
72
|
-
}
|
73
|
-
]
|
74
|
-
}
|
75
|
-
},
|
76
|
-
{
|
77
|
-
"kind": "customsearch#result",
|
78
|
-
"title": "Google News",
|
79
|
-
"htmlTitle": "<b>Google</b> News",
|
80
|
-
"link": "https://news.google.com/",
|
81
|
-
"displayLink": "news.google.com",
|
82
|
-
"snippet": "Comprehensive up-to-date news coverage, aggregated from sources all over the \nworld by Google News.",
|
83
|
-
"htmlSnippet": "Comprehensive up-to-date news coverage, aggregated from sources all over the <br>\nworld by <b>Google</b> News.",
|
84
|
-
"cacheId": "ozdoT-F6oa4J",
|
85
|
-
"formattedUrl": "https://news.google.com/",
|
86
|
-
"htmlFormattedUrl": "https://news.<b>google</b>.com/",
|
87
|
-
"pagemap": {
|
88
|
-
"cse_thumbnail": [
|
89
|
-
{
|
90
|
-
"width": "96",
|
91
|
-
"height": "72",
|
92
|
-
"src": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTpo2Q2fCHk43-ryr66t_hh3LvBIabbJKhYe6vbdOezoG0_HtgXKS8i"
|
93
|
-
}
|
94
|
-
],
|
95
|
-
"metatags": [
|
96
|
-
{
|
97
|
-
"apple-itunes-app": "app-id=913753848",
|
98
|
-
"referrer": "origin"
|
99
|
-
}
|
100
|
-
],
|
101
|
-
"cse_image": [
|
102
|
-
{
|
103
|
-
"src": "https://i.ytimg.com/vi/9LE9BFf42dY/default.jpg"
|
104
|
-
}
|
105
|
-
]
|
106
|
-
}
|
107
|
-
},
|
108
|
-
{
|
109
|
-
"kind": "customsearch#result",
|
110
|
-
"title": "Google Drive - Cloud Storage & File Backup for Photos, Docs & More",
|
111
|
-
"htmlTitle": "<b>Google</b> Drive - Cloud Storage & File Backup for Photos, Docs & More",
|
112
|
-
"link": "https://www.google.com/drive/",
|
113
|
-
"displayLink": "www.google.com",
|
114
|
-
"snippet": "Get access to files anywhere through secure cloud storage and file backup for \nyour photos, videos, files and more with Google Drive.",
|
115
|
-
"htmlSnippet": "Get access to files anywhere through secure cloud storage and file backup for <br>\nyour photos, videos, files and more with <b>Google</b> Drive.",
|
116
|
-
"cacheId": "uqmo4lUVIlEJ",
|
117
|
-
"formattedUrl": "https://www.google.com/drive/",
|
118
|
-
"htmlFormattedUrl": "https://www.<b>google</b>.com/drive/",
|
119
|
-
"pagemap": {
|
120
|
-
"cse_thumbnail": [
|
121
|
-
{
|
122
|
-
"width": "143",
|
123
|
-
"height": "124",
|
124
|
-
"src": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS_lKvopIHhL6rRhr8y1qrRGy2KB48ew42YUVxVdJ7f_g7kuq2jocJyvBU"
|
125
|
-
}
|
126
|
-
],
|
127
|
-
"metatags": [
|
128
|
-
{
|
129
|
-
"viewport": "width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no",
|
130
|
-
"og:title": "Google Drive - Cloud Storage & File Backup for Photos, Docs & More",
|
131
|
-
"og:image": "//www.google.com/drive/images/drive/logo-drive.png",
|
132
|
-
"og:description": "Get access to files anywhere through secure cloud storage and file backup for your photos, videos, files and more with Google Drive.",
|
133
|
-
"og:type": "website",
|
134
|
-
"msvalidate.01": "D93199779C0B5EE436644DE888FCC272",
|
135
|
-
"og:url": "https://www.google.com/drive/",
|
136
|
-
"twitter:card": "summary",
|
137
|
-
"twitter:url": "https://www.google.com/drive/",
|
138
|
-
"twitter:title": "Meet Google Drive – One place for all your files",
|
139
|
-
"twitter:image": "http://www.google.com/drive/images/drive/logo-drive.png",
|
140
|
-
"twitter:description": "Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.",
|
141
|
-
"twitter:creator": "@google"
|
142
|
-
}
|
143
|
-
],
|
144
|
-
"cse_image": [
|
145
|
-
{
|
146
|
-
"src": "https://www.google.com/drive/images/drive/logo-drive.png"
|
147
|
-
}
|
148
|
-
]
|
149
|
-
}
|
150
|
-
},
|
151
|
-
{
|
152
|
-
"kind": "customsearch#result",
|
153
|
-
"title": "Google Maps",
|
154
|
-
"htmlTitle": "<b>Google</b> Maps",
|
155
|
-
"link": "https://maps.google.com/",
|
156
|
-
"displayLink": "maps.google.com",
|
157
|
-
"snippet": "Find local businesses, view maps and get driving directions in Google Maps.",
|
158
|
-
"htmlSnippet": "Find local businesses, view maps and get driving directions in <b>Google</b> Maps.",
|
159
|
-
"cacheId": "SK7Wkfiy_5IJ",
|
160
|
-
"formattedUrl": "https://maps.google.com/",
|
161
|
-
"htmlFormattedUrl": "https://maps.<b>google</b>.com/",
|
162
|
-
"pagemap": {
|
163
|
-
"cse_thumbnail": [
|
164
|
-
{
|
165
|
-
"width": "79",
|
166
|
-
"height": "79",
|
167
|
-
"src": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTTnonf_3aqokUadTh2YgBIuuXOeWCqwITHrCXiT1wkStRX8x1RDnJGJg"
|
168
|
-
}
|
169
|
-
],
|
170
|
-
"metatags": [
|
171
|
-
{
|
172
|
-
"viewport": "initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no",
|
173
|
-
"google": "notranslate",
|
174
|
-
"referrer": "origin",
|
175
|
-
"og:title": "Google Maps",
|
176
|
-
"og:image": "https://maps.google.com/maps/api/staticmap?sensor=false¢er=37.599999999999994%2C-95.665&zoom=4&size=256x256&language=en&client=google-maps-frontend&signature=ZHy6QGfQalhVZH-bZ4_LhChJzpg",
|
177
|
-
"og:description": "Find local businesses, view maps and get driving directions in Google Maps.",
|
178
|
-
"og:site_name": "Google Maps",
|
179
|
-
"twitter:card": "summary"
|
180
|
-
}
|
181
|
-
],
|
182
|
-
"place": [
|
183
|
-
{
|
184
|
-
"name": "Google Maps",
|
185
|
-
"image": "https://maps.google.com/maps/api/staticmap?sensor=false¢er=37.599999999999994%2C-95.665&zoom=4&size=256x256&language=en&client=google-maps-frontend&signature=ZHy6QGfQalhVZH-bZ4_LhChJzpg",
|
186
|
-
"description": "Find local businesses, view maps and get driving directions in Google Maps."
|
187
|
-
}
|
188
|
-
],
|
189
|
-
"cse_image": [
|
190
|
-
{
|
191
|
-
"src": "https://ssl.gstatic.com/gb/images/silhouette_96.png"
|
192
|
-
}
|
193
|
-
]
|
194
|
-
}
|
195
|
-
},
|
196
|
-
{
|
197
|
-
"kind": "customsearch#result",
|
198
|
-
"title": "Google Translate",
|
199
|
-
"htmlTitle": "<b>Google</b> Translate",
|
200
|
-
"link": "https://translate.google.com/",
|
201
|
-
"displayLink": "translate.google.com",
|
202
|
-
"snippet": "Google's free service instantly translates words, phrases, and web pages \nbetween English and over 100 other languages. English, Afrikaans, Albanian, \nAmharic, ...",
|
203
|
-
"htmlSnippet": "<b>Google's</b> free service instantly translates words, phrases, and web pages <br>\nbetween English and over 100 other languages. English, Afrikaans, Albanian, <br>\nAmharic, ...",
|
204
|
-
"cacheId": "InKXtjHqSVgJ",
|
205
|
-
"formattedUrl": "https://translate.google.com/",
|
206
|
-
"htmlFormattedUrl": "https://translate.<b>google</b>.com/",
|
207
|
-
"pagemap": {
|
208
|
-
"metatags": [
|
209
|
-
{
|
210
|
-
"google": "notranslate"
|
211
|
-
}
|
212
|
-
]
|
213
|
-
}
|
214
|
-
},
|
215
|
-
{
|
216
|
-
"kind": "customsearch#result",
|
217
|
-
"title": "Google Hangouts",
|
218
|
-
"htmlTitle": "<b>Google</b> Hangouts",
|
219
|
-
"link": "https://hangouts.google.com/",
|
220
|
-
"displayLink": "hangouts.google.com",
|
221
|
-
"snippet": "Hangouts bring conversations to life with photos, emoji, and even group video \ncalls for free. Connect with friends across computers, Android, and Apple devices\n.",
|
222
|
-
"htmlSnippet": "Hangouts bring conversations to life with photos, emoji, and even group video <br>\ncalls for free. Connect with friends across computers, Android, and Apple devices<br>\n.",
|
223
|
-
"cacheId": "GWWQi6h3N3kJ",
|
224
|
-
"formattedUrl": "https://hangouts.google.com/",
|
225
|
-
"htmlFormattedUrl": "https://hangouts.<b>google</b>.com/",
|
226
|
-
"pagemap": {
|
227
|
-
"cse_thumbnail": [
|
228
|
-
{
|
229
|
-
"width": "102",
|
230
|
-
"height": "102",
|
231
|
-
"src": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTkwbdtJvIpUBOASjoxjzITjsaSe-TC_MVSAwLaYkw-gV3caaQUkZAI"
|
232
|
-
}
|
233
|
-
],
|
234
|
-
"product": [
|
235
|
-
{
|
236
|
-
"name": "Google Hangouts",
|
237
|
-
"description": "Hangouts bring conversations to life with photos, emoji, and even group video calls for free. Connect with friends across computers, Android, and Apple devices.",
|
238
|
-
"image": "https://www.gstatic.com/images/icons/material/product/2x/hangouts_64dp.png"
|
239
|
-
}
|
240
|
-
],
|
241
|
-
"metatags": [
|
242
|
-
{
|
243
|
-
"og:description": "Hangouts bring conversations to life with photos, emoji, and even group video calls for free. Connect with friends across computers, Android, and Apple devices.",
|
244
|
-
"twitter:description": "Hangouts bring conversations to life with photos, emoji, and even group video calls for free.",
|
245
|
-
"og:image": "https://www.gstatic.com/images/icons/material/product/2x/hangouts_64dp.png",
|
246
|
-
"og:type": "website",
|
247
|
-
"og:title": "Google Hangouts",
|
248
|
-
"twitter:card": "product",
|
249
|
-
"twitter:site": "@google",
|
250
|
-
"twitter:title": "Google Hangouts",
|
251
|
-
"twitter:image:src": "https://www.gstatic.com/images/icons/material/product/2x/hangouts_64dp.png",
|
252
|
-
"viewport": "width=device-width, initial-scale=1"
|
253
|
-
}
|
254
|
-
],
|
255
|
-
"cse_image": [
|
256
|
-
{
|
257
|
-
"src": "https://www.gstatic.com/images/icons/material/product/2x/hangouts_64dp.png"
|
258
|
-
}
|
259
|
-
],
|
260
|
-
"hproduct": [
|
261
|
-
{
|
262
|
-
"description": "Hangouts bring conversations to life with photos, emoji, and even group video calls for free. Connect with friends across computers, Android, and Apple devices.",
|
263
|
-
"fn": "Google Hangouts",
|
264
|
-
"photo": "https://www.gstatic.com/images/icons/material/product/2x/hangouts_64dp.png"
|
265
|
-
}
|
266
|
-
]
|
267
|
-
}
|
268
|
-
},
|
269
|
-
{
|
270
|
-
"kind": "customsearch#result",
|
271
|
-
"title": "Google Images",
|
272
|
-
"htmlTitle": "<b>Google</b> Images",
|
273
|
-
"link": "https://images.google.com/",
|
274
|
-
"displayLink": "images.google.com",
|
275
|
-
"snippet": "Google Images. The most comprehensive image search on the web.",
|
276
|
-
"htmlSnippet": "<b>Google</b> Images. The most comprehensive image search on the web.",
|
277
|
-
"cacheId": "53q8dRS-MysJ",
|
278
|
-
"formattedUrl": "https://images.google.com/",
|
279
|
-
"htmlFormattedUrl": "https://images.<b>google</b>.com/",
|
280
|
-
"pagemap": {
|
281
|
-
"webpage": [
|
282
|
-
{
|
283
|
-
"image": "/images/branding/googleg/1x/googleg_standard_color_128dp.png"
|
284
|
-
}
|
285
|
-
]
|
286
|
-
}
|
287
|
-
},
|
288
|
-
{
|
289
|
-
"kind": "customsearch#result",
|
290
|
-
"title": "Google+",
|
291
|
-
"htmlTitle": "Google+",
|
292
|
-
"link": "https://plus.google.com/",
|
293
|
-
"displayLink": "plus.google.com",
|
294
|
-
"snippet": "Enter your email. Need help? Sign in with a different account Create account. \nOne Google Account for everything Google. About Google · Privacy · Terms · \nHelp.",
|
295
|
-
"htmlSnippet": "Enter your email. Need help? Sign in with a different account Create account. <br>\nOne <b>Google</b> Account for everything <b>Google</b>. About <b>Google</b> · Privacy · Terms · <br>\nHelp.",
|
296
|
-
"cacheId": "INDMkJEFRpcJ",
|
297
|
-
"formattedUrl": "https://plus.google.com/",
|
298
|
-
"htmlFormattedUrl": "https://plus.<b>google</b>.com/",
|
299
|
-
"pagemap": {
|
300
|
-
"metatags": [
|
301
|
-
{
|
302
|
-
"viewport": "width=300, initial-scale=1"
|
303
|
-
}
|
304
|
-
]
|
305
|
-
}
|
306
|
-
},
|
307
|
-
{
|
308
|
-
"kind": "customsearch#result",
|
309
|
-
"title": "Google Groups",
|
310
|
-
"htmlTitle": "<b>Google</b> Groups",
|
311
|
-
"link": "https://groups.google.com/",
|
312
|
-
"displayLink": "groups.google.com",
|
313
|
-
"snippet": "Google Groups allows you to create and participate in online forums and email-\nbased groups with a rich experience for community conversations.",
|
314
|
-
"htmlSnippet": "<b>Google</b> Groups allows you to create and participate in online forums and email-<br>\nbased groups with a rich experience for community conversations.",
|
315
|
-
"cacheId": "NtOoUU9wCTgJ",
|
316
|
-
"formattedUrl": "https://groups.google.com/",
|
317
|
-
"htmlFormattedUrl": "https://groups.<b>google</b>.com/",
|
318
|
-
"pagemap": {
|
319
|
-
"cse_thumbnail": [
|
320
|
-
{
|
321
|
-
"width": "74",
|
322
|
-
"height": "74",
|
323
|
-
"src": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRteZe_WmKE33kZpUf7ysz6GIqCJtk10_1XCjLvP9QHhHkTkMJ3tNDSLA"
|
324
|
-
}
|
325
|
-
],
|
326
|
-
"metatags": [
|
327
|
-
{
|
328
|
-
"gwt:property": "locale=en",
|
329
|
-
"standalone::gwt:property": "baseUrl=/forum/"
|
330
|
-
}
|
331
|
-
],
|
332
|
-
"cse_image": [
|
333
|
-
{
|
334
|
-
"src": "https://groups.google.com/forum/browse-all-color.png"
|
335
|
-
}
|
336
|
-
]
|
337
|
-
}
|
338
|
-
},
|
339
|
-
{
|
340
|
-
"kind": "customsearch#result",
|
341
|
-
"title": "Google Play",
|
342
|
-
"htmlTitle": "<b>Google</b> Play",
|
343
|
-
"link": "https://play.google.com/store?hl=en",
|
344
|
-
"displayLink": "play.google.com",
|
345
|
-
"snippet": "Enjoy millions of the latest Android apps, games, music, movies, TV, books, \nmagazines & more. Anytime, anywhere, across your devices.",
|
346
|
-
"htmlSnippet": "Enjoy millions of the latest Android apps, games, music, movies, TV, books, <br>\nmagazines & more. Anytime, anywhere, across your devices.",
|
347
|
-
"cacheId": "Oje0jITxpTYJ",
|
348
|
-
"formattedUrl": "https://play.google.com/store?hl=en",
|
349
|
-
"htmlFormattedUrl": "https://play.<b>google</b>.com/store?hl=en",
|
350
|
-
"pagemap": {
|
351
|
-
"cse_thumbnail": [
|
352
|
-
{
|
353
|
-
"width": "299",
|
354
|
-
"height": "168",
|
355
|
-
"src": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTNBSFSFUqY-gWxg1s3QhQ4aGezSYh_kQUurRS5llWA8PMmQ8DhSqi_NCM"
|
356
|
-
}
|
357
|
-
],
|
358
|
-
"metatags": [
|
359
|
-
{
|
360
|
-
"og:type": "website",
|
361
|
-
"og:title": "Google Play",
|
362
|
-
"og:url": "https://play.google.com/store"
|
363
|
-
}
|
364
|
-
],
|
365
|
-
"cse_image": [
|
366
|
-
{
|
367
|
-
"src": "https://lh3.googleusercontent.com/2y9FbHOcYZ1m_tSIL1SissYzl2QKZ0GhFpdjJxND8XdyO5pKek2tJP6209Pymgvjuds=w515"
|
368
|
-
}
|
369
|
-
]
|
370
|
-
}
|
371
|
-
}
|
372
|
-
]
|
373
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe OnewheelGoogle do
|
4
|
-
before(:each) do
|
5
|
-
mock_result_json = File.open('spec/fixtures/mock_result.json').read
|
6
|
-
allow(RestClient).to receive(:get).and_return(mock_result_json)
|
7
|
-
end
|
8
|
-
|
9
|
-
it 'does neat googly things' do
|
10
|
-
result = OnewheelGoogle::search('google', 'cse', 'api', 'high')
|
11
|
-
expect(result['items'][0]['title']).to eq('Google')
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'does not do neat googly things' do
|
15
|
-
result = OnewheelGoogle::search('', 'cse', 'nope', 'high')
|
16
|
-
expect(result).to eq(nil)
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'does not do neat googly things' do
|
20
|
-
result = OnewheelGoogle::search('google', '', 'nope', 'high')
|
21
|
-
expect(result).to eq(nil)
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'does not do neat googly things' do
|
25
|
-
result = OnewheelGoogle::search('google', 'xyz', '', 'high')
|
26
|
-
expect(result).to eq(nil)
|
27
|
-
end
|
28
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'simplecov'
|
2
|
-
require 'coveralls'
|
3
|
-
SimpleCov.formatters = [
|
4
|
-
SimpleCov::Formatter::HTMLFormatter,
|
5
|
-
Coveralls::SimpleCov::Formatter
|
6
|
-
]
|
7
|
-
SimpleCov.start { add_filter '/spec/' }
|
8
|
-
|
9
|
-
require 'onewheel-google'
|
10
|
-
|
11
|
-
describe 'tests' do
|
12
|
-
it 'will call google and get things' do
|
13
|
-
mock_result_json = File.open('spec/fixtures/mock_result.json').read
|
14
|
-
allow(RestClient).to receive(:get).and_return(mock_result_json)
|
15
|
-
end
|
16
|
-
end
|