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 +4 -4
- data/lib/lita/handlers/onewheel_images.rb +5 -0
- data/lita-onewheel-images.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05e3e89c291db0312453effd2384fd1c6869cc54
|
4
|
+
data.tar.gz: f597864365f5c348e499cfb0099f124df225e54c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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:
|
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.
|
168
|
+
rubygems_version: 2.5.2
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: CSE Details to follow
|