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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b68f7500d5b505feb47d591d3559e1ee0aa5e2ec1a9703d9b864bdc004b02d8
4
- data.tar.gz: 03757e3ffff7f4554f4ef292e951d0c386568624c3362713687eb66ed3889444
3
+ metadata.gz: 95f048092feb0c0a7325f85b562589ecc973012ebe3fb685c367b13a3d212872
4
+ data.tar.gz: e28c9b5043a055b010c0eacb3fa96bd8cb6e78f8546242a699d9e44e19e5d7d2
5
5
  SHA512:
6
- metadata.gz: 3c0d1204d44fb936faa67a80e604024ab0a6fa86e7d2e7eb04e847a1bde6aa97a417a5faabc9cd03b8bc0eb6f9716c02a1a768234ae71d644a155e65ebcc5039
7
- data.tar.gz: 97cc7fc5f96ed3e62932615ec60e7e864bccfcbc8ab28921d8ad677a9f08a4d3eedc9470f0807f125a32e74caccb895f95b4a0c62f6d58b2e4fa14a5afbce63f
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 /^gi(f|t)\s+(.*)$/i, :giphy, command: true
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.1'
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.1
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-03 00:00:00.000000000 Z
11
+ date: 2020-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita