lita-onewheel-images 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/onewheel_images.rb +4 -1
- data/lita-onewheel-images.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95f048092feb0c0a7325f85b562589ecc973012ebe3fb685c367b13a3d212872
|
4
|
+
data.tar.gz: e28c9b5043a055b010c0eacb3fa96bd8cb6e78f8546242a699d9e44e19e5d7d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc6a3f628d611ac287a745ccc254133eeb6b179549cc36a551e6c35dbdbceead8bde8467693b081e721646466769642e6a4ead7eb789dd39d0efabbc3225903f
|
7
|
+
data.tar.gz: 1f21a6484b522b81b28bf58d0b07427ed887ce81e15c05ffadef4d528a66a855a002ce0217989d1bfe7a155835f1fe29c37bd756e6265599b09f5ef898fc92a7
|
@@ -12,7 +12,8 @@ module Lita
|
|
12
12
|
route /^image\s+(.*)$/i, :image, command: true
|
13
13
|
route /^img\s+(.*)$/i, :image, command: true
|
14
14
|
route /^giphy\s+(.*)$/i, :giphy, command: true
|
15
|
-
route /^
|
15
|
+
route /^gif\s+(.*)$/i, :giphy, command: true
|
16
|
+
route /^git\s+(.*)$/i, :giphy, command: true
|
16
17
|
|
17
18
|
def image(response)
|
18
19
|
query = response.matches[0][0]
|
@@ -34,9 +35,11 @@ module Lita
|
|
34
35
|
end
|
35
36
|
|
36
37
|
query = 'giphy ' + response.matches[0][0]
|
38
|
+
Lita.logger.debug("Query: #{query}")
|
37
39
|
result = ::OnewheelGoogle::search(query, config.custom_search_engine_id, config.google_api_key, config.safe_search, image = true)
|
38
40
|
|
39
41
|
if result
|
42
|
+
Lita.logger.debug("items: #{result['items']}")
|
40
43
|
result['items'].each do |r|
|
41
44
|
if r['mime'] == 'image/gif'
|
42
45
|
if r['link'][/200_s.gif$/]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-images'
|
3
|
-
spec.version = '0.6.
|
3
|
+
spec.version = '0.6.2'
|
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 image searches in chat.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-images
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|