cheetahmails 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cheetahmails.rb +6 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4482de1f6b194077ffa0c04adc1ae7c6df46d16f
4
- data.tar.gz: ec7ed6338e8c3d762aaea90ba9e902da674cac14
3
+ metadata.gz: 9ac87fd52f32e584182c5cf06c60c123e1ad3255
4
+ data.tar.gz: be0f0e27b5b5fd6ea1041e7dfc84416b239a9f19
5
5
  SHA512:
6
- metadata.gz: 1444c376da2dcd5855efbcca8fcf24eb729848a95ad1dc16c3d6277672e6b8425b2762a8552ecf6cd21f046993416a0bd915c1b6353a92b52581c1ee70791099
7
- data.tar.gz: 19e70f3681f5f3dcd650fe5d4c5990fbf5445d5fd03656e3d50afe7e3eabb5e1b17f6d56c29161ad218bbd76fcfcda12d116d1a1311a72da331616ba96ca5519
6
+ metadata.gz: f98c72f1a28ac4144d7a00412e028fdbdc20ecfc24dcc3c14c6116ad17841197f2db76ab99235266d0238992ca8fe6edced3e22c5c4d5e430222db06922f5b80
7
+ data.tar.gz: e45614047fbe3d415c98cf338c27782a42490078b915d487f0b9f6f9e748d945e5891263e089fd97f35390ffb92febd858aecc156a60d94c5f87bb8f04429aec
@@ -63,7 +63,7 @@ module Cheetahmails
63
63
  end
64
64
  end
65
65
 
66
- def self.find_list_member(email)
66
+ def self.find_list_member(email, prop='')
67
67
  tries ||= 2
68
68
 
69
69
  faraday = Faraday.new(:url => @base_uri) do |faraday|
@@ -78,7 +78,7 @@ module Cheetahmails
78
78
 
79
79
  params = {
80
80
  "viewName" => Cheetahmails.configuration.view_name,
81
- "prop" => '', #first_name,last_name
81
+ "prop" => prop, #first_name,last_name
82
82
  "columnName" => "email_address",
83
83
  "operation" => "=",
84
84
  "param" => email
@@ -89,13 +89,15 @@ module Cheetahmails
89
89
  begin
90
90
  jsonresponse = JSON.parse(response.body)
91
91
  rescue JSON::ParserError => error
92
- raise response.status.to_s + " " + response.body
92
+ raise response.statzus.to_s + " " + response.body
93
93
  end
94
94
 
95
95
  raise RetryException, jsonresponse["message"] if response.status == 401
96
96
 
97
+ return false if response.status == 404
98
+
97
99
  begin
98
- id = jsonresponse[0]["id"]
100
+ return jsonresponse[0]
99
101
  rescue => error
100
102
  return false
101
103
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheetahmails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Holder