Commit f65bf74737a148e2decaf37aac5666fb5c2e7848
1 parent
dc8aa5b6
Added and configured VCR
Showing
15 changed files
with
504 additions
and
6 deletions
Show diff stats
Gemfile.lock
... | ... | @@ -8,13 +8,24 @@ PATH |
8 | 8 | GEM |
9 | 9 | remote: https://rubygems.org/ |
10 | 10 | specs: |
11 | + addressable (2.5.2) | |
12 | + public_suffix (>= 2.0.2, < 4.0) | |
11 | 13 | ast (2.4.0) |
12 | 14 | coderay (1.1.2) |
15 | + crack (0.4.3) | |
16 | + safe_yaml (~> 1.0.0) | |
13 | 17 | faraday (0.14.0) |
14 | 18 | multipart-post (>= 1.2, < 3) |
19 | + hashdiff (0.3.7) | |
15 | 20 | method_source (0.9.0) |
16 | 21 | mini_portile2 (2.3.0) |
22 | + minispec-metadata (2.0.0) | |
23 | + minitest | |
17 | 24 | minitest (5.11.3) |
25 | + minitest-vcr (1.4.0) | |
26 | + minispec-metadata (~> 2.0) | |
27 | + minitest (>= 4.7.5) | |
28 | + vcr (>= 2.9) | |
18 | 29 | multipart-post (2.0.0) |
19 | 30 | nokogiri (1.8.2) |
20 | 31 | mini_portile2 (~> 2.3.0) |
... | ... | @@ -25,6 +36,7 @@ GEM |
25 | 36 | pry (0.11.3) |
26 | 37 | coderay (~> 1.1.0) |
27 | 38 | method_source (~> 0.9.0) |
39 | + public_suffix (3.0.2) | |
28 | 40 | rainbow (3.0.0) |
29 | 41 | rake (10.5.0) |
30 | 42 | rubocop (0.54.0) |
... | ... | @@ -35,7 +47,13 @@ GEM |
35 | 47 | ruby-progressbar (~> 1.7) |
36 | 48 | unicode-display_width (~> 1.0, >= 1.0.1) |
37 | 49 | ruby-progressbar (1.9.0) |
50 | + safe_yaml (1.0.4) | |
38 | 51 | unicode-display_width (1.3.0) |
52 | + vcr (4.0.0) | |
53 | + webmock (3.3.0) | |
54 | + addressable (>= 2.3.6) | |
55 | + crack (>= 0.3.2) | |
56 | + hashdiff | |
39 | 57 | |
40 | 58 | PLATFORMS |
41 | 59 | ruby |
... | ... | @@ -43,10 +61,12 @@ PLATFORMS |
43 | 61 | DEPENDENCIES |
44 | 62 | bundler (~> 1.16) |
45 | 63 | minitest (~> 5.0) |
64 | + minitest-vcr (~> 1.4.0) | |
46 | 65 | pry (~> 0.11) |
47 | 66 | rake (~> 10.0) |
48 | 67 | rubocop (~> 0.54.0) |
49 | 68 | syspro-ruby! |
69 | + webmock (~> 3.3.0) | |
50 | 70 | |
51 | 71 | BUNDLED WITH |
52 | 72 | 1.16.1 | ... | ... |
syspro-ruby.gemspec
... | ... | @@ -38,4 +38,6 @@ Gem::Specification.new do |spec| |
38 | 38 | spec.add_development_dependency 'pry', '~> 0.11' |
39 | 39 | spec.add_development_dependency 'rake', '~> 10.0' |
40 | 40 | spec.add_development_dependency 'rubocop', '~> 0.54.0' |
41 | + spec.add_development_dependency 'webmock', '~> 3.3.0' | |
42 | + spec.add_development_dependency 'minitest-vcr', '~> 1.4.0' | |
41 | 43 | end | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/getversion | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '7' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:23:43 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: 7.0.0.6 | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:23:42 GMT | |
36 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/getversion | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '7' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:23:43 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: 7.0.0.6 | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:23:42 GMT | |
36 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logoff?UserId=1BB5B3050954BB459A5D034DB5CC386980 | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '72' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:22:53 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: 'ERROR: Unable to read the SYSPRO base directory registry string BaseDir8' | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:22:52 GMT | |
36 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logon?CompanyId=L&CompanyPassword=&Operator=wland&OperatorPassword=piperita2016 | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '36' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:23:52 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: 'EC3098D6E284FB44ADF10671B3F06FCA00 ' | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:23:51 GMT | |
36 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logon?CompanyId=L&CompanyPassword=&Operator=wland&OperatorPassword=piperita2016 | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '36' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:23:03 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: '64C41E1DEB73024CA660211DE643705700 ' | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:23:01 GMT | |
36 | +- request: | |
37 | + method: get | |
38 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Browse?UserId=64C41E1DEB73024CA660211DE643705700%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CBrowse%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMBRW.XSD%22%3E%0A%20%20%3CBrowseName%3EInvMaster%3C/BrowseName%3E%0A%20%20%3CStartAtKey/%3E%0A%20%20%3CStartCondition%3E%3C/StartCondition%3E%0A%20%20%3CReturnRows%3E5%3C/ReturnRows%3E%0A%20%20%0A%20%20%3CBrowseDetails%3E%0A%20%20%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%20%20%3CTitle%3EStockCodes%3C/Title%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3CColumn%3E%0A%20%20%20%20%20%20%20%20%3CColumnName%3EStockCode%3C/ColumnName%3E%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%3C/Column%3E%0A%20%20%20%20%0A%20%20%3C/BrowseDetails%3E%0A%3C/Browse%3E%0A%0A | |
39 | + body: | |
40 | + encoding: US-ASCII | |
41 | + string: '' | |
42 | + headers: | |
43 | + User-Agent: | |
44 | + - Syspro/7 RubyBindings/0.1.0 | |
45 | + Content-Type: | |
46 | + - application/x-www-form-urlencoded | |
47 | + Accept-Encoding: | |
48 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
49 | + Accept: | |
50 | + - "*/*" | |
51 | + response: | |
52 | + status: | |
53 | + code: 200 | |
54 | + message: OK | |
55 | + headers: | |
56 | + Content-Length: | |
57 | + - '944' | |
58 | + Content-Type: | |
59 | + - application/octet-stream | |
60 | + Server: | |
61 | + - Microsoft-HTTPAPI/2.0 | |
62 | + Date: | |
63 | + - Fri, 06 Apr 2018 19:23:07 GMT | |
64 | + body: | |
65 | + encoding: UTF-8 | |
66 | + string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05' | |
67 | + Language2='EN' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='7.0.036' | |
68 | + OperatorPrimaryRole=' '>\n<Title>StockCodes</Title>\n<Row>\n<StockCode>\n<Value>02</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>021</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>0214011IFF</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>022</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>023</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<NextPrevKey>\n<PrevKey>02</PrevKey>\n<NextKey>023</NextKey>\n<Fwd>True</Fwd>\n<Back>False</Back>\n</NextPrevKey>\n<HeaderDetails>\n<Header>Stock | |
69 | + code</Header>\n<Key>StockCode</Key>\n<KeyDescription>Stock code</KeyDescription>\n<Table>InvMaster</Table>\n</HeaderDetails>\n</InvMaster>\n " | |
70 | + http_version: | |
71 | + recorded_at: Fri, 06 Apr 2018 19:23:06 GMT | |
72 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logon?CompanyId=L&CompanyPassword=&Operator=wland&OperatorPassword=piperita2016 | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '36' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:23:16 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: '5B21680F424424498B7CE7CCDA98B41700 ' | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:23:15 GMT | |
36 | +- request: | |
37 | + method: get | |
38 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Fetch?UserId=5B21680F424424498B7CE7CCDA98B41700%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CFetch%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMFCH.XSD%22%3E%0A%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%3CKey%3E02%3C/Key%3E%0A%20%20%0A%20%20%3CFullKeyProvided%3EY%3C/FullKeyProvided%3E%0A%20%20%3CDefaultType%3E%3C/DefaultType%3E%0A%20%20%3CEspressoFetch%3EN%3C/EspressoFetch%3E%0A%3C/Fetch%3E%0A%0A | |
39 | + body: | |
40 | + encoding: US-ASCII | |
41 | + string: '' | |
42 | + headers: | |
43 | + User-Agent: | |
44 | + - Syspro/7 RubyBindings/0.1.0 | |
45 | + Content-Type: | |
46 | + - application/x-www-form-urlencoded | |
47 | + Accept-Encoding: | |
48 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
49 | + Accept: | |
50 | + - "*/*" | |
51 | + response: | |
52 | + status: | |
53 | + code: 200 | |
54 | + message: OK | |
55 | + headers: | |
56 | + Content-Length: | |
57 | + - '3911' | |
58 | + Content-Type: | |
59 | + - application/octet-stream | |
60 | + Server: | |
61 | + - Microsoft-HTTPAPI/2.0 | |
62 | + Date: | |
63 | + - Fri, 06 Apr 2018 19:23:26 GMT | |
64 | + body: | |
65 | + encoding: UTF-8 | |
66 | + string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05' | |
67 | + Language2='EN' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='7.0.035' | |
68 | + OperatorPrimaryRole=' '>\n<StockCode>02</StockCode>\n<Description>STR</Description>\n<LongDesc>SPEARMINT | |
69 | + TERPENES</LongDesc>\n<AlternateKey1/>\n<AlternateKey2/>\n<EccUser/>\n<StockUom>LB</StockUom>\n<AlternateUom>KG</AlternateUom>\n<OtherUom>DR</OtherUom>\n<ConvFactAltUom> | |
70 | + \ 2.204620</ConvFactAltUom>\n<ConvMulDiv>M</ConvMulDiv>\n<ConvFactOthUom> | |
71 | + \ 400.000000</ConvFactOthUom>\n<MulDiv>M</MulDiv>\n<Mass> 1.000000</Mass>\n<Volume> | |
72 | + \ 0.000000</Volume>\n<Decimals>3</Decimals>\n<PriceCategory>A</PriceCategory>\n<PriceMethod>C</PriceMethod>\n<Supplier/>\n<CycleCount> | |
73 | + 0</CycleCount>\n<ProductClass>STRP</ProductClass>\n<TaxCode>A</TaxCode>\n<OtherTaxCode/>\n<ListPriceCode>A</ListPriceCode>\n<SerialMethod>N</SerialMethod>\n<InterfaceFlag>Y</InterfaceFlag>\n<KitType>N</KitType>\n<LowLevelCode> | |
74 | + 0</LowLevelCode>\n<Buyer/>\n<Planner/>\n<TraceableType>T</TraceableType>\n<MpsFlag>N</MpsFlag>\n<BulkIssueFlag>N</BulkIssueFlag>\n<AbcClass/>\n<LeadTime> | |
75 | + \ 0</LeadTime>\n<StockMovementReq>Y</StockMovementReq>\n<ClearingFlag>N</ClearingFlag>\n<SupercessionDate>0000-00-00</SupercessionDate>\n<AbcAnalysisReq>Y</AbcAnalysisReq>\n<AbcCostingReq>N</AbcCostingReq>\n<CostUom>LB</CostUom>\n<MinPricePct> | |
76 | + \ 0.00</MinPricePct>\n<LabourCost> 0.00000</LabourCost>\n<MaterialCost> | |
77 | + \ 0.00000</MaterialCost>\n<FixOverhead> 0.00000</FixOverhead>\n<VariableOverhead> | |
78 | + \ 0.00000</VariableOverhead>\n<PartCategory>B</PartCategory>\n<DrawOfficeNum/>\n<WarehouseToUse>H1</WarehouseToUse>\n<BuyingRule>A</BuyingRule>\n<SpecificGravity> | |
79 | + 0.0000</SpecificGravity>\n<ImplosionNum> 0</ImplosionNum>\n<Ebq> 400.000000</Ebq>\n<ComponentCount> | |
80 | + \ 0</ComponentCount>\n<FixTimePeriod> 1</FixTimePeriod>\n<PanSize> 0.000000</PanSize>\n<DockToStock> | |
81 | + \ 0</DockToStock>\n<OutputMassFlag>F</OutputMassFlag>\n<ShelfLife> | |
82 | + \ 0</ShelfLife>\n<Version/>\n<Release/>\n<DemandTimeFence> 0</DemandTimeFence>\n<MakeToOrderFlag>N</MakeToOrderFlag>\n<ManufLeadTime> | |
83 | + \ 0</ManufLeadTime>\n<GrossReqRule>I</GrossReqRule>\n<PercentageYield>100</PercentageYield>\n<AbcPreProd> | |
84 | + \ 0.00000</AbcPreProd>\n<AbcManufacturing> 0.00000</AbcManufacturing>\n<AbcSales> | |
85 | + \ 0.00000</AbcSales>\n<AbcCumPreProd> 0.00000</AbcCumPreProd>\n<AbcCumManuf> | |
86 | + \ 0.00000</AbcCumManuf>\n<WipCtlGlCode/>\n<ResourceCode/>\n<GstTaxCode>A</GstTaxCode>\n<PrcInclGst>N</PrcInclGst>\n<SerEntryAtSale/>\n<StpSelection/>\n<UserField1/>\n<UserField2> | |
87 | + \ 0.00000</UserField2>\n<UserField3/>\n<UserField4/>\n<UserField5/>\n<TariffCode/>\n<SupplementaryUnit>N</SupplementaryUnit>\n<EbqPan>E</EbqPan>\n<StdLandedCost> | |
88 | + \ 0.00000</StdLandedCost>\n<LctRequired>N</LctRequired>\n<StdLctRoute/>\n<IssMultLotsFlag>Y</IssMultLotsFlag>\n<InclInStrValid>Y</InclInStrValid>\n<StdLabCostsBill> | |
89 | + \ 0.00000</StdLabCostsBill>\n<PhantomIfComp/>\n<CountryOfOrigin/>\n<StockOnHold/>\n<StockOnHoldReason/>\n<EccFlag>N</EccFlag>\n<StockAndAltUm>N</StockAndAltUm>\n<AltUnitChar>0</AltUnitChar>\n<JobsOnHold/>\n<JobHoldAllocs/>\n<PurchOnHold/>\n<SalesOnHold/>\n<MaintOnHold/>\n<BatchBill>N</BatchBill>\n<BlanketPoExists/>\n<CallOffBpoExists/>\n<DistWarehouseToUse/>\n<JobClassification/>\n<SubContractCost> | |
90 | + \ 0.00000</SubContractCost>\n<DateStkAdded>2005-08-26</DateStkAdded>\n<InspectionFlag/>\n<SerialPrefix/>\n<SerialSuffix/>\n<ReturnableItem/>\n<ProductGroup/>\n<PriceType/>\n<Basis/>\n<ManualCostFlag/>\n<ManufactureUom>LB</ManufactureUom>\n<ConvFactMuM> | |
91 | + \ 1.000000</ConvFactMuM>\n<ManMulDiv>M</ManMulDiv>\n<LookAheadWin> 0</LookAheadWin>\n<LoadingFactor> | |
92 | + \ 0.000</LoadingFactor>\n<SupplUnitCode/>\n<StorageSecurity/>\n<StorageHazard/>\n<StorageCondition/>\n<ProductShelfLife> | |
93 | + \ 0</ProductShelfLife>\n<InternalShelfLife> 0</InternalShelfLife>\n<AltMethodFlag/>\n<AltSisoFlag/>\n<AltReductionFlag/>\n<WithTaxExpenseType/>\n</InvMaster>\n " | |
94 | + http_version: | |
95 | + recorded_at: Fri, 06 Apr 2018 19:23:24 GMT | |
96 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logon?CompanyId=L&CompanyPassword=&Operator=wland&OperatorPassword=piperita2016 | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '36' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:23:35 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: '5810EEA000F1F04BA915BAF98CA700EE00 ' | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:23:33 GMT | |
36 | +- request: | |
37 | + method: get | |
38 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=COMFND&UserId=5810EEA000F1F04BA915BAF98CA700EE00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMFND.XSD%22%3E%0A%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%3CReturnRows%3E5%3C/ReturnRows%3E%0A%20%20%3CColumns%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%20%20%0A%20%20%3C/Columns%3E%0A%20%20%0A%20%20%20%20%3CWhere%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%3CExpression%3E%0A%20%20%20%20%20%20%20%20%20%20%3COpenBracket%3E(%3C/OpenBracket%3E%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CAndOr%3EAnd%3C/AndOr%3E%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%20%20%20%20%20%20%20%20%3CCondition%3EEQ%3C/Condition%3E%0A%20%20%20%20%20%20%20%20%20%20%3CValue%3E02%3C/Value%3E%0A%20%20%20%20%20%20%20%20%20%20%3CCloseBracket%3E)%3C/CloseBracket%3E%0A%20%20%20%20%20%20%20%20%3C/Expression%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%3C/Where%3E%0A%20%20%0A%20%20%3COrderBy%3E%0A%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%3C/OrderBy%3E%0A%3C/Query%3E%0A | |
39 | + body: | |
40 | + encoding: US-ASCII | |
41 | + string: '' | |
42 | + headers: | |
43 | + User-Agent: | |
44 | + - Syspro/7 RubyBindings/0.1.0 | |
45 | + Content-Type: | |
46 | + - application/x-www-form-urlencoded | |
47 | + Accept-Encoding: | |
48 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
49 | + Accept: | |
50 | + - "*/*" | |
51 | + response: | |
52 | + status: | |
53 | + code: 200 | |
54 | + message: OK | |
55 | + headers: | |
56 | + Content-Length: | |
57 | + - '436' | |
58 | + Content-Type: | |
59 | + - application/octet-stream | |
60 | + Server: | |
61 | + - Microsoft-HTTPAPI/2.0 | |
62 | + Date: | |
63 | + - Fri, 06 Apr 2018 19:23:43 GMT | |
64 | + body: | |
65 | + encoding: UTF-8 | |
66 | + string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05' | |
67 | + Language2='EN' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='7.0.048' | |
68 | + OperatorPrimaryRole=' '>\n<HeaderDetails>\n<TableName>InvMaster</TableName>\n<Columns>\n<Column>StockCode</Column>\n</Columns>\n<OrderBy>\n<Column>StockCode</Column>\n</OrderBy>\n</HeaderDetails>\n<Row>\n<StockCode>02</StockCode>\n</Row>\n<RowsReturned> | |
69 | + \ 1</RowsReturned>\n</InvMaster>\n " | |
70 | + http_version: | |
71 | + recorded_at: Fri, 06 Apr 2018 19:23:41 GMT | |
72 | +recorded_with: VCR 4.0.0 | ... | ... |
1 | +--- | |
2 | +http_interactions: | |
3 | +- request: | |
4 | + method: get | |
5 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logon?CompanyId=L&CompanyPassword=&Operator=wland&OperatorPassword=piperita2016 | |
6 | + body: | |
7 | + encoding: US-ASCII | |
8 | + string: '' | |
9 | + headers: | |
10 | + User-Agent: | |
11 | + - Syspro/7 RubyBindings/0.1.0 | |
12 | + Content-Type: | |
13 | + - application/x-www-form-urlencoded | |
14 | + Accept-Encoding: | |
15 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
16 | + Accept: | |
17 | + - "*/*" | |
18 | + response: | |
19 | + status: | |
20 | + code: 200 | |
21 | + message: OK | |
22 | + headers: | |
23 | + Content-Length: | |
24 | + - '36' | |
25 | + Content-Type: | |
26 | + - application/octet-stream | |
27 | + Server: | |
28 | + - Microsoft-HTTPAPI/2.0 | |
29 | + Date: | |
30 | + - Fri, 06 Apr 2018 19:22:53 GMT | |
31 | + body: | |
32 | + encoding: UTF-8 | |
33 | + string: '989D81EB0B184A499E7AC2E28724EE9000 ' | |
34 | + http_version: | |
35 | + recorded_at: Fri, 06 Apr 2018 19:22:52 GMT | |
36 | +- request: | |
37 | + method: get | |
38 | + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logoff?UserId=989D81EB0B184A499E7AC2E28724EE9000%20%20 | |
39 | + body: | |
40 | + encoding: US-ASCII | |
41 | + string: '' | |
42 | + headers: | |
43 | + User-Agent: | |
44 | + - Syspro/7 RubyBindings/0.1.0 | |
45 | + Content-Type: | |
46 | + - application/x-www-form-urlencoded | |
47 | + Accept-Encoding: | |
48 | + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
49 | + Accept: | |
50 | + - "*/*" | |
51 | + response: | |
52 | + status: | |
53 | + code: 200 | |
54 | + message: OK | |
55 | + headers: | |
56 | + Content-Length: | |
57 | + - '1' | |
58 | + Content-Type: | |
59 | + - application/octet-stream | |
60 | + Server: | |
61 | + - Microsoft-HTTPAPI/2.0 | |
62 | + Date: | |
63 | + - Fri, 06 Apr 2018 19:22:53 GMT | |
64 | + body: | |
65 | + encoding: UTF-8 | |
66 | + string: '0' | |
67 | + http_version: | |
68 | + recorded_at: Fri, 06 Apr 2018 19:22:52 GMT | |
69 | +recorded_with: VCR 4.0.0 | ... | ... |
test/client_test.rb
test/logoff_test.rb
test/logon_test.rb
test/query_test.rb
... | ... | @@ -3,9 +3,19 @@ |
3 | 3 | require 'test_helper' |
4 | 4 | |
5 | 5 | class QueryTest < Minitest::Test |
6 | - def test_query_browse # rubocop:disable Metrics/MethodLength | |
7 | - user_id = Syspro::Logon.logon('wland', 'piperita2016', 'L', '') | |
6 | + extend Minitest::Spec::DSL | |
7 | + before { VCR.insert_cassette name } | |
8 | + after { VCR.eject_cassette } | |
9 | + | |
10 | + let(:username) { 'wland' } | |
11 | + let(:password) { 'piperita2016' } | |
12 | + let(:company) { 'L' } | |
13 | + let(:company_password) { '' } | |
14 | + let(:user_id) do | |
15 | + Syspro::Logon.logon(username, password, company, company_password) | |
16 | + end | |
8 | 17 | |
18 | + def test_query_browse # rubocop:disable Metrics/MethodLength | |
9 | 19 | combrw = Syspro::BusinessObjects::ComBrw.new |
10 | 20 | combrw.browse_name = 'InvMaster' |
11 | 21 | combrw.start_condition = '' |
... | ... | @@ -23,8 +33,6 @@ class QueryTest < Minitest::Test |
23 | 33 | end |
24 | 34 | |
25 | 35 | def test_query_query # rubocop:disable Metrics/MethodLength |
26 | - user_id = Syspro::Logon.logon('wland', 'piperita2016', 'L', '') | |
27 | - | |
28 | 36 | comfnd = Syspro::BusinessObjects::ComFnd.new |
29 | 37 | comfnd.table_name = 'InvMaster' |
30 | 38 | comfnd.return_rows = 5 |
... | ... | @@ -49,8 +57,6 @@ class QueryTest < Minitest::Test |
49 | 57 | end |
50 | 58 | |
51 | 59 | def test_query_fetch |
52 | - user_id = Syspro::Logon.logon('wland', 'piperita2016', 'L', '') | |
53 | - | |
54 | 60 | comfch = Syspro::BusinessObjects::ComFch.new |
55 | 61 | comfch.table_name = 'InvMaster' |
56 | 62 | comfch.key = '02' | ... | ... |
test/test_helper.rb
... | ... | @@ -5,3 +5,14 @@ require 'syspro' |
5 | 5 | |
6 | 6 | require 'pry' |
7 | 7 | require 'minitest/autorun' |
8 | +require 'minitest-vcr' | |
9 | +require 'webmock' | |
10 | + | |
11 | +VCR.configure do |c| | |
12 | + c.cassette_library_dir = 'test/cassettes' | |
13 | + c.hook_into :webmock | |
14 | + # TODO: change passwords and move them to ENV | |
15 | + # c.filter_sensitive_data() { ENV[] } | |
16 | +end | |
17 | + | |
18 | +MinitestVcr::Spec.configure! | ... | ... |