chatwork_to 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chatwork_to/message_decorator.rb +9 -5
- data/lib/chatwork_to/notifiers/slack.rb +1 -0
- data/lib/chatwork_to/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d38910f9943caf2d51be8855f49fc3e7f8ff0b81
|
4
|
+
data.tar.gz: 83c6c4c4fbf9eaf2321226beda3a3ec27a041f3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2300345d193d3cfc6e719548d24cdf400c50e039935f5630ff737a37c65ea0eefbc886f75728dce996aae47010aaeb75cb281c5c18e912c84bef7a32f494418
|
7
|
+
data.tar.gz: 57cdad5058889adb29c6f4fdf62123749dda5440313b9234ebb8db739b6be1bd5f34e07791fea19b56b8a2b434c2db471d97a045286cb82d4a451f2609d36220
|
@@ -2,27 +2,31 @@ module ChatworkTo
|
|
2
2
|
module MessageDecorator
|
3
3
|
refine String do
|
4
4
|
def gsub_quote!
|
5
|
-
gsub!(/\[qt\]\[qtmeta.*\](.+)\[\/qt\]/) { "> #{$1.gsub(/\n/, '\n> ')}" } || self
|
5
|
+
gsub!(/\[qt\]\[qtmeta.*\](.+)\[\/qt\]/m) { "> #{$1.gsub(/\n/, '\n> ')}" } || self
|
6
6
|
end
|
7
7
|
|
8
8
|
def gsub_reply!
|
9
|
-
gsub!(/\[rp aid=(.+) to=.+\]/) { "[Re:#{$1}]" } || self
|
9
|
+
gsub!(/\[rp aid=(.+) to=.+\]/m) { "[Re:#{$1}]" } || self
|
10
10
|
end
|
11
11
|
|
12
12
|
def gsub_task_added!
|
13
|
-
gsub!(/\[info\]\[title\]\[dtext:task_added\].+\[\/info\]
|
13
|
+
gsub!(/\[info\]\[title\]\[dtext:task_added\].+\[\/info\]/m, 'Added task') || self
|
14
14
|
end
|
15
15
|
|
16
16
|
def gsub_task_done!
|
17
|
-
gsub!(/\[info\]\[title\]\[dtext:task_done\].+\[\/info\]
|
17
|
+
gsub!(/\[info\]\[title\]\[dtext:task_done\].+\[\/info\]/m, 'Done task') || self
|
18
18
|
end
|
19
19
|
|
20
20
|
def gsub_file_uploaded!
|
21
|
-
gsub!(/\[info\].*\[download:(.+)\](.+)\[\/download\]\[\/info\]/) do
|
21
|
+
gsub!(/\[info\].*\[download:(.+)\](.+)\[\/download\]\[\/info\]/m) do
|
22
22
|
"#{$2}\nhttps://www.chatwork.com/gateway.php?cmd=download_file&bin=1&file_id=#{$1}"
|
23
23
|
end || self
|
24
24
|
end
|
25
25
|
|
26
|
+
def gsub_chatroom_edited!
|
27
|
+
gsub!(/\[info\]\[title\]\[dtext:chatroom_chat_edited\].+\[\/info\]/m, 'Edited chatroom') || self
|
28
|
+
end
|
29
|
+
|
26
30
|
def room_url
|
27
31
|
"https://www.chatwork.com/#!rid#{self}"
|
28
32
|
end
|
data/lib/chatwork_to/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatwork_to
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nalabjp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|