advantage_quickbase 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/quickbase.rb +16 -7
- metadata +2 -2
data/lib/quickbase.rb
CHANGED
@@ -90,13 +90,22 @@ module AdvantageQuickbase
|
|
90
90
|
return_json = []
|
91
91
|
result.css( 'record' ).each do |record|
|
92
92
|
json_record = {}
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
93
|
+
|
94
|
+
record.css( 'f' ).each do |field|
|
95
|
+
if options.has_key? :fmt
|
96
|
+
# File attachment fields shuold return a hash with keys :filename and :url
|
97
|
+
if !field.css("url").text.empty?
|
98
|
+
fieldname = Nokogiri::XML.parse(field.to_html.gsub(/<url.*?<\/url>/, "")).text
|
99
|
+
value = { filename: fieldname, url: field.css("url").text }
|
100
|
+
else
|
101
|
+
value = field.text
|
102
|
+
end
|
103
|
+
|
104
|
+
json_record[ field['id'] ] = value
|
105
|
+
else
|
106
|
+
record.element_children.each do |field|
|
107
|
+
json_record[ field.node_name ] = value
|
108
|
+
end
|
100
109
|
end
|
101
110
|
end
|
102
111
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advantage_quickbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|