ruboty-slack 0.1.5 → 0.1.6

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: 8f697eec9036c85dc2844ca97fb1aeb5227cfe7d
4
- data.tar.gz: f62b073c4de1c3e8d98ee62fdfa338e8188a1b72
3
+ metadata.gz: 3b3780c017deb6d1f7fe42425e7f97175917174f
4
+ data.tar.gz: 437188b051d0769f95f3cbc5a79b051771e5335f
5
5
  SHA512:
6
- metadata.gz: 988475e6738271818b5675ba16482a3100fd46e0e503dccdea4375c83c800379a2902ceca7d135eb60ceb80fe6cc1d4031e76ef1f72d8048016c6fb55cf1d8eb
7
- data.tar.gz: 4c567152bdfe90ff9433a93bef1e90155894fd29edebfd33b084a2d96ed8045f77e07a49bde205f50bbc4030d2da4189eea622403411ad6c90c7d773e41498f9
6
+ metadata.gz: d9a42dc99c0397474614ab7646e209d2c02b2ff0a7043eb1ae372ef2b6ad1ab062f2dc13584ce65bd994378de30e156f8660c52eb4bf5cbf3d7a30fae8b0174f
7
+ data.tar.gz: b7b1afeaa9837b68bdaa9cfde278fcc6d6821d3b7b967d14225bece31dce9227cf51af7615390cbd01f6f54943d409fee4f55051f3a0a4e5f388ed425661f4c4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.6
2
+ * Support multi rooms
3
+
1
4
  ## 0.1.5
2
5
  * Ignore delayed messages when ruboty was logging out
3
6
 
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem "ruboty-slack"
12
12
  ## ENV
13
13
  ```
14
14
  SLACK_PASSWORD - Account's XMPP password
15
- SLACK_ROOM - Room name to join in at first (e.g. general)
15
+ SLACK_ROOM - Room name to join in at first (e.g. general,random)
16
16
  SLACK_TEAM - Account's team name (e.g. wonderland)
17
17
  SLACK_USERNAME - Account's username (e.g. alice)
18
18
  ```
@@ -29,7 +29,7 @@ module Ruboty
29
29
  jid: jid,
30
30
  nickname: username,
31
31
  password: password,
32
- room_jid: room_jid,
32
+ room_jid: room_jids.join(","),
33
33
  )
34
34
  end
35
35
 
@@ -37,8 +37,10 @@ module Ruboty
37
37
  "#{username}@#{host}"
38
38
  end
39
39
 
40
- def room_jid
41
- "#{room}@#{room_host}"
40
+ def room_jids
41
+ rooms.map do |room|
42
+ "#{room}@#{room_host}"
43
+ end
42
44
  end
43
45
 
44
46
  def host
@@ -49,8 +51,8 @@ module Ruboty
49
51
  "conference.#{host}"
50
52
  end
51
53
 
52
- def room
53
- ENV["SLACK_ROOM"]
54
+ def rooms
55
+ ENV["SLACK_ROOM"].split(",")
54
56
  end
55
57
 
56
58
  def username
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Slack
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-07 00:00:00.000000000 Z
11
+ date: 2014-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruboty