lita-onewheel-images 0.0.0 → 0.1.0

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: d732b7ef3e5263069b437651ca654bddded6c692
4
- data.tar.gz: 077fbc9c78fe606be6ac1a5efbaa69722ba2868e
3
+ metadata.gz: 6afbc04c3603b0d8449b40d0aaac0004ca67e53e
4
+ data.tar.gz: 971f5a4af0d7bc204d11c2826273e781a6c09924
5
5
  SHA512:
6
- metadata.gz: ea6114f87c37af1c1411dc9f024054f4b4cd1bfb6262fff6c6a43a32e674600d0d67ca3dcf963f88459d535242c29527bcf1abf923dd3ac69f1ae77a843786de
7
- data.tar.gz: e81c0cdb6dad59b1c8ff1995093f0e8e8757fad0c96a79d7313b309dcc43fcca3baabd88aea70c29bf85065cf3d6627a36e3392b7b5a12927b3d1f04f4fb0c56
6
+ metadata.gz: 279894f5c2a76b9455e41e50339e28747831d282d51c08d7edb65856b133496d4b7af1b720f3c974ef2c29e0d394e2d748a4d50e3c33bdcb53a4e25225dc7010
7
+ data.tar.gz: a640a36526a59eb04ef3cb6de94027b9970cf15ef862f44139b5921ede602d3101162505170ab6c409be0a6deeb68d82ac35e836d24c0cdd9cb66f2827aa9a4f
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.4
4
+ - 2.3.0
4
5
  script: bundle exec rake
5
6
  before_install:
6
7
  - gem update --system
data/README.rst CHANGED
@@ -17,7 +17,11 @@ gem "lita-onewheel-images"
17
17
  Configuration
18
18
  -------------
19
19
 
20
- TODO: Describe any configuration attributes the plugin exposes.
20
+ Lita.configure do |config|
21
+ config.handlers.onewheel_images.custom_search_engine_id = '016450909327860943906:3a3e35xbkzu'
22
+ config.handlers.onewheel_images.google_api_key = 'AIzaSyAlTbxqcZOlb3M-QXR4PCYpS2U1rfgwSlU'
23
+ config.handlers.onewheel_images.safe_search = 'medium' # This is the default setting. Use 'off' at your own risk.
24
+ end
21
25
 
22
26
  Usage
23
27
  -----
@@ -7,6 +7,7 @@ module Lita
7
7
  class OnewheelImages < Handler
8
8
  config :custom_search_engine_id
9
9
  config :google_api_key
10
+ config :safe_search, required: false, default: 'medium'
10
11
 
11
12
  route /^image\s+(.*)$/, :image, command: true
12
13
 
@@ -25,7 +26,8 @@ module Lita
25
26
  cx: config.custom_search_engine_id,
26
27
  searchType: 'image',
27
28
  num: 10,
28
- key: config.google_api_key}
29
+ key: config.google_api_key,
30
+ safe: config.safe_search}
29
31
  Lita.logger.debug uri.query
30
32
  response = HTTParty.get "https://www.googleapis.com/customsearch/v1?#{uri.query}"
31
33
  JSON.parse response.body
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-images'
3
- spec.version = '0.0.0'
3
+ spec.version = '0.1.0'
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.'
@@ -14,8 +14,8 @@ Gem::Specification.new do |spec|
14
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.add_runtime_dependency 'lita', '~> 4.6'
18
- spec.add_runtime_dependency 'httparty', '~> 0.13'
17
+ spec.add_runtime_dependency 'lita', '~> 4'
18
+ spec.add_runtime_dependency 'httparty', '~> 0'
19
19
  spec.add_runtime_dependency 'addressable', '~> 2.4'
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
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.0.0
4
+ version: 0.1.0
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-01-14 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.6'
19
+ version: '4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.6'
26
+ version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.13'
33
+ version: '0'
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.13'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: addressable
43
43
  requirement: !ruby/object:Gem::Requirement