lita-idobata 0.0.2 → 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: 179f48a394b3477ab3dc612a47deeab35f8895c5
4
- data.tar.gz: acd48baf07de08786ab5b47478db8f183f4871f9
3
+ metadata.gz: 376307dc64431d85e96f0b57d7eb4f6617429e83
4
+ data.tar.gz: 2d8c1a0239af765f6bc6258f21dfd3dd77899ef7
5
5
  SHA512:
6
- metadata.gz: c9344d3b7a90e65fdde0e72a6fd39d388910e762d78f67cecc542faa5825c967f62e087c4e59ab4173f0aa8fe794d76522d7a3874063e3357803818b688b0ff5
7
- data.tar.gz: a30d1e0ee9ff3450675343a81cdc82018eb6255cf30d433fd8b1678009d56efd469519019476985b3f27ae90a58e57277060b6f0ee9c6f639a4abd24dbdb0d76
6
+ metadata.gz: 7d7ff1d87baa7e404d8a31cbbbf6635e55c8fdb78c3e082823a69193f2e0e5aed8828c92231cecf3c8f4d150f2cce269fb3eeb1f2c25b2c4559136fd5ba5bd8e
7
+ data.tar.gz: 420f2c7426e51a753d1ffbd74dd822ee09f3b2e071135726bfc82ae419881552b62624cf33a5827f39e0edf1f0182877befc0c3452bbf0047bcf2995216c303c
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  **lita-idobata** is an adapter for [Lita](https://github.com/jimmycuadra/lita) that allows you to use the robot with [Idobata](https://idobata.io).
4
4
 
5
+ **v0.1.x** for lita >= 4.0
6
+ **v0.0.x** for ltia >= 2.5
7
+
5
8
  ## Installation
6
9
 
7
10
  Add this line to your application's Gemfile:
@@ -23,7 +26,7 @@ Or install it yourself as:
23
26
 
24
27
  source "https://rubygems.org"
25
28
 
26
- gem 'lita', '~> 3.1.0'
29
+ gem 'lita', '~> 4.2.0'
27
30
  gem "lita-idobata"
28
31
  gem "pusher-client"
29
32
  ...
@@ -34,9 +37,9 @@ gem "pusher-client"
34
37
 
35
38
  Lita.configure do |config|
36
39
  config.robot.name = "your-bot-name"
37
- config.robot.log_level = :info
38
40
  config.robot.adapter = :idobata
39
- config.adapter.api_token = '123456abcd***'
41
+ config.adapters.idobata.api_token = '123456abcd***'
42
+ ...
40
43
  end
41
44
  ```
42
45
 
@@ -4,15 +4,18 @@ require 'lita/adapters/idobata/connector'
4
4
  module Lita
5
5
  module Adapters
6
6
  class Idobata < Adapter
7
- require_configs :api_token
7
+ config :api_token
8
+ config :pusher_key, default: '44ffe67af1c7035be764'
9
+ config :idobata_url, default: 'https://idobata.io'
10
+ config :debug, default: false
8
11
 
9
12
  def initialize(robot)
10
13
  super
11
14
  @connector = Connector.new(robot,
12
- api_token: config.api_token,
13
- pusher_key: pusher_key,
14
- idobata_url: idobata_url,
15
- debug: debug,
15
+ api_token: adapter_config.api_token,
16
+ pusher_key: adapter_config.pusher_key,
17
+ idobata_url: adapter_config.idobata_url,
18
+ debug: adapter_config.debug,
16
19
  )
17
20
  end
18
21
  attr_reader :connector
@@ -45,23 +48,10 @@ module Lita
45
48
 
46
49
  private
47
50
 
48
- def config
49
- Lita.config.adapter
50
- end
51
-
52
- def debug
53
- config.debug || false
54
- end
55
-
56
- def pusher_key
57
- config.pusher_key || '44ffe67af1c7035be764'
58
- end
59
-
60
- def idobata_url
61
- config.idobata_url || 'https://idobata.io'
51
+ def adapter_config
52
+ robot.config.adapters.idobata
62
53
  end
63
54
  end
64
-
65
55
  Lita.register_adapter(:idobata, Idobata)
66
56
  end
67
- end
57
+ end
@@ -1,5 +1,5 @@
1
1
  module Lita
2
2
  module Idobata
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lita-idobata.gemspec CHANGED
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency "lita", ">= 2.5"
22
+ spec.add_runtime_dependency "lita", ">= 4.0"
23
23
  spec.add_runtime_dependency 'faraday', '~> 0.9.0'
24
24
  spec.add_runtime_dependency 'pusher-client', '~> 0.6.0'
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.5"
26
+ spec.add_development_dependency "bundler"
27
27
  spec.add_development_dependency "rake"
28
- spec.add_development_dependency "rspec", ">= 3.0.0.beta2"
28
+ spec.add_development_dependency "rspec", ">= 3.1.0"
29
29
  spec.add_development_dependency "simplecov"
30
30
  spec.add_development_dependency "coveralls"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-idobata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2015-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.5'
19
+ version: '4.0'
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: '2.5'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.5'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.5'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 3.0.0.beta2
89
+ version: 3.1.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 3.0.0.beta2
96
+ version: 3.1.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -160,8 +160,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.2.2
163
+ rubygems_version: 2.4.5
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: A Idobata adapter for Lita.
167
167
  test_files: []
168
+ has_rdoc: