lita-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94e797b461c022d67166e3054f6d390170157c88
4
- data.tar.gz: 5fc7f51ca7ad71af75f00031a53527efda2d00e6
3
+ metadata.gz: cdc3245dde9fb77de3457d98598f37fa1d1a444d
4
+ data.tar.gz: 850fcf11d7b812496be7bef367f636bfb7decc2c
5
5
  SHA512:
6
- metadata.gz: e510841ca0fc23937441c07932fb67c2e03554d320b6672243681837cc4d19f0fdfbaa17afc654bc9c5c59983ca2be0997d29210ef6c5589790b0400c6b70a12
7
- data.tar.gz: 64b822b99a0e5ad1bd6336ad4f109b88f832cb29c363fa9d01e1801e0b71d555c9755e689ace1f4e5a39da5bbdfead2da022a041e11c3a8ca489c52b2c9584ae
6
+ metadata.gz: 3af942e52d78316f6ce2a64edfcd9be1c58b7807146565e00a1683d8548468f90b71b3c0e39a5a94024ebfc82410d701d53bcf3968bf64ce0fa65047fd0aa564
7
+ data.tar.gz: 7d34d6385ea64ef7af3f564b3a1b0723758892f5ba8a95772a54be21664d97258cb293f28bc2f289e0690dedf3ddbd5710f2c1beef6de03e367a18c5ba4ed1c4
@@ -15,7 +15,7 @@ module Lita
15
15
  query = response.matches[0][0]
16
16
  search_result = get_results query
17
17
  puts search_result.inspect
18
- response.reply search_result['items'][0]['link']
18
+ response.reply "#{search_result['items'][0]['link']} #{search_result['items'][0]['title']}: #{search_result['items'][0]['snippet']}"
19
19
  end
20
20
 
21
21
  def get_results(query)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-google'
3
- spec.version = '0.0.0'
3
+ spec.version = '0.0.1'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = 'An implementation of Google Custom Search Engine for searching in chat.'
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.require_paths = ['lib']
16
16
 
17
17
  spec.add_runtime_dependency 'lita', '~> 4'
18
- spec.add_runtime_dependency 'rest-client'
18
+ spec.add_runtime_dependency 'rest-client', '~> 1.8'
19
19
  spec.add_runtime_dependency 'addressable', '~> 2.4'
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
@@ -5,222 +5,369 @@
5
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
6
  },
7
7
  "queries": {
8
- "nextPage": [{
9
- "title": "Google Custom Search - ohai",
10
- "totalResults": "1530000",
11
- "searchTerms": "ohai",
12
- "count": 10,
13
- "startIndex": 11,
14
- "inputEncoding": "utf8",
15
- "outputEncoding": "utf8",
16
- "safe": "off",
17
- "cx": "[redacted]",
18
- "searchType": "image"
19
- }],
20
- "request": [{
21
- "title": "Google Custom Search - ohai",
22
- "totalResults": "1530000",
23
- "searchTerms": "ohai",
24
- "count": 10,
25
- "startIndex": 1,
26
- "inputEncoding": "utf8",
27
- "outputEncoding": "utf8",
28
- "safe": "off",
29
- "cx": "[redacted]",
30
- "searchType": "image"
31
- }]
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
+ ]
32
34
  },
33
35
  "context": {
34
36
  "title": "Google"
35
37
  },
36
38
  "searchInformation": {
37
- "searchTime": 0.228606,
38
- "formattedSearchTime": "0.23",
39
- "totalResults": "1530000",
40
- "formattedTotalResults": "1,530,000"
39
+ "searchTime": 0.379835,
40
+ "formattedSearchTime": "0.38",
41
+ "totalResults": "586000000",
42
+ "formattedTotalResults": "586,000,000"
41
43
  },
42
- "items": [{
43
- "kind": "customsearch#result",
44
- "title": "Cute Bug says Ohai | Ohai | Pinterest | So Cute and Animal",
45
- "htmlTitle": "Cute Bug says <b>Ohai</b> | <b>Ohai</b> | Pinterest | So Cute and Animal",
46
- "link": "https://s-media-cache-ak0.pinimg.com/736x/4a/43/a4/4a43a4b6569cf8a197b6c9217de3f412.jpg",
47
- "displayLink": "www.pinterest.com",
48
- "snippet": "Cute Bug says Ohai: Funny",
49
- "htmlSnippet": "Cute Bug says <b>Ohai</b>: Funny",
50
- "mime": "image/jpeg",
51
- "image": {
52
- "contextLink": "https://www.pinterest.com/pin/218424650649907541/",
53
- "height": 267,
54
- "width": 400,
55
- "byteSize": 27797,
56
- "thumbnailLink": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTGAWb81To4szalry_FbsWtG_89LFR0E7NqyidKQtvkwtvU0ni1DWdT1gU",
57
- "thumbnailHeight": 83,
58
- "thumbnailWidth": 124
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&#39;s information, including webpages, images, videos and more. <br>\n<b>Google</b> has many special features to help you find exactly what you&#39;re looking&nbsp;...",
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 &amp; File Backup for Photos, Docs &amp; 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&center=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&center=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&#39;s</b> free service instantly translates words, phrases, and web pages <br>\nbetween English and over 100 other languages. English, Afrikaans, Albanian, <br>\nAmharic,&nbsp;...",
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> &middot; Privacy &middot; Terms &middot; <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 &amp; 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
+ }
59
371
  }
60
- }, {
61
- "kind": "customsearch#result",
62
- "title": "OHAI Panda | Flickr - Photo Sharing!",
63
- "htmlTitle": "<b>OHAI</b> Panda | Flickr - Photo Sharing!",
64
- "link": "https://c2.staticflickr.com/4/3563/3429331082_55a77b8618.jpg",
65
- "displayLink": "www.flickr.com",
66
- "snippet": "OHAI Panda | by",
67
- "htmlSnippet": "<b>OHAI</b> Panda | by",
68
- "mime": "image/jpeg",
69
- "image": {
70
- "contextLink": "https://www.flickr.com/photos/whiteladyeowyn/3429331082",
71
- "height": 500,
72
- "width": 422,
73
- "byteSize": 51775,
74
- "thumbnailLink": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQFjWkEiSVDAdgFq9sD6l8KUBoRl6Yq-TW_4Opiv1XdDZFPicO4Uypf8rc",
75
- "thumbnailHeight": 130,
76
- "thumbnailWidth": 110
77
- }
78
- }, {
79
- "kind": "customsearch#result",
80
- "title": "Image - Ohai der I not no u waz heer.jpg - Epic Rap Battles of ...",
81
- "htmlTitle": "Image - <b>Ohai</b> der I not no u waz heer.jpg - Epic Rap Battles of <b>...</b>",
82
- "link": "http://vignette4.wikia.nocookie.net/epicrapbattlesofhistory/images/6/61/Ohai_der_I_not_no_u_waz_heer.jpg/revision/latest?cb=20140514001442",
83
- "displayLink": "epicrapbattlesofhistory.wikia.com",
84
- "snippet": "File:Ohai der I not no u waz",
85
- "htmlSnippet": "File:<b>Ohai</b> der I not no u waz",
86
- "mime": "image/",
87
- "fileFormat": "Image Document",
88
- "image": {
89
- "contextLink": "http://epicrapbattlesofhistory.wikia.com/wiki/File:Ohai_der_I_not_no_u_waz_heer.jpg",
90
- "height": 408,
91
- "width": 450,
92
- "byteSize": 32771,
93
- "thumbnailLink": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS3Rq1w1LfBnarhjZwecu3n0uhztus9LfKypcJtdXkUo7oz_p4KhbC3FnM",
94
- "thumbnailHeight": 115,
95
- "thumbnailWidth": 127
96
- }
97
- }, {
98
- "kind": "customsearch#result",
99
- "title": "funny fish says ohai | Creatures in the oceans | Pinterest | Funny ...",
100
- "htmlTitle": "funny fish says <b>ohai</b> | Creatures in the oceans | Pinterest | Funny <b>...</b>",
101
- "link": "https://s-media-cache-ak0.pinimg.com/736x/aa/ca/70/aaca70611707054e7f8577915ad2ad9a.jpg",
102
- "displayLink": "www.pinterest.com",
103
- "snippet": "Saved from",
104
- "htmlSnippet": "Saved from",
105
- "mime": "image/jpeg",
106
- "image": {
107
- "contextLink": "https://www.pinterest.com/pin/515099276101358075/",
108
- "height": 450,
109
- "width": 487,
110
- "byteSize": 47743,
111
- "thumbnailLink": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSnnmeUA94J7_PVwnTpfO6HJEy4H4H0FhbMNPDP5CEoXe7YdcvRLwmRiNQ",
112
- "thumbnailHeight": 119,
113
- "thumbnailWidth": 129
114
- }
115
- }, {
116
- "kind": "customsearch#result",
117
- "title": "Ohai_c55a62_1443699.jpg",
118
- "htmlTitle": "<b>Ohai</b>_c55a62_1443699.jpg",
119
- "link": "http://static.fjcdn.com/pictures/Ohai_c55a62_1443699.jpg",
120
- "displayLink": "www.funnyjunk.com",
121
- "snippet": "Ohai. Nothing to see here.",
122
- "htmlSnippet": "<b>Ohai</b>. Nothing to see here.",
123
- "mime": "image/jpeg",
124
- "image": {
125
- "contextLink": "http://www.funnyjunk.com/funny_pictures/1444143/Ohai/",
126
- "height": 422,
127
- "width": 600,
128
- "byteSize": 41438,
129
- "thumbnailLink": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcStyC-iciXitkp7XxJFvsiMGQhdwPkrrOHZ5Ilz_RgUb3jo4IYLQ3ZPZwE",
130
- "thumbnailHeight": 95,
131
- "thumbnailWidth": 135
132
- }
133
- }, {
134
- "kind": "customsearch#result",
135
- "title": "Kealia Ohai ⊕ Rising Star ⊕ 2014 - YouTube",
136
- "htmlTitle": "Kealia <b>Ohai</b> ⊕ Rising Star ⊕ 2014 - YouTube",
137
- "link": "https://i.ytimg.com/vi/-1BAgVImCE4/maxresdefault.jpg",
138
- "displayLink": "www.youtube.com",
139
- "snippet": "Kealia Ohai ⊕ Rising Star ⊕",
140
- "htmlSnippet": "Kealia <b>Ohai</b> ⊕ Rising Star ⊕",
141
- "mime": "image/jpeg",
142
- "image": {
143
- "contextLink": "https://www.youtube.com/watch?v=-1BAgVImCE4",
144
- "height": 1280,
145
- "width": 2048,
146
- "byteSize": 235084,
147
- "thumbnailLink": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRqJtmAb3uni91m45r0V3XotsiN0dyOtPFonwtJ2iORDch_Jx3y6vLUthE",
148
- "thumbnailHeight":94,
149
- "thumbnailWidth":150
150
- }
151
- }, {
152
- "kind": "customsearch#result",
153
- "title": "Amy @ ohai (@ohai) | Twitter",
154
- "htmlTitle": "Amy @ <b>ohai</b> (@<b>ohai</b>) | Twitter",
155
- "link": "https://pbs.twimg.com/profile_images/879196827/ohai_logo_bubble_400x400.gif",
156
- "displayLink": "twitter.com",
157
- "snippet": "Amy @ ohai",
158
- "htmlSnippet": "Amy @ <b>ohai</b>",
159
- "mime": "image/gif",
160
- "fileFormat": "Image Document",
161
- "image":{
162
- "contextLink": "https://twitter.com/ohai",
163
- "height":400,
164
- "width":400,
165
- "byteSize":140038,
166
- "thumbnailLink": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6U6CGHEapf8OU5lUAESNuPmc5d8SUptd9g8MC4hortaFIp_Qv_JQ7QA0",
167
- "thumbnailHeight":124,
168
- "thumbnailWidth":124
169
- }
170
- }, {
171
- "kind": "customsearch#result",
172
- "title": "Ohai - Wikipedia, the free encyclopedia",
173
- "htmlTitle": "<b>Ohai</b> - Wikipedia, the free encyclopedia",
174
- "link": "https://upload.wikimedia.org/wikipedia/commons/6/6d/Image_of_mining_under_Ohai_area.jpg",
175
- "displayLink": "en.wikipedia.org",
176
- "snippet": "mining in Ohai area.",
177
- "htmlSnippet": "mining in <b>Ohai</b> area.",
178
- "mime": "image/jpeg",
179
- "image":{
180
- "contextLink": "https://en.wikipedia.org/wiki/Ohai",
181
- "height":10032,
182
- "width":13360,
183
- "byteSize":4944353,
184
- "thumbnailLink": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRYCKkuAzc87ufSxyNZgQAYEitvDd3SQY8uRMdy94Pg2y8zgndk7OIxDIYC",
185
- "thumbnailHeight":113,
186
- "thumbnailWidth":150
187
- }
188
- }, {
189
- "kind": "customsearch#result",
190
- "title": "Ohai | Fabric of Thought",
191
- "htmlTitle": "<b>Ohai</b> | Fabric of Thought",
192
- "link": "http://fabricofthought.net/galleries/post-pics/Ohai.jpg",
193
- "displayLink": "fabricofthought.net",
194
- "snippet": "/galleries/post-pics/Ohai.jpg",
195
- "htmlSnippet": "/galleries/post-pics/<b>Ohai</b>.jpg",
196
- "mime": "image/jpeg",
197
- "image":{
198
- "contextLink": "http://fabricofthought.net/posts/ohai.html",
199
- "height":281,
200
- "width":500,
201
- "byteSize":29200,
202
- "thumbnailLink": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRrRSq5qz5aIXd9o3VKjrqH4G4cN_16XR-ZKzExJFZma8aojMQN7-c1pjo",
203
- "thumbnailHeight":73,
204
- "thumbnailWidth":130
205
- }
206
- }, {
207
- "kind": "customsearch#result",
208
- "title": "Meaning of OHAI - What does OHAI mean? - OHAI definition",
209
- "htmlTitle": "Meaning of <b>OHAI</b> - What does <b>OHAI</b> mean? - <b>OHAI</b> definition",
210
- "link": "http://slang.org/image/OHAI.png",
211
- "displayLink": "slang.org",
212
- "snippet": "Definition of OHAI",
213
- "htmlSnippet": "Definition of <b>OHAI</b>",
214
- "mime": "image/png",
215
- "fileFormat": "Image Document",
216
- "image":{
217
- "contextLink": "http://slang.org/OHAI-meaning-definition",
218
- "height":300,
219
- "width":300,
220
- "byteSize":28272,
221
- "thumbnailLink": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSNzdfCjXT6sATyXfxp44d3qMKdyM3cRFLStUossTxtmVm2iJrqnRdxNU8",
222
- "thumbnailHeight": 116,
223
- "thumbnailWidth": 116
224
- }
225
- }]
226
- }
372
+ ]
373
+ }
@@ -15,9 +15,7 @@ describe Lita::Handlers::OnewheelGoogle, lita_handler: true do
15
15
  it { is_expected.to route_command('google something') }
16
16
 
17
17
  it 'does neat googly things' do
18
- mock_result_json = JSON.parse File.open('spec/fixtures/mock_result.json').read
19
- allow(Lita::Handlers::OnewheelGoogle).to receive(:get_results).and_return(mock_result_json)
20
- # mock gcse response
21
18
  send_command 'google yo'
19
+ expect(replies.last).to eq("https://www.google.com/ Google: 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 ...")
22
20
  end
23
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: rest-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: addressable
43
43
  requirement: !ruby/object:Gem::Requirement