qbxml 0.4.0 → 1.0.0
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.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +30 -0
- data/.gitignore +2 -0
- data/Appraisals +10 -6
- data/README.md +1 -5
- data/gemfiles/{rails_5.0.gemfile → rails_7.1.gemfile} +2 -2
- data/gemfiles/rails_7.1.gemfile.lock +94 -0
- data/gemfiles/{rails_4.1.gemfile → rails_7.2.gemfile} +2 -2
- data/gemfiles/rails_7.2.gemfile.lock +71 -0
- data/gemfiles/{rails_4.2.gemfile → rails_8.0.gemfile} +2 -2
- data/gemfiles/rails_8.0.gemfile.lock +94 -0
- data/gemfiles/rails_8.1.gemfile +7 -0
- data/gemfiles/rails_8.1.gemfile.lock +94 -0
- data/lib/qbxml/hash.rb +2 -1
- data/lib/qbxml/qbxml.rb +2 -1
- data/lib/qbxml/types.rb +3 -1
- data/lib/qbxml/version.rb +1 -1
- data/lib/qbxml.rb +2 -1
- data/qbxml.gemspec +4 -3
- data/schema/qbxmlops140.xml +35792 -0
- data/test/unit/xml_to_hash_test.rb +157 -0
- metadata +20 -77
- data/.travis.yml +0 -22
- data/gemfiles/rails_4.1.gemfile.lock +0 -80
- data/gemfiles/rails_4.2.gemfile.lock +0 -80
- data/gemfiles/rails_5.0.gemfile.lock +0 -80
- data/spec/backwards_compatibility.rb +0 -26
- data/spec/spec_helper.rb +0 -25
- data/spec/support/requests/account_query_rq.xml +0 -8
- data/spec/support/requests/customer_add_rq.xml +0 -28
- data/spec/support/requests/customer_query_iterator_rq.xml +0 -11
- data/spec/support/requests/customer_query_rq.xml +0 -9
- data/spec/support/requests/estimate_add_rq.xml +0 -45
- data/spec/support/requests/invoice_add_rq.xml +0 -40
- data/spec/support/requests/item_inventory_add_rq.xml +0 -22
- data/spec/support/requests/purchase_order_query_rq.xml +0 -14
- data/spec/support/requests/receive_payment_add_rq.xml +0 -35
- data/spec/support/requests/receive_payment_query_rq.xml +0 -9
- data/spec/support/requests/sales_receipt_add_rq.xml +0 -49
- data/spec/support/responses/account_query_rs.xml +0 -42
- data/spec/support/responses/customer_add_rs.xml +0 -37
- data/spec/support/responses/customer_query_rs.xml +0 -49
- data/spec/support/responses/customer_query_terator_rs.xml +0 -34
- data/spec/support/responses/item_inventory_add_rs.xml +0 -40
- data/spec/support/responses/purchase_order_query_rs.xml +0 -84
- data/spec/support/responses/receive_payment_query_rs.xml +0 -51
- data/spec/support/responses/sales_receipt_add_rs.xml +0 -89
|
@@ -121,4 +121,161 @@ class XmlToHashTest < Minitest::Test
|
|
|
121
121
|
assert_equal h, qbxml.from_qbxml(xml)
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
def test_bigdecimal
|
|
125
|
+
injected_time = Time.now.strftime("%Y-%m-%dT%H:%M:%S%:z")
|
|
126
|
+
|
|
127
|
+
qbxml = Qbxml.new
|
|
128
|
+
h = {
|
|
129
|
+
"qbxml" => {
|
|
130
|
+
"xml_attributes" => {},
|
|
131
|
+
"qbxml_msgs_rs"=> {
|
|
132
|
+
"xml_attributes" => {},
|
|
133
|
+
"sales_receipt_add_rs" => {
|
|
134
|
+
"xml_attributes" => {
|
|
135
|
+
"statusCode" => "0",
|
|
136
|
+
"statusSeverity" => "Info",
|
|
137
|
+
"statusMessage" => "Status OK"
|
|
138
|
+
},
|
|
139
|
+
"sales_receipt_ret" => {
|
|
140
|
+
"xml_attributes" => {},
|
|
141
|
+
"txn_id" => "1C0-1433857054",
|
|
142
|
+
"time_created" => injected_time,
|
|
143
|
+
"time_modified" => injected_time,
|
|
144
|
+
"edit_sequence" => "1433850554",
|
|
145
|
+
"txn_number" => 89,
|
|
146
|
+
"customer_ref" => {
|
|
147
|
+
"xml_attributes" => {},
|
|
148
|
+
"list_id" => "80000013-1433852150",
|
|
149
|
+
"full_name" => "custfullname"
|
|
150
|
+
},
|
|
151
|
+
"template_ref" => {
|
|
152
|
+
"xml_attributes" => {},
|
|
153
|
+
"list_id" => "80000009-1433199758",
|
|
154
|
+
"full_name" => "Custom Sales Receipt"
|
|
155
|
+
},
|
|
156
|
+
"txn_date" => "2019-06-09",
|
|
157
|
+
"ref_number" => "1040000529",
|
|
158
|
+
"is_pending" => false,
|
|
159
|
+
"payment_method_ref" => {
|
|
160
|
+
"xml_attributes" => {},
|
|
161
|
+
"list_id" => "8000000A-1433718272",
|
|
162
|
+
"full_name" => "paymentmethod"
|
|
163
|
+
},
|
|
164
|
+
"due_date" => "2019-06-09",
|
|
165
|
+
"ship_date" => "2019-06-09",
|
|
166
|
+
"subtotal" => 0.2,
|
|
167
|
+
"item_sales_tax_ref" => {
|
|
168
|
+
"xml_attributes" => {},
|
|
169
|
+
"list_id" => "80000009-1433719484",
|
|
170
|
+
"full_name" => "Tax agency"
|
|
171
|
+
},
|
|
172
|
+
"sales_tax_percentage" => 8.25,
|
|
173
|
+
"sales_tax_total" => 0.02,
|
|
174
|
+
"total_amount" => 0.22,
|
|
175
|
+
"is_to_be_printed" => true,
|
|
176
|
+
"is_to_be_emailed" => false,
|
|
177
|
+
"customer_sales_tax_code_ref" => {
|
|
178
|
+
"xml_attributes" => {},
|
|
179
|
+
"list_id" => "80000002-1403304324",
|
|
180
|
+
"full_name" => "Non"
|
|
181
|
+
},
|
|
182
|
+
"deposit_to_account_ref" => {
|
|
183
|
+
"xml_attributes" => {},
|
|
184
|
+
"list_id" => "8000003D-1433719666",
|
|
185
|
+
"full_name" => "Undeposited Funds"
|
|
186
|
+
},
|
|
187
|
+
"sales_receipt_line_ret" => {
|
|
188
|
+
"xml_attributes" => {},
|
|
189
|
+
"txn_line_id" => "1C2-1433632154",
|
|
190
|
+
"item_ref" => {
|
|
191
|
+
"xml_attributes" => {},
|
|
192
|
+
"list_id" => "8000001F-1433854453",
|
|
193
|
+
"full_name" => "ABCD0000"
|
|
194
|
+
},
|
|
195
|
+
"desc" => "description",
|
|
196
|
+
"quantity" => 0.2,
|
|
197
|
+
"rate" => 1.0,
|
|
198
|
+
"amount" => 0.2,
|
|
199
|
+
"service_date" => "2019-06-09",
|
|
200
|
+
"sales_tax_code_ref"=> {
|
|
201
|
+
"xml_attributes" => {},
|
|
202
|
+
"list_id" => "80000001-1403304324",
|
|
203
|
+
"full_name"=>"Tax"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
xml = <<-XML
|
|
213
|
+
<QBXML>
|
|
214
|
+
<QBXMLMsgsRs>
|
|
215
|
+
<SalesReceiptAddRs statusCode="0" statusSeverity="Info" statusMessage="Status OK">
|
|
216
|
+
<SalesReceiptRet>
|
|
217
|
+
<TxnID>1C0-1433857054</TxnID>
|
|
218
|
+
<TimeCreated>#{injected_time}</TimeCreated>
|
|
219
|
+
<TimeModified>#{injected_time}</TimeModified>
|
|
220
|
+
<EditSequence>1433850554</EditSequence>
|
|
221
|
+
<TxnNumber>89</TxnNumber>
|
|
222
|
+
<CustomerRef>
|
|
223
|
+
<ListID>80000013-1433852150</ListID>
|
|
224
|
+
<FullName>custfullname</FullName>
|
|
225
|
+
</CustomerRef>
|
|
226
|
+
<TemplateRef>
|
|
227
|
+
<ListID>80000009-1433199758</ListID>
|
|
228
|
+
<FullName>Custom Sales Receipt</FullName>
|
|
229
|
+
</TemplateRef>
|
|
230
|
+
<TxnDate>2019-06-09</TxnDate>
|
|
231
|
+
<RefNumber>1040000529</RefNumber>
|
|
232
|
+
<IsPending>false</IsPending>
|
|
233
|
+
<PaymentMethodRef>
|
|
234
|
+
<ListID>8000000A-1433718272</ListID>
|
|
235
|
+
<FullName>paymentmethod</FullName>
|
|
236
|
+
</PaymentMethodRef>
|
|
237
|
+
<DueDate>2019-06-09</DueDate>
|
|
238
|
+
<ShipDate>2019-06-09</ShipDate>
|
|
239
|
+
<Subtotal>0.20</Subtotal>
|
|
240
|
+
<ItemSalesTaxRef>
|
|
241
|
+
<ListID>80000009-1433719484</ListID>
|
|
242
|
+
<FullName>Tax agency</FullName>
|
|
243
|
+
</ItemSalesTaxRef>
|
|
244
|
+
<SalesTaxPercentage>8.25</SalesTaxPercentage>
|
|
245
|
+
<SalesTaxTotal>0.02</SalesTaxTotal>
|
|
246
|
+
<TotalAmount>0.22</TotalAmount>
|
|
247
|
+
<IsToBePrinted>true</IsToBePrinted>
|
|
248
|
+
<IsToBeEmailed>false</IsToBeEmailed>
|
|
249
|
+
<CustomerSalesTaxCodeRef>
|
|
250
|
+
<ListID>80000002-1403304324</ListID>
|
|
251
|
+
<FullName>Non</FullName>
|
|
252
|
+
</CustomerSalesTaxCodeRef>
|
|
253
|
+
<DepositToAccountRef>
|
|
254
|
+
<ListID>8000003D-1433719666</ListID>
|
|
255
|
+
<FullName>Undeposited Funds</FullName>
|
|
256
|
+
</DepositToAccountRef>
|
|
257
|
+
<SalesReceiptLineRet>
|
|
258
|
+
<TxnLineID>1C2-1433632154</TxnLineID>
|
|
259
|
+
<ItemRef>
|
|
260
|
+
<ListID>8000001F-1433854453</ListID>
|
|
261
|
+
<FullName>ABCD0000</FullName>
|
|
262
|
+
</ItemRef>
|
|
263
|
+
<Desc>description</Desc>
|
|
264
|
+
<Quantity>0.2</Quantity>
|
|
265
|
+
<Rate>1.00</Rate>
|
|
266
|
+
<Amount>0.20</Amount>
|
|
267
|
+
<ServiceDate>2019-06-09</ServiceDate>
|
|
268
|
+
<SalesTaxCodeRef>
|
|
269
|
+
<ListID>80000001-1403304324</ListID>
|
|
270
|
+
<FullName>Tax</FullName>
|
|
271
|
+
</SalesTaxCodeRef>
|
|
272
|
+
</SalesReceiptLineRet>
|
|
273
|
+
</SalesReceiptRet>
|
|
274
|
+
</SalesReceiptAddRs>
|
|
275
|
+
</QBXMLMsgsRs>
|
|
276
|
+
</QBXML>
|
|
277
|
+
XML
|
|
278
|
+
|
|
279
|
+
assert_equal h, qbxml.from_qbxml(xml)
|
|
280
|
+
end
|
|
124
281
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: qbxml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Skryl
|
|
8
8
|
- Jason Barnabe
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: activesupport
|
|
@@ -17,14 +16,14 @@ dependencies:
|
|
|
17
16
|
requirements:
|
|
18
17
|
- - ">="
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
20
|
-
version:
|
|
19
|
+
version: 7.1.0
|
|
21
20
|
type: :runtime
|
|
22
21
|
prerelease: false
|
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
23
|
requirements:
|
|
25
24
|
- - ">="
|
|
26
25
|
- !ruby/object:Gem::Version
|
|
27
|
-
version:
|
|
26
|
+
version: 7.1.0
|
|
28
27
|
- !ruby/object:Gem::Dependency
|
|
29
28
|
name: nokogiri
|
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -54,27 +53,13 @@ dependencies:
|
|
|
54
53
|
- !ruby/object:Gem::Version
|
|
55
54
|
version: '3.0'
|
|
56
55
|
- !ruby/object:Gem::Dependency
|
|
57
|
-
name:
|
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
|
59
|
-
requirements:
|
|
60
|
-
- - ">="
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: '0'
|
|
63
|
-
type: :development
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - ">="
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '0'
|
|
70
|
-
- !ruby/object:Gem::Dependency
|
|
71
|
-
name: pry-nav
|
|
56
|
+
name: bigdecimal
|
|
72
57
|
requirement: !ruby/object:Gem::Requirement
|
|
73
58
|
requirements:
|
|
74
59
|
- - ">="
|
|
75
60
|
- !ruby/object:Gem::Version
|
|
76
61
|
version: '0'
|
|
77
|
-
type: :
|
|
62
|
+
type: :runtime
|
|
78
63
|
prerelease: false
|
|
79
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
65
|
requirements:
|
|
@@ -82,7 +67,7 @@ dependencies:
|
|
|
82
67
|
- !ruby/object:Gem::Version
|
|
83
68
|
version: '0'
|
|
84
69
|
- !ruby/object:Gem::Dependency
|
|
85
|
-
name:
|
|
70
|
+
name: pry
|
|
86
71
|
requirement: !ruby/object:Gem::Requirement
|
|
87
72
|
requirements:
|
|
88
73
|
- - ">="
|
|
@@ -96,7 +81,7 @@ dependencies:
|
|
|
96
81
|
- !ruby/object:Gem::Version
|
|
97
82
|
version: '0'
|
|
98
83
|
- !ruby/object:Gem::Dependency
|
|
99
|
-
name:
|
|
84
|
+
name: pry-nav
|
|
100
85
|
requirement: !ruby/object:Gem::Requirement
|
|
101
86
|
requirements:
|
|
102
87
|
- - ">="
|
|
@@ -145,19 +130,21 @@ executables: []
|
|
|
145
130
|
extensions: []
|
|
146
131
|
extra_rdoc_files: []
|
|
147
132
|
files:
|
|
133
|
+
- ".github/workflows/ci.yml"
|
|
148
134
|
- ".gitignore"
|
|
149
|
-
- ".travis.yml"
|
|
150
135
|
- Appraisals
|
|
151
136
|
- Gemfile
|
|
152
137
|
- LICENSE.txt
|
|
153
138
|
- README.md
|
|
154
139
|
- Rakefile
|
|
155
|
-
- gemfiles/
|
|
156
|
-
- gemfiles/
|
|
157
|
-
- gemfiles/
|
|
158
|
-
- gemfiles/
|
|
159
|
-
- gemfiles/
|
|
160
|
-
- gemfiles/
|
|
140
|
+
- gemfiles/rails_7.1.gemfile
|
|
141
|
+
- gemfiles/rails_7.1.gemfile.lock
|
|
142
|
+
- gemfiles/rails_7.2.gemfile
|
|
143
|
+
- gemfiles/rails_7.2.gemfile.lock
|
|
144
|
+
- gemfiles/rails_8.0.gemfile
|
|
145
|
+
- gemfiles/rails_8.0.gemfile.lock
|
|
146
|
+
- gemfiles/rails_8.1.gemfile
|
|
147
|
+
- gemfiles/rails_8.1.gemfile.lock
|
|
161
148
|
- lib/qbxml.rb
|
|
162
149
|
- lib/qbxml/hash.rb
|
|
163
150
|
- lib/qbxml/qbxml.rb
|
|
@@ -169,6 +156,7 @@ files:
|
|
|
169
156
|
- schema/qbxmlops110.xml
|
|
170
157
|
- schema/qbxmlops120.xml
|
|
171
158
|
- schema/qbxmlops130.xml
|
|
159
|
+
- schema/qbxmlops140.xml
|
|
172
160
|
- schema/qbxmlops20.xml
|
|
173
161
|
- schema/qbxmlops30.xml
|
|
174
162
|
- schema/qbxmlops40.xml
|
|
@@ -178,34 +166,12 @@ files:
|
|
|
178
166
|
- schema/qbxmlops70.xml
|
|
179
167
|
- schema/qbxmlops80.xml
|
|
180
168
|
- schema/qbxmlopsCA30.xml
|
|
181
|
-
- spec/backwards_compatibility.rb
|
|
182
|
-
- spec/spec_helper.rb
|
|
183
|
-
- spec/support/requests/account_query_rq.xml
|
|
184
|
-
- spec/support/requests/customer_add_rq.xml
|
|
185
|
-
- spec/support/requests/customer_query_iterator_rq.xml
|
|
186
|
-
- spec/support/requests/customer_query_rq.xml
|
|
187
|
-
- spec/support/requests/estimate_add_rq.xml
|
|
188
|
-
- spec/support/requests/invoice_add_rq.xml
|
|
189
|
-
- spec/support/requests/item_inventory_add_rq.xml
|
|
190
|
-
- spec/support/requests/purchase_order_query_rq.xml
|
|
191
|
-
- spec/support/requests/receive_payment_add_rq.xml
|
|
192
|
-
- spec/support/requests/receive_payment_query_rq.xml
|
|
193
|
-
- spec/support/requests/sales_receipt_add_rq.xml
|
|
194
|
-
- spec/support/responses/account_query_rs.xml
|
|
195
|
-
- spec/support/responses/customer_add_rs.xml
|
|
196
|
-
- spec/support/responses/customer_query_rs.xml
|
|
197
|
-
- spec/support/responses/customer_query_terator_rs.xml
|
|
198
|
-
- spec/support/responses/item_inventory_add_rs.xml
|
|
199
|
-
- spec/support/responses/purchase_order_query_rs.xml
|
|
200
|
-
- spec/support/responses/receive_payment_query_rs.xml
|
|
201
|
-
- spec/support/responses/sales_receipt_add_rs.xml
|
|
202
169
|
- test/unit/hash_to_xml_test.rb
|
|
203
170
|
- test/unit/version_test.rb
|
|
204
171
|
- test/unit/xml_to_hash_test.rb
|
|
205
172
|
homepage: ''
|
|
206
173
|
licenses: []
|
|
207
174
|
metadata: {}
|
|
208
|
-
post_install_message:
|
|
209
175
|
rdoc_options: []
|
|
210
176
|
require_paths:
|
|
211
177
|
- lib
|
|
@@ -213,40 +179,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
213
179
|
requirements:
|
|
214
180
|
- - ">="
|
|
215
181
|
- !ruby/object:Gem::Version
|
|
216
|
-
version: '
|
|
182
|
+
version: '3.2'
|
|
217
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
184
|
requirements:
|
|
219
185
|
- - ">="
|
|
220
186
|
- !ruby/object:Gem::Version
|
|
221
187
|
version: '0'
|
|
222
188
|
requirements: []
|
|
223
|
-
|
|
224
|
-
rubygems_version: 2.6.12
|
|
225
|
-
signing_key:
|
|
189
|
+
rubygems_version: 3.6.9
|
|
226
190
|
specification_version: 4
|
|
227
191
|
summary: Quickbooks XML Parser and Validation Tool
|
|
228
192
|
test_files:
|
|
229
|
-
- spec/backwards_compatibility.rb
|
|
230
|
-
- spec/spec_helper.rb
|
|
231
|
-
- spec/support/requests/account_query_rq.xml
|
|
232
|
-
- spec/support/requests/customer_add_rq.xml
|
|
233
|
-
- spec/support/requests/customer_query_iterator_rq.xml
|
|
234
|
-
- spec/support/requests/customer_query_rq.xml
|
|
235
|
-
- spec/support/requests/estimate_add_rq.xml
|
|
236
|
-
- spec/support/requests/invoice_add_rq.xml
|
|
237
|
-
- spec/support/requests/item_inventory_add_rq.xml
|
|
238
|
-
- spec/support/requests/purchase_order_query_rq.xml
|
|
239
|
-
- spec/support/requests/receive_payment_add_rq.xml
|
|
240
|
-
- spec/support/requests/receive_payment_query_rq.xml
|
|
241
|
-
- spec/support/requests/sales_receipt_add_rq.xml
|
|
242
|
-
- spec/support/responses/account_query_rs.xml
|
|
243
|
-
- spec/support/responses/customer_add_rs.xml
|
|
244
|
-
- spec/support/responses/customer_query_rs.xml
|
|
245
|
-
- spec/support/responses/customer_query_terator_rs.xml
|
|
246
|
-
- spec/support/responses/item_inventory_add_rs.xml
|
|
247
|
-
- spec/support/responses/purchase_order_query_rs.xml
|
|
248
|
-
- spec/support/responses/receive_payment_query_rs.xml
|
|
249
|
-
- spec/support/responses/sales_receipt_add_rs.xml
|
|
250
193
|
- test/unit/hash_to_xml_test.rb
|
|
251
194
|
- test/unit/version_test.rb
|
|
252
195
|
- test/unit/xml_to_hash_test.rb
|
data/.travis.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
|
|
3
|
-
rvm:
|
|
4
|
-
- 2.0
|
|
5
|
-
- 2.1
|
|
6
|
-
- 2.2
|
|
7
|
-
- 2.3.1
|
|
8
|
-
|
|
9
|
-
gemfile:
|
|
10
|
-
- gemfiles/rails_5.0.gemfile
|
|
11
|
-
- gemfiles/rails_4.2.gemfile
|
|
12
|
-
- gemfiles/rails_4.1.gemfile
|
|
13
|
-
|
|
14
|
-
matrix:
|
|
15
|
-
exclude:
|
|
16
|
-
- rvm: 2.0
|
|
17
|
-
gemfile: gemfiles/rails_5.0.gemfile
|
|
18
|
-
- rvm: 2.1
|
|
19
|
-
gemfile: gemfiles/rails_5.0.gemfile
|
|
20
|
-
|
|
21
|
-
before_install:
|
|
22
|
-
- if ruby --version | cut -d ' ' -f 2 | grep -q 2.1.5p273 ; then gem update --system 2.4.8; fi
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../
|
|
3
|
-
specs:
|
|
4
|
-
qbxml (0.3.0)
|
|
5
|
-
activesupport (>= 4.1.0)
|
|
6
|
-
builder (~> 3.0)
|
|
7
|
-
nokogiri (~> 1.5)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
activesupport (4.1.16)
|
|
13
|
-
i18n (~> 0.6, >= 0.6.9)
|
|
14
|
-
json (~> 1.7, >= 1.7.7)
|
|
15
|
-
minitest (~> 5.1)
|
|
16
|
-
thread_safe (~> 0.1)
|
|
17
|
-
tzinfo (~> 1.1)
|
|
18
|
-
appraisal (2.1.0)
|
|
19
|
-
bundler
|
|
20
|
-
rake
|
|
21
|
-
thor (>= 0.14.0)
|
|
22
|
-
builder (3.2.2)
|
|
23
|
-
coderay (1.1.1)
|
|
24
|
-
diff-lcs (1.2.5)
|
|
25
|
-
docile (1.1.5)
|
|
26
|
-
i18n (0.7.0)
|
|
27
|
-
json (1.8.3)
|
|
28
|
-
method_source (0.8.2)
|
|
29
|
-
mini_portile2 (2.1.0)
|
|
30
|
-
minitest (5.9.0)
|
|
31
|
-
nokogiri (1.6.8)
|
|
32
|
-
mini_portile2 (~> 2.1.0)
|
|
33
|
-
pkg-config (~> 1.1.7)
|
|
34
|
-
pkg-config (1.1.7)
|
|
35
|
-
pry (0.10.4)
|
|
36
|
-
coderay (~> 1.1.0)
|
|
37
|
-
method_source (~> 0.8.1)
|
|
38
|
-
slop (~> 3.4)
|
|
39
|
-
pry-nav (0.2.4)
|
|
40
|
-
pry (>= 0.9.10, < 0.11.0)
|
|
41
|
-
rake (11.2.2)
|
|
42
|
-
rspec (3.5.0)
|
|
43
|
-
rspec-core (~> 3.5.0)
|
|
44
|
-
rspec-expectations (~> 3.5.0)
|
|
45
|
-
rspec-mocks (~> 3.5.0)
|
|
46
|
-
rspec-core (3.5.2)
|
|
47
|
-
rspec-support (~> 3.5.0)
|
|
48
|
-
rspec-expectations (3.5.0)
|
|
49
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
|
-
rspec-support (~> 3.5.0)
|
|
51
|
-
rspec-mocks (3.5.0)
|
|
52
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
53
|
-
rspec-support (~> 3.5.0)
|
|
54
|
-
rspec-support (3.5.0)
|
|
55
|
-
simplecov (0.12.0)
|
|
56
|
-
docile (~> 1.1.0)
|
|
57
|
-
json (>= 1.8, < 3)
|
|
58
|
-
simplecov-html (~> 0.10.0)
|
|
59
|
-
simplecov-html (0.10.0)
|
|
60
|
-
slop (3.6.0)
|
|
61
|
-
thor (0.19.1)
|
|
62
|
-
thread_safe (0.3.5)
|
|
63
|
-
tzinfo (1.2.2)
|
|
64
|
-
thread_safe (~> 0.1)
|
|
65
|
-
|
|
66
|
-
PLATFORMS
|
|
67
|
-
ruby
|
|
68
|
-
|
|
69
|
-
DEPENDENCIES
|
|
70
|
-
activesupport (~> 4.1.0)
|
|
71
|
-
appraisal
|
|
72
|
-
pry
|
|
73
|
-
pry-nav
|
|
74
|
-
qbxml!
|
|
75
|
-
rake
|
|
76
|
-
rspec
|
|
77
|
-
simplecov
|
|
78
|
-
|
|
79
|
-
BUNDLED WITH
|
|
80
|
-
1.12.5
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../
|
|
3
|
-
specs:
|
|
4
|
-
qbxml (0.3.0)
|
|
5
|
-
activesupport (>= 4.1.0)
|
|
6
|
-
builder (~> 3.0)
|
|
7
|
-
nokogiri (~> 1.5)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
activesupport (4.2.7.1)
|
|
13
|
-
i18n (~> 0.7)
|
|
14
|
-
json (~> 1.7, >= 1.7.7)
|
|
15
|
-
minitest (~> 5.1)
|
|
16
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
|
17
|
-
tzinfo (~> 1.1)
|
|
18
|
-
appraisal (2.1.0)
|
|
19
|
-
bundler
|
|
20
|
-
rake
|
|
21
|
-
thor (>= 0.14.0)
|
|
22
|
-
builder (3.2.2)
|
|
23
|
-
coderay (1.1.1)
|
|
24
|
-
diff-lcs (1.2.5)
|
|
25
|
-
docile (1.1.5)
|
|
26
|
-
i18n (0.7.0)
|
|
27
|
-
json (1.8.3)
|
|
28
|
-
method_source (0.8.2)
|
|
29
|
-
mini_portile2 (2.1.0)
|
|
30
|
-
minitest (5.9.0)
|
|
31
|
-
nokogiri (1.6.8)
|
|
32
|
-
mini_portile2 (~> 2.1.0)
|
|
33
|
-
pkg-config (~> 1.1.7)
|
|
34
|
-
pkg-config (1.1.7)
|
|
35
|
-
pry (0.10.4)
|
|
36
|
-
coderay (~> 1.1.0)
|
|
37
|
-
method_source (~> 0.8.1)
|
|
38
|
-
slop (~> 3.4)
|
|
39
|
-
pry-nav (0.2.4)
|
|
40
|
-
pry (>= 0.9.10, < 0.11.0)
|
|
41
|
-
rake (11.2.2)
|
|
42
|
-
rspec (3.5.0)
|
|
43
|
-
rspec-core (~> 3.5.0)
|
|
44
|
-
rspec-expectations (~> 3.5.0)
|
|
45
|
-
rspec-mocks (~> 3.5.0)
|
|
46
|
-
rspec-core (3.5.2)
|
|
47
|
-
rspec-support (~> 3.5.0)
|
|
48
|
-
rspec-expectations (3.5.0)
|
|
49
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
|
-
rspec-support (~> 3.5.0)
|
|
51
|
-
rspec-mocks (3.5.0)
|
|
52
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
53
|
-
rspec-support (~> 3.5.0)
|
|
54
|
-
rspec-support (3.5.0)
|
|
55
|
-
simplecov (0.12.0)
|
|
56
|
-
docile (~> 1.1.0)
|
|
57
|
-
json (>= 1.8, < 3)
|
|
58
|
-
simplecov-html (~> 0.10.0)
|
|
59
|
-
simplecov-html (0.10.0)
|
|
60
|
-
slop (3.6.0)
|
|
61
|
-
thor (0.19.1)
|
|
62
|
-
thread_safe (0.3.5)
|
|
63
|
-
tzinfo (1.2.2)
|
|
64
|
-
thread_safe (~> 0.1)
|
|
65
|
-
|
|
66
|
-
PLATFORMS
|
|
67
|
-
ruby
|
|
68
|
-
|
|
69
|
-
DEPENDENCIES
|
|
70
|
-
activesupport (~> 4.2.0)
|
|
71
|
-
appraisal
|
|
72
|
-
pry
|
|
73
|
-
pry-nav
|
|
74
|
-
qbxml!
|
|
75
|
-
rake
|
|
76
|
-
rspec
|
|
77
|
-
simplecov
|
|
78
|
-
|
|
79
|
-
BUNDLED WITH
|
|
80
|
-
1.12.5
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../
|
|
3
|
-
specs:
|
|
4
|
-
qbxml (0.3.0)
|
|
5
|
-
activesupport (>= 4.1.0)
|
|
6
|
-
builder (~> 3.0)
|
|
7
|
-
nokogiri (~> 1.5)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
activesupport (5.0.0.1)
|
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
14
|
-
i18n (~> 0.7)
|
|
15
|
-
minitest (~> 5.1)
|
|
16
|
-
tzinfo (~> 1.1)
|
|
17
|
-
appraisal (2.1.0)
|
|
18
|
-
bundler
|
|
19
|
-
rake
|
|
20
|
-
thor (>= 0.14.0)
|
|
21
|
-
builder (3.2.2)
|
|
22
|
-
coderay (1.1.1)
|
|
23
|
-
concurrent-ruby (1.0.2)
|
|
24
|
-
diff-lcs (1.2.5)
|
|
25
|
-
docile (1.1.5)
|
|
26
|
-
i18n (0.7.0)
|
|
27
|
-
json (2.0.2)
|
|
28
|
-
method_source (0.8.2)
|
|
29
|
-
mini_portile2 (2.1.0)
|
|
30
|
-
minitest (5.9.0)
|
|
31
|
-
nokogiri (1.6.8)
|
|
32
|
-
mini_portile2 (~> 2.1.0)
|
|
33
|
-
pkg-config (~> 1.1.7)
|
|
34
|
-
pkg-config (1.1.7)
|
|
35
|
-
pry (0.10.4)
|
|
36
|
-
coderay (~> 1.1.0)
|
|
37
|
-
method_source (~> 0.8.1)
|
|
38
|
-
slop (~> 3.4)
|
|
39
|
-
pry-nav (0.2.4)
|
|
40
|
-
pry (>= 0.9.10, < 0.11.0)
|
|
41
|
-
rake (11.2.2)
|
|
42
|
-
rspec (3.5.0)
|
|
43
|
-
rspec-core (~> 3.5.0)
|
|
44
|
-
rspec-expectations (~> 3.5.0)
|
|
45
|
-
rspec-mocks (~> 3.5.0)
|
|
46
|
-
rspec-core (3.5.2)
|
|
47
|
-
rspec-support (~> 3.5.0)
|
|
48
|
-
rspec-expectations (3.5.0)
|
|
49
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
|
-
rspec-support (~> 3.5.0)
|
|
51
|
-
rspec-mocks (3.5.0)
|
|
52
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
53
|
-
rspec-support (~> 3.5.0)
|
|
54
|
-
rspec-support (3.5.0)
|
|
55
|
-
simplecov (0.12.0)
|
|
56
|
-
docile (~> 1.1.0)
|
|
57
|
-
json (>= 1.8, < 3)
|
|
58
|
-
simplecov-html (~> 0.10.0)
|
|
59
|
-
simplecov-html (0.10.0)
|
|
60
|
-
slop (3.6.0)
|
|
61
|
-
thor (0.19.1)
|
|
62
|
-
thread_safe (0.3.5)
|
|
63
|
-
tzinfo (1.2.2)
|
|
64
|
-
thread_safe (~> 0.1)
|
|
65
|
-
|
|
66
|
-
PLATFORMS
|
|
67
|
-
ruby
|
|
68
|
-
|
|
69
|
-
DEPENDENCIES
|
|
70
|
-
activesupport (~> 5.0.0)
|
|
71
|
-
appraisal
|
|
72
|
-
pry
|
|
73
|
-
pry-nav
|
|
74
|
-
qbxml!
|
|
75
|
-
rake
|
|
76
|
-
rspec
|
|
77
|
-
simplecov
|
|
78
|
-
|
|
79
|
-
BUNDLED WITH
|
|
80
|
-
1.12.5
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
require 'quickbooks'
|
|
3
|
-
|
|
4
|
-
describe Qbxml do
|
|
5
|
-
context 'backwards compatibility with the quickbooks_api gem' do
|
|
6
|
-
|
|
7
|
-
let(:qb_old) { Quickbooks::API[:qb] }
|
|
8
|
-
let(:qb_new) { Qbxml.new(:qb) }
|
|
9
|
-
|
|
10
|
-
it 'should produce the same results when parsing qbxml/hash data' do
|
|
11
|
-
(requests + responses).each do |data|
|
|
12
|
-
old_parse = qb_old.qbxml_to_hash(data, true)
|
|
13
|
-
|
|
14
|
-
new_parse1 = qb_new.from_qbxml(data)
|
|
15
|
-
new_parse1.should == { 'qbxml' => old_parse }
|
|
16
|
-
|
|
17
|
-
# XML is a pain to compare so we can compare the parsed hash resulting
|
|
18
|
-
# from the generated XML instead.
|
|
19
|
-
#
|
|
20
|
-
new_parse2 = qb_new.from_qbxml(qb_new.to_qbxml(new_parse1))
|
|
21
|
-
new_parse2.should == { 'qbxml' => old_parse }
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
end
|
|
26
|
-
end
|
data/spec/spec_helper.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
require 'simplecov'
|
|
2
|
-
SimpleCov.start
|
|
3
|
-
|
|
4
|
-
require 'rubygems'
|
|
5
|
-
require 'bundler/setup'
|
|
6
|
-
Bundler.require :default
|
|
7
|
-
|
|
8
|
-
require 'qbxml'
|
|
9
|
-
RSpec.configure do |config|
|
|
10
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
|
11
|
-
config.filter_run :focus => true
|
|
12
|
-
config.run_all_when_everything_filtered = true
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
SUPPORT_DIR = "#{File.dirname(__FILE__)}/support" unless defined? SUPPORT_DIR
|
|
16
|
-
REQUEST_DIR = "#{SUPPORT_DIR}/requests" unless defined? REQUEST_DIR
|
|
17
|
-
RESPONSE_DIR = "#{SUPPORT_DIR}/responses" unless defined? RESPONSE_DIR
|
|
18
|
-
|
|
19
|
-
def requests
|
|
20
|
-
Dir["#{REQUEST_DIR}/*.xml"].map { |f| File.read(f) }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def responses
|
|
24
|
-
Dir["#{RESPONSE_DIR}/*.xml"].map { |f| File.read(f) }
|
|
25
|
-
end
|