lita-irkit 0.0.2 → 0.0.3

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: d8fd505367b9e0c72152dde9c7153fb18675c236
4
- data.tar.gz: f2e2a3ce84fbb32234973f766481964d856219d0
3
+ metadata.gz: 3f221d9078fe102b8e77ebb58ca47ed42fb2aee9
4
+ data.tar.gz: 4d5923c767676e4736119861c8a3227f1069899a
5
5
  SHA512:
6
- metadata.gz: 5ba81d73d002f2d2043dcc39e83a4335703620b88350d41991fd045b5ed42d2bcb5504c9b05204c9e574a34203e77cf77bb7f1a50f44900f425c6a62a6244e4b
7
- data.tar.gz: df040079f3895ab7136066216ee91b6ec86bce6202cdd5392a8238f4d565d7f3ca78966cf0e4ba4f55a871ee5e7de02669d67c143c0257cc63d8915e9dddac70
6
+ metadata.gz: ee249aa826dacdaa9dc626278f682fd4f3fffcc3ee10ed23fe17db91e8bc1568febbb6fdc3b4e1a2ee5736994befe9cfb10caa97b4562dca0d4eb34ae20ecbb3
7
+ data.tar.gz: cd0d118f709621db1d31ec90143f81962d9b920999ff9da1e378d16f7617f9c50379efe56f37b0b615a1b15a73ba6d14db8cb89f15a6ff697000bf78f25d06b5
@@ -9,16 +9,16 @@ module Lita
9
9
  handler_config.clientkey = ENV['IRKIT_CLIENTKEY']
10
10
  end
11
11
 
12
- route /^ir list/, :ir_list, command: true, help: { "ir list" => "list irkit command names" }
13
- route /^ir save (.+)/, :ir_save, command: true, help: { "ir save [command_name]" => "save irkit command as name" }
14
- route /^ir send (.+)/, :ir_send, command: true, help: { "ir send [command_name]" => "send irkit command" }
15
- route /^ir remove (.+)/, :ir_remove, command: true, help: { "ir remove [command_name]" => "remove irkit command" }
12
+ route /^ir list/, :ir_list, command: false, help: { "ir list" => "list irkit command names" }
13
+ route /^ir send (.+)/, :ir_send, command: false, help: { "ir send [command_name]" => "send irkit command" }
14
+ route /^ir register (.+)/, :ir_register, command: true, help: { "ir register [command_name]" => "register irkit command" }
15
+ route /^ir unregister (.+)/, :ir_unregister, command: true, help: { "ir unregister [command_name]" => "unregister irkit command" }
16
16
 
17
17
  def ir_list(response)
18
18
  response.reply Lita.redis.keys('irkit:messages:*').map{|key| key.gsub(/^irkit:messages:/, '')}.join(', ')
19
19
  end
20
20
 
21
- def ir_save(response)
21
+ def ir_register(response)
22
22
  cmd = response.matches[0][0]
23
23
  ir_data = irkit_api.get('/1/messages', clientkey: config.clientkey).body
24
24
  return response.reply "ir data not found" if ir_data.length == 0
@@ -36,7 +36,7 @@ module Lita
36
36
  response.reply "ir data send: #{cmd}"
37
37
  end
38
38
 
39
- def ir_remove(response)
39
+ def ir_unregister(response)
40
40
  cmd = response.matches[0][0]
41
41
  Lita.redis.del "irkit:messages:#{cmd}"
42
42
  response.reply "ir data deleted: #{cmd}"
data/lita-irkit.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-irkit"
3
- spec.version = "0.0.2"
3
+ spec.version = "0.0.3"
4
4
  spec.authors = ["fukayatsu"]
5
5
  spec.email = ["fukayatsu@gmail.com"]
6
6
  spec.description = %q{Use IRKit on Lita}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-irkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu