build-buddy 1.4.2 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/build_buddy.rb +1 -1
- data/lib/build_buddy/slacker.rb +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e77e4f6935ead118d2908d44a69515dee524b9eb
|
4
|
+
data.tar.gz: 13dd9ad73465c2069b9922bc62e26718161ff949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02b0a753a08207047d8413ca2335c3845735e3db8d93367ff52daf45a71d4ea1293915c49699cd32416fe90a3d3adb1abfe6763e8d31e75563ff719329c12861
|
7
|
+
data.tar.gz: f6d6b31b9231c8ae69a55ce6e87775460dacde77741e6b622b099f132298c98b956a00737702b32e3886f76b88063c3423273a2442075ceb2a715b5e0a6690fb
|
data/lib/build_buddy.rb
CHANGED
data/lib/build_buddy/slacker.rb
CHANGED
@@ -31,15 +31,15 @@ module BuildBuddy
|
|
31
31
|
|
32
32
|
def on_slack_hello
|
33
33
|
user_id = @rt_client.self['id']
|
34
|
-
map_user_id_to_name = @rt_client.users.map {|user| [
|
34
|
+
map_user_id_to_name = @rt_client.users.map {|id, user| [id, user.name]}.to_h
|
35
35
|
info "Connected to Slack as user id #{user_id} (@#{map_user_id_to_name[user_id]})"
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
map_channel_name_to_id = @rt_client.channels.map {|id, channel| [channel.name, id]}.to_h
|
38
|
+
map_group_name_to_id = @rt_client.groups.map {|id, group| [group.name, id]}.to_h
|
39
39
|
channel = Config.slack_build_channel
|
40
40
|
is_channel = (channel[0] == '#')
|
41
41
|
|
42
|
-
@notify_slack_channel = (is_channel ?
|
42
|
+
@notify_slack_channel = (is_channel ? map_channel_name_to_id[channel[1..-1]] : map_group_name_to_id[channel])
|
43
43
|
if @notify_slack_channel.nil?
|
44
44
|
error "Unable to identify the slack channel #{channel}"
|
45
45
|
else
|
@@ -64,7 +64,7 @@ module BuildBuddy
|
|
64
64
|
end
|
65
65
|
sending_user_name = data['username']
|
66
66
|
else
|
67
|
-
map_user_id_to_name = @rt_client.users.map {|user| [
|
67
|
+
map_user_id_to_name = @rt_client.users.map {|id, user| [id, user.name]}.to_h
|
68
68
|
sending_user_name = map_user_id_to_name[sending_user_id]
|
69
69
|
|
70
70
|
if sending_user_name.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Lyon-smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: timers
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.6'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: json
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|