lita-slack 1.7.1 → 1.7.2

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: 680aa1ce2ff510edb1eb9ec93d32226d3a3baac0
4
- data.tar.gz: 71931fedbc7d245b65c1c0ba59d520f382b94fe4
3
+ metadata.gz: b66cc314ceaee4c634dd501c8a7913548f8c437b
4
+ data.tar.gz: 25e02797ea080058b6b149a6000f1aaa5366c840
5
5
  SHA512:
6
- metadata.gz: d16b1e01202a413d9c5b738a969cc7fe4250a55c57210a274cd4a57813a96709a827f039720606eb366907add758bc262ce3c2096f843f87c72e6601e48ccbd4
7
- data.tar.gz: cb4446da0ea80f6dcd848861411d99703c7810e765ce8ff6511be0272fd596162671936145bdfb09b7fde711ab75989e13eb4b2b53e7b84b803bac7d3a039898
6
+ metadata.gz: 96be42cc5971af17763d58f6a9ed7d48b47a7fcd5b766a5f0801c35445de9d4e00f988d5b7adb244745728541456f31ad1e4936c8a9c8a63e2484adb644e70d3
7
+ data.tar.gz: 3962f0e8955b7eb199e7c6017c560baaabcb87119262b95f79f1efc70d79c8bdde4eb9b25d2ea3e906e356359a7a427456a0efb3e474e6070c7294085835439b
@@ -5,6 +5,7 @@ rvm:
5
5
  script: bundle exec rake
6
6
  before_install:
7
7
  - gem update --system
8
+ - gem update bundler
8
9
  services:
9
10
  - redis-server
10
11
  branches:
@@ -5,13 +5,10 @@ module Lita
5
5
  class UserCreator
6
6
  class << self
7
7
  def create_user(slack_user, robot, robot_id)
8
- profile = slack_user.metadata['profile'] || {}
9
8
  User.create(
10
9
  slack_user.id,
11
- profile.merge(
12
- name: real_name(slack_user),
13
- mention_name: slack_user.name,
14
- ),
10
+ name: real_name(slack_user),
11
+ mention_name: slack_user.name
15
12
  )
16
13
 
17
14
  update_robot(robot, slack_user) if slack_user.id == robot_id
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-slack"
3
- spec.version = "1.7.1"
3
+ spec.version = "1.7.2"
4
4
  spec.authors = ["Ken J.", "Jimmy Cuadra"]
5
5
  spec.email = ["kenjij@gmail.com", "jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{Lita adapter for Slack.}
@@ -16,14 +16,13 @@ describe Lita::Adapters::Slack::UserCreator do
16
16
  let(:email) { 'bobby@example.com' }
17
17
  let(:bobby) { Lita::Adapters::Slack::SlackUser.new('U023BECGF', 'bobby', real_name, slack_data) }
18
18
  let(:robot_id) { 'U12345678' }
19
- let(:slack_data) { { 'id' => 'U023BECGF', 'name' => 'bobby', 'real_name' => real_name, 'profile' => { 'email' => email } } }
19
+ let(:slack_data) { { 'id' => 'U023BECGF', 'name' => 'bobby', 'real_name' => real_name, 'email' => email } }
20
20
 
21
21
  it "creates Lita users for each user in the provided data" do
22
22
  expect(Lita::User).to receive(:create).with(
23
23
  'U023BECGF',
24
24
  name: 'Bobby Tables',
25
- mention_name: 'bobby',
26
- 'email' => email,
25
+ mention_name: 'bobby'
27
26
  )
28
27
  expect(robot).to receive(:trigger).with(
29
28
  :slack_user_created,
@@ -40,8 +39,7 @@ describe Lita::Adapters::Slack::UserCreator do
40
39
  expect(Lita::User).to receive(:create).with(
41
40
  'U023BECGF',
42
41
  name: 'bobby',
43
- mention_name: 'bobby',
44
- 'email' => email,
42
+ mention_name: 'bobby'
45
43
  )
46
44
 
47
45
  described_class.create_users([bobby], robot, robot_id)
@@ -51,7 +49,7 @@ describe Lita::Adapters::Slack::UserCreator do
51
49
 
52
50
  describe ".create_user" do
53
51
  let(:robot_id) { 'U12345678' }
54
- let(:slack_data) { { 'id' => robot_id, 'name' => 'litabot', 'real_name' => 'Lita Bot', 'profile' => { 'email' => 'litabot@example.com' } } }
52
+ let(:slack_data) { { 'id' => robot_id, 'name' => 'litabot', 'real_name' => 'Lita Bot', 'email' => 'litabot@example.com' } }
55
53
  let(:slack_user) { Lita::Adapters::Slack::SlackUser.new(robot_id, 'litabot', 'Lita Bot', slack_data) }
56
54
 
57
55
  it "updates the robot's name and mention name if it applicable" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken J.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-31 00:00:00.000000000 Z
12
+ date: 2015-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine