ruboty-lingr 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a54d112ad983ca3b56b5444e62dd75a5ba66810
4
- data.tar.gz: 2bfb4d6978e0feb01883b141b5cda27ed1f047dc
3
+ metadata.gz: a5ece0807a625083b9e3baea16c909f318f6a4f7
4
+ data.tar.gz: 08ce7f8c9299fc384d5dc0a2893b3bc58bf698c4
5
5
  SHA512:
6
- metadata.gz: 3f5fe1989944e07878a88442dd3a5c3d1f3ad6bf51ccdc39351c26b3896aed9778a63a41e12254085b57629209cbaa404c4b3d3532bc722bbf5d4d74745368f1
7
- data.tar.gz: fb23a18bf867bb9c5eee55b6a5f163eac4faeb49480307847072c05a0077a2a17fbe3a4ae37ecc21e308bdde50f0a0b9394ddc1dbddc33d2870b173803ae9c2a
6
+ metadata.gz: 6e4f6bb0ca444c04c03d94d8dbfa21d8a3e2dffdd21c500b10c573ac222ea93d3a716c31ee7116db9893d52950c3c0988acd4bd86f57cccc301123dad2be863c
7
+ data.tar.gz: 429bb36d1dc4dc1c2362637169f3463cb359c563f98369c997f8165c68ac89832523307a19ddea5629065480b34d2bc7273363952f77c7f827d2aae140d03561
data/README.md CHANGED
@@ -25,6 +25,10 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/osyo-m
25
25
 
26
26
  ## Release note
27
27
 
28
+ #### 0.2.0
29
+
30
+ * Add `from`, `from_name`, `to` to `message`.
31
+
28
32
  #### 0.1.1
29
33
 
30
34
  * Fix dependency rubygems.
@@ -44,14 +44,15 @@ module Ruboty module Adapters
44
44
 
45
45
  def say msg
46
46
  Ruboty.logger.info "======= Lingr#say ======="
47
- room = msg[:original][:room]
47
+ Ruboty.logger.debug "msg : #{msg}"
48
+
48
49
  text = msg[:body]
49
- Ruboty.logger.info "room : #{room}"
50
- Ruboty.logger.info "text : #{text}"
50
+ to = msg[:to]
51
+ Ruboty.logger.info "body : #{text}"
52
+ Ruboty.logger.info "to : #{to}"
51
53
 
52
- Ruboty.logger.debug "msg : #{msg}"
53
54
 
54
- client.post(room, text)
55
+ client.post(to, text)
55
56
  end
56
57
 
57
58
  private
@@ -88,7 +89,13 @@ module Ruboty module Adapters
88
89
  Ruboty.logger.debug "message : #{msg}"
89
90
 
90
91
  Thread.start {
91
- robot.receive(body: msg["text"], room: msg["room"], message: msg)
92
+ robot.receive(
93
+ body: msg["text"],
94
+ from: msg["room"],
95
+ from_name: msg["speaker_id"],
96
+ to: msg["room"],
97
+ message: msg
98
+ )
92
99
  }
93
100
  end
94
101
 
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Lingr
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-lingr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - manga_osyo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack