zendesk 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,12 +34,11 @@ module Zendesk::Properties
34
34
 
35
35
  def datetimes(*vars)
36
36
  protected_attributes *vars
37
-
38
37
  vars.each do |mn|
39
38
  method_name = mn.to_s
40
39
  class_eval <<-END
41
40
  def #{method_name}
42
- DateTime.parse @#{method_name}
41
+ @#{method_name}
43
42
  end
44
43
  END
45
44
  end
@@ -80,6 +79,8 @@ module Zendesk::Properties
80
79
  self.class._protected_attributes
81
80
  end
82
81
 
82
+ protected
83
+
83
84
  def load_attributes(attrs = {})
84
85
  attributes.each do |attr|
85
86
  if val = (attrs[attr.to_s] || attrs[attr.to_sym])
@@ -32,7 +32,9 @@ class Zendesk::Ticket < Zendesk::Resource
32
32
  def load_comments(data)
33
33
  @comments = []
34
34
  data[:comments].each do |comment|
35
- @comments << Zendesk::Comment.new(comment[:comment])
35
+ z_comment = Zendesk::Comment.new(comment[:comment])
36
+ z_comment.load_protected_attributes(comment[:comment])
37
+ @comments << z_comment
36
38
  end
37
39
  end
38
40
 
@@ -1,3 +1,3 @@
1
1
  module Zendesk
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrey Deryabin