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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f745677b996aa58ce87bbef04912062137761c4c
4
- data.tar.gz: d47be041e90ea6b7ab6cbf5c4bd9d37b90e20a4b
3
+ metadata.gz: e77e4f6935ead118d2908d44a69515dee524b9eb
4
+ data.tar.gz: 13dd9ad73465c2069b9922bc62e26718161ff949
5
5
  SHA512:
6
- metadata.gz: 768c61c17ea732556f46f03d925f30fb9b864266eaec513413d4b2f1ee05a846b0b17cdd361f2a28609b6cfa202b8f4dfd6bba996adf53edbd9e4ff6a676914d
7
- data.tar.gz: 9da0243f42e83f82c2ac03ef674d2e44f68424ed2d110fb187a7a7c03996968339839dd5ecfa7fb479f8dab54a4638fd11fd93fd61355a4a86e670d1b634b00a
6
+ metadata.gz: 02b0a753a08207047d8413ca2335c3845735e3db8d93367ff52daf45a71d4ea1293915c49699cd32416fe90a3d3adb1abfe6763e8d31e75563ff719329c12861
7
+ data.tar.gz: f6d6b31b9231c8ae69a55ce6e87775460dacde77741e6b622b099f132298c98b956a00737702b32e3886f76b88063c3423273a2442075ceb2a715b5e0a6690fb
@@ -8,5 +8,5 @@ require 'build_buddy/server'
8
8
  require 'build_buddy/build_data'
9
9
 
10
10
  module BuildBuddy
11
- VERSION = "1.4.2"
11
+ VERSION = "1.4.5"
12
12
  end
@@ -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| [user['id'], user['name']]}.to_h
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
- channel_map = @rt_client.channels.map {|channel| [channel['name'], channel['id']]}.to_h
38
- group_map = @rt_client.groups.map {|group| [group['name'], group['id']]}.to_h
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 ? channel_map[channel[1..-1]] : group_map[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| [user['id'], user['name']]}.to_h
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.2
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-09 00:00:00.000000000 Z
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.5'
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.5'
82
+ version: '0.6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: json
85
85
  requirement: !ruby/object:Gem::Requirement