jumpup-hipchat 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/jumpup-hipchat/integrate.rb +9 -1
- data/lib/jumpup-hipchat/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: 7b01aaf99bc100dcc76e15285ead16d396adac70
|
4
|
+
data.tar.gz: 407731d9904e39df120546ceaef0bc3a210ac13f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a1b95f7fd105eb55a903ccff0e19957fb210ffc3f5ba53b797473440474044724bd62cd32ded449cdd2788d80f3c9264f6f03453542b6f525dd343cc8b52ce6
|
7
|
+
data.tar.gz: a2a938a36eddb15072ac2deb44250c77624b774400707e0b6e6481e0b11e53ee0e300a97aa88ec580efb909cb6bfdbf7101326bf44092ef04426c1d155f1e9cb
|
data/CHANGELOG.md
CHANGED
@@ -35,11 +35,19 @@ module Jumpup
|
|
35
35
|
|
36
36
|
def send_message(msg)
|
37
37
|
begin
|
38
|
-
@client[@room].send(@git_user, msg, notify: true)
|
38
|
+
@client[@room].send(truncate_username(@git_user), msg, notify: true)
|
39
39
|
rescue => ex
|
40
40
|
puts "----> Unable to send message to HipChat room!\n ERROR: #{ex}"
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
# Inspired on https://github.com/rails/rails/blob/cada218f539265c6c44002833dc41b36be7738d3/activesupport/lib/active_support/core_ext/string/filters.rb#L51
|
45
|
+
def truncate_username(username, truncate_at = 15, omission = '...')
|
46
|
+
return username if username.length <= truncate_at
|
47
|
+
|
48
|
+
stop = truncate_at - omission.length
|
49
|
+
"#{username[0, stop]}#{omission}"
|
50
|
+
end
|
43
51
|
end
|
44
52
|
end
|
45
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jumpup-hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HE:labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|