vworkapp_ruby 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@
7
7
  # && (v.is_a?(Array) || v.is_a?(Hash))
8
8
  module MultiXml
9
9
 
10
- def MultiXml.typecast_xml_value(value)
10
+ def MultiXml.typecast_xml_value(value, disallowed_types=nil)
11
11
  case value
12
12
  when Hash
13
13
  if value['type'] == 'array'
@@ -62,4 +62,4 @@ module MultiXml
62
62
  end
63
63
  end
64
64
 
65
- end
65
+ end
@@ -1,11 +1,33 @@
1
1
  module VWorkApp
2
+ class CustomFieldMobile < Base
3
+ hattr_accessor :type
4
+
5
+ def ==(other)
6
+ attributes_eql?(other, :type)
7
+ end
8
+ end
9
+
2
10
  class CustomField < Base
3
- hattr_accessor :name, :value
11
+ hattr_accessor :name, :value, {:mobile => CustomFieldMobile}
4
12
  self.include_root_in_json = false
5
-
13
+
14
+ def initialize(attributes = {})
15
+ mobile_type = attributes.delete(:type)
16
+ super
17
+ self.mobile ||= VWorkApp::CustomFieldMobile.new(type: mobile_type)
18
+ end
19
+
6
20
  def ==(other)
7
- attributes_eql?(other, :name, :value)
21
+ attributes_eql?(other, :name, :value, :mobile)
22
+ end
23
+
24
+ def type
25
+ self.mobile.type
26
+ end
27
+
28
+ def type=(val)
29
+ self.mobile.type = val
8
30
  end
9
31
 
10
32
  end
11
- end
33
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "vworkapp_ruby"
3
- s.version = "0.8"
3
+ s.version = "0.9"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["vWorkApp Inc.", "Jonathan Hoskin"]
6
6
  s.email = ["info@vworkapp.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vworkapp_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.8'
4
+ version: '0.9'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-09 00:00:00.000000000 Z
13
+ date: 2013-01-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: 1.3.6
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 1.8.23
139
+ rubygems_version: 1.8.24
140
140
  signing_key:
141
141
  specification_version: 3
142
142
  summary: A ruby wrapper for vWorkApp's API