contacts_client 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  class ContactAttribute < LogicalModel
2
2
 
3
- AVAILABLE_TYPES = %w(telephone email identification address date_attribute custom_attribute estimated_age)
3
+ AVAILABLE_TYPES = %w(telephone email identification address date_attribute custom_attribute)
4
4
 
5
5
  attr_accessor :public, :primary
6
6
 
@@ -10,6 +10,7 @@ class PadmaContact < LogicalModel
10
10
  :_id,
11
11
  :first_name, :last_name,
12
12
  :gender,
13
+ :estimated_age,
13
14
  :avatar,
14
15
  :status,
15
16
  :local_status, # will only be setted if #find specifies account_name
@@ -37,6 +38,7 @@ class PadmaContact < LogicalModel
37
38
 
38
39
  validates_presence_of :first_name
39
40
  validates_inclusion_of :gender, in: %W(male female), allow_blank: true
41
+ validates_numericality_of :estimated_age, allow_nil: true
40
42
 
41
43
  validates_associated :contact_attributes
42
44
  validates_associated :attachments
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dwayne Macgowan
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-01-28 00:00:00 -03:00
17
+ date: 2013-01-29 00:00:00 -03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -67,7 +67,6 @@ files:
67
67
  - app/models/contacts_merge.rb
68
68
  - app/models/attachment.rb
69
69
  - app/models/contact_attribute.rb
70
- - app/models/estimated_age.rb
71
70
  - app/models/avatar.rb
72
71
  - lib/contacts_client.rb
73
72
  - lib/contacts/shared_examples.rb
@@ -1,17 +0,0 @@
1
- class EstimatedAge < ContactAttribute
2
- self.attribute_keys = [:_id, :_type, :public, :primary, :value, :contact_id]
3
- self.hydra = Contacts::HYDRA
4
- self.resource_path = "/v0/contact_attributes"
5
- self.use_api_key = true
6
- self.api_key_name = "app_key"
7
- self.api_key = Contacts::API_KEY
8
- self.host = Contacts::HOST
9
-
10
- attr_accessor :value, :public, :primary
11
-
12
- def _type
13
- self.class.name
14
- end
15
-
16
- validates_numericality_of :value
17
- end