lita-onewheel-images 0.3.0 → 0.3.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: a49e13aa573578aafcb8ef5020fe162dfd17e371
4
- data.tar.gz: 3ee392697a4619673bcff0bbf51c718fb229acc4
3
+ metadata.gz: 05e3e89c291db0312453effd2384fd1c6869cc54
4
+ data.tar.gz: f597864365f5c348e499cfb0099f124df225e54c
5
5
  SHA512:
6
- metadata.gz: 7dcba255ea4c54209ca56b8f450de2f688b6def62b07be646ed391450ee9a35e570ac6466f0435183eeb80c4b437cb377128d63a0b1352a44ef01fa799880b98
7
- data.tar.gz: 55477e183b29c2e0aa0aaf2a76eafccfa8eb80fb50b72d1b21878b7ac2f7333d55322a5275e0f2582b18380f63549ee41c3910efda235e6980ab8430e02fa214
6
+ metadata.gz: 52353294af93f4958fea337f1629087fab8e86f5c06235ec600e37d503bbcc52095a1193450b7425f429767a60e96177be7857f7d9c1c854bfebff8c8c904224
7
+ data.tar.gz: 4f4966cffa8817db51f89942de24bb2fc174854b31cde2ee10d854d5efe502284b500269585aa1d317efd9f20f91b655571ef40bf43a296d0d290ab6ff3adbd3
@@ -6,6 +6,7 @@ module Lita
6
6
  config :custom_search_engine_id
7
7
  config :google_api_key
8
8
  config :safe_search, required: false, default: 'medium'
9
+ config :giphy_enabled, required: false, default: true
9
10
 
10
11
  route /^image\s+(.*)$/, :image, command: true
11
12
  route /^giphy\s+(.*)$/, :giphy, command: true
@@ -17,6 +18,10 @@ module Lita
17
18
  end
18
19
 
19
20
  def giphy(response)
21
+ unless config.giphy_enabled
22
+ return
23
+ end
24
+
20
25
  query = 'giphy ' + response.matches[0][0]
21
26
  result = ::OnewheelGoogle::search(query, config.custom_search_engine_id, config.google_api_key, config.safe_search, image = true)
22
27
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-images'
3
- spec.version = '0.3.0'
3
+ spec.version = '0.3.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 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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-13 00:00:00.000000000 Z
11
+ date: 2017-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.5.1
168
+ rubygems_version: 2.5.2
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: CSE Details to follow