advisors_command_client 1.1.1 → 1.1.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: d12755cea37bd7302fc03735b0cc7da5b77f281d
4
- data.tar.gz: ebbb3346fe09d211b1ba993f4b618c3ac624a68c
3
+ metadata.gz: c5aeebf86a4c6f6bae609aa928dc58edb8376dee
4
+ data.tar.gz: b3e58ad73336dd6295e7f3d96db8a80062a2e69e
5
5
  SHA512:
6
- metadata.gz: 3ad06fc9d79ccb6228345447dddc30dd0da9d7c0e0f8c76a9b406cc345f5faf491fc4bafcdeb239421aa94f54ddbe448222b0e52f55ac661521efd00e4822ab1
7
- data.tar.gz: 0406aca0f9a89e8a8a949298e673ad1d766c50abd41e8a3dd51f1b0a514160667761f0c41958732e5a65b486ca4e1a292c91703fd12d2a0e6a8a91ba7af271d9
6
+ metadata.gz: fb01f93fb130bb3cfd00d3c1fcd6551b9196fe80342968a8a739864708f0112541db6e5071e2fbfb1e0945b5dbd149261f76e1673dd0ae578f9a9f13ebecf95d
7
+ data.tar.gz: 78c5472141980d94d788769e0d90b9ea1783ca79add4739d0acbc4230ee09b7d2e58697b7fd71bd4da2fb13b5bd6fe7b556512fe1954e0ece771176192fdcbf2
@@ -8,8 +8,13 @@ module AdvisorsCommandClient
8
8
  def search(query)
9
9
  response = @connection.get('search', {search: query, from: 'orocrm_contact'})
10
10
  if response.success?
11
- return Parallel.map(Array(response.body['data']), in_threads: 4) do |obj|
12
- self.find(obj['record_id'].to_i)
11
+ return Array(response.body['data']).map do |obj|
12
+ begin
13
+ self.find(obj['record_id'].to_i)
14
+ rescue Faraday::Error::ParsingError
15
+ puts "Error parsing response for contact ID: #{obj['record_id']}"
16
+ next nil
17
+ end
13
18
  end.compact
14
19
  else
15
20
  raise ::AdvisorsCommandClient::SearchError, "Error connecting to advisors command."
@@ -1,3 +1,3 @@
1
1
  module AdvisorsCommandClient
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advisors_command_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Ostrowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler