slackup 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/slackup/version.rb +1 -1
- data/lib/slackup.rb +5 -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: 6f1c23098a77f4dcd22d91db7e1093559e0bfe80
|
4
|
+
data.tar.gz: fbdf07fd8126c3fff96092494217603a2c68f0e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57557649da5b389b035bd3acd4d21d8ef5f52aa42032fc83eb878d19c02c636b8606a1e8db0fbd561629f54be849e90213e8cae06de36455d6ba98777286fbdb
|
7
|
+
data.tar.gz: f643590f2a48240ed0d7e0f981e55f4b231201c16023a5d2926b7a647149a76495f76be14c8069d180dda74ece207d4eb9bb87db8d852c6043e6ebf69a3a4029
|
data/Gemfile.lock
CHANGED
data/lib/slackup/version.rb
CHANGED
data/lib/slackup.rb
CHANGED
@@ -158,7 +158,7 @@ class Slackup
|
|
158
158
|
# "type": "message",
|
159
159
|
# "ts": "1358546515.000008",
|
160
160
|
# "user": "U2147483896",
|
161
|
-
# "text": "
|
161
|
+
# "text": "<@U0453RHGQ> has some thoughts on that kind of stuff"
|
162
162
|
# },
|
163
163
|
# ]
|
164
164
|
# "has_more": false
|
@@ -178,6 +178,10 @@ class Slackup
|
|
178
178
|
messages.reverse.map { |msg|
|
179
179
|
if msg.has_key?("text") && msg.has_key?("user")
|
180
180
|
msg["user"] = user_name(msg["user"])
|
181
|
+
msg["text"].gsub!(/<@(?<userid>U[A-Z0-9]+)>/) {
|
182
|
+
userid = $~[:userid] # MatchData
|
183
|
+
"<@#{user_name(userid)}>"
|
184
|
+
}
|
181
185
|
msg
|
182
186
|
else
|
183
187
|
nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slackup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Fleischer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slack-api
|