advantage_quickbase 0.8.2 → 0.8.3

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 +15 -0
  2. data/lib/quickbase.rb +13 -8
  3. metadata +6 -10
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzE3ZjMzYjA0ZTU1ZWY3OTgwY2M5NzcyY2ZlZTVkN2EwYzkxODU4Mg==
5
+ data.tar.gz: !binary |-
6
+ NDI2MjBmODgxMjQyZGQyNGQzY2U3OGE2Yzc4NzBmZTc0NTU2ODEzZg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ N2QyMGFmZjkzZDVhN2YwMjJiYmY4ZTk3ZDE2MTEyYzRjMTczNmMxYmFhMGIx
10
+ ODkxN2U0ZjczMDRjMjcxNTE1YWVlMzdjMWYwNDJjZjAxZWE3ZmY1Y2RmYjlh
11
+ MDZmMTM5MjQ0MzIyYzM0MGM3YTJhYmM1ZjkwN2NlNDdkMDNhY2U=
12
+ data.tar.gz: !binary |-
13
+ OGY3YWQ4ZDRlNGZmOWIyOTI0YTMwZjMxNDQ2MTg1ZjkzMGQ4ZTM5ZjE5OThh
14
+ MDdhMTA4YWRjYmE2ZDk3NGE3ZmEyYjA0NTY0NGYxYzM2ZjM4MmFiZmFkZWU4
15
+ NzdlNjkxMTBkMjc1YjZmN2Q0ZWEwN2ZhODUyOTM1MTQzZjhjOTE=
data/lib/quickbase.rb CHANGED
@@ -109,13 +109,13 @@ module AdvantageQuickbase
109
109
  xml = build_update_xml( new_values, record_id )
110
110
  result = send_request( :editRecord, db_id, nil, xml )
111
111
 
112
- get_tag_value( result, :rid ).to_i > 0
112
+ get_tag_value( result, :rid ).to_s == record_id.to_s
113
113
  end
114
114
 
115
115
  def delete_record( db_id, record_id )
116
116
  result = send_request( :deleteRecord, db_id, {rid: record_id} )
117
117
 
118
- get_tag_value( result, :rid ).to_i > 0
118
+ get_tag_value( result, :rid ).to_s == record_id.to_s
119
119
  end
120
120
 
121
121
  def purge_records ( db_id, options={} )
@@ -145,14 +145,19 @@ module AdvantageQuickbase
145
145
  end
146
146
 
147
147
  def import_from_csv( db_id, import_data, columns=nil )
148
- # If import_data contains hashes, use the keys as the import headers
149
- columns ||= import_data[ 0 ].map{ |fid, value| fid }
150
- columns = normalize_list( columns )
148
+ result = []
149
+ if import_data && import_data.length > 0
150
+ # If import_data contains hashes, use the keys as the import headers
151
+ columns ||= import_data[ 0 ].map{ |fid, value| fid }
152
+ columns = normalize_list( columns )
151
153
 
152
- xml = build_csv_xml( import_data, columns )
154
+ xml = build_csv_xml( import_data, columns )
153
155
 
154
- result = send_request( :importFromCSV, db_id, nil, xml )
155
- result.css('rid').map{ |xml_node| xml_node.text.to_i }
156
+ result = send_request( :importFromCSV, db_id, nil, xml )
157
+ result.css('rid').map{ |xml_node| xml_node.text.to_i }
158
+ end
159
+
160
+ result
156
161
  end
157
162
 
158
163
  def get_schema( db_id )
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advantage_quickbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
5
- prerelease:
4
+ version: 0.8.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ben Roux
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -36,29 +33,28 @@ files:
36
33
  - lib/quickbase.rb
37
34
  - lib/table.rb
38
35
  - lib/user.rb
39
- homepage: https://github.com/liquidise/Quickbase-Gem
36
+ homepage: https://github.com/AdvantageIntegratedSolutions/Quickbase-Gem
40
37
  licenses:
41
38
  - MIT
39
+ metadata: {}
42
40
  post_install_message:
43
41
  rdoc_options: []
44
42
  require_paths:
45
43
  - lib
46
44
  required_ruby_version: !ruby/object:Gem::Requirement
47
- none: false
48
45
  requirements:
49
46
  - - ! '>='
50
47
  - !ruby/object:Gem::Version
51
48
  version: '0'
52
49
  required_rubygems_version: !ruby/object:Gem::Requirement
53
- none: false
54
50
  requirements:
55
51
  - - ! '>='
56
52
  - !ruby/object:Gem::Version
57
53
  version: '0'
58
54
  requirements: []
59
55
  rubyforge_project:
60
- rubygems_version: 1.8.25
56
+ rubygems_version: 2.2.2
61
57
  signing_key:
62
- specification_version: 3
58
+ specification_version: 4
63
59
  summary: Quickbase API gem
64
60
  test_files: []