synrp 0.16.8 → 0.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synrp (0.16.7)
4
+ synrp (0.16.8)
5
5
  cri (~> 2.2)
6
6
  highline
7
7
  json
@@ -68,10 +68,17 @@ class SynRP
68
68
  end
69
69
 
70
70
  def find_person_id_by_displayname(person_name)
71
- person = get_persons.find { |p|
71
+ person = get_persons.find do |p|
72
72
  # replace weird whitespace with new one before comparing
73
73
  p["displayName"].gsub(/\302\240/, ' ').match(person_name)
74
- }
74
+ end
75
+
76
+ unless person
77
+ person = get_persons.find do |p|
78
+ p["lastName"].gsub(/\302\240/, ' ').match(/#{person_name}/i)
79
+ end
80
+ end
81
+
75
82
  person_id = person ? person["id"] : nil
76
83
  end
77
84
 
@@ -1,3 +1,3 @@
1
1
  module Synrp
2
- VERSION = "0.16.8"
2
+ VERSION = "0.16.9"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synrp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 79
4
+ hash: 77
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 16
9
- - 8
10
- version: 0.16.8
9
+ - 9
10
+ version: 0.16.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fabian Buch
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-25 00:00:00 Z
18
+ date: 2012-04-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: cri