ratis 3.6.4 → 3.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/ratis/location.rb +1 -1
- data/lib/ratis/version.rb +1 -1
- data/spec/ratis/location_spec.rb +9 -17
- data/spec/support/vcr_cassettes/Ratis_Location/_to_hash/returns_a_subset_of_Location_params.yml +54 -0
- data/spec/support/vcr_cassettes/Ratis_Location/_to_hash/returns_all_params.yml +54 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fe3adc302cb24a2698f659a391904c0059132b1
|
4
|
+
data.tar.gz: 4c3511215fe615aebf29cc4cf9f36a94098a6c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c63591e4fe1c9d77b7823758890907e41255d7124ad64651eabe41cbf94ba50c1edfc39fe05d4bc6a6c312f923f4edac911fb71e2805890662200c90859cf02e
|
7
|
+
data.tar.gz: 9d542fbd6f45d3f9fbfa5a19757d908311de599562562b5f212bf094c8b3a918cae14c63d50b3f619825b757cf36dfe289a92221d3a815fc84eb2195721c32d2
|
data/CHANGELOG
CHANGED
data/lib/ratis/location.rb
CHANGED
@@ -59,7 +59,7 @@ module Ratis
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def to_hash
|
62
|
-
keys = [:latitude, :longitude, :
|
62
|
+
keys = [:name, :area, :areacode, :region, :zipname, :latitude, :longitude, :address, :address_string, :landmark_id, :responsecode, :startaddr, :endaddr, :startlatitude, :startlongitude, :endlatitude, :endlongitude]
|
63
63
|
Hash[keys.map { |k| [k, send(k)] }]
|
64
64
|
end
|
65
65
|
|
data/lib/ratis/version.rb
CHANGED
data/spec/ratis/location_spec.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Ratis::Location do
|
4
|
+
let(:conditions) { { :location => '1315 W. Straford Dr.', :media => 'W' } }
|
5
|
+
|
4
6
|
describe '#where', vcr: {} do
|
5
|
-
let(:conditions) { { :location => '1315 W. Straford Dr.', :media => 'W' } }
|
6
7
|
|
7
8
|
it 'only makes one request' do
|
8
9
|
# false just to stop further processing of response
|
@@ -55,21 +56,12 @@ describe Ratis::Location do
|
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
58
|
-
describe '#to_hash' do
|
59
|
-
it 'returns
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
:name => 'W PENNSYLVANIA AVE',
|
65
|
-
:area => 'Youngtown',
|
66
|
-
:address => '',
|
67
|
-
:startaddr => '11105',
|
68
|
-
:endaddr => '11111',
|
69
|
-
:address_string => '11105 - 11111 W PENNSYLVANIA AVE (in Youngtown)',
|
70
|
-
:landmark_id => '0' }
|
71
|
-
|
72
|
-
HashDiff.diff(@first_location.to_hash, hash).should eql []
|
59
|
+
describe '#to_hash', vcr: {} do
|
60
|
+
it 'returns all params' do
|
61
|
+
params = [:name, :area, :areacode, :region, :zipname, :latitude, :longitude, :address, :address_string, :landmark_id, :responsecode, :startaddr, :endaddr, :startlatitude, :startlongitude, :endlatitude, :endlongitude]
|
62
|
+
locations = Ratis::Location.where(conditions.dup)
|
63
|
+
|
64
|
+
expect(locations.first.to_hash.keys.to_set).to eql params.to_set
|
73
65
|
end
|
74
66
|
|
75
67
|
end
|
@@ -85,4 +77,4 @@ describe Ratis::Location do
|
|
85
77
|
pending
|
86
78
|
end
|
87
79
|
end
|
88
|
-
end
|
80
|
+
end
|
data/spec/support/vcr_cassettes/Ratis_Location/_to_hash/returns_a_subset_of_Location_params.yml
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://soap.valleymetro.org/cgi-bin-soap-web-271/soap.cgi
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="PX_WEB"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><Locate xmlns="PX_WEB"><Location>1315
|
11
|
+
W. Straford Dr.</Location><Area xsi:nil="true"/><Region xsi:nil="true"/><Maxanswers>20</Maxanswers><Media>W</Media><Appid>ratis-specs</Appid></Locate></env:Body></env:Envelope>
|
12
|
+
headers:
|
13
|
+
Soapaction:
|
14
|
+
- '"PX_WEB#Locate"'
|
15
|
+
Content-Type:
|
16
|
+
- text/xml;charset=UTF-8
|
17
|
+
Content-Length:
|
18
|
+
- '449'
|
19
|
+
Accept-Encoding:
|
20
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
+
Accept:
|
22
|
+
- '*/*'
|
23
|
+
User-Agent:
|
24
|
+
- Ruby
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 200
|
28
|
+
message: OK
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Wed, 26 Nov 2014 22:12:48 GMT
|
32
|
+
Server:
|
33
|
+
- Apache/2.2.3 (CentOS)
|
34
|
+
Soapserver:
|
35
|
+
- SOAP::Lite/Perl/0.55
|
36
|
+
Content-Length:
|
37
|
+
- '1162'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Content-Type:
|
41
|
+
- text/xml; charset=utf-8
|
42
|
+
body:
|
43
|
+
encoding: UTF-8
|
44
|
+
string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><SOAP-ENV:Envelope xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\"
|
45
|
+
xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"
|
46
|
+
xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><SOAP-ENV:Body><namesp1:LocateResponse
|
47
|
+
xmlns:namesp1=\"PX_WEB\">\n\t<Responsecode>ok</Responsecode>\n\t<Version>1.14</Version>\n\t<Hint>1</Hint>\n\t<Projection>SP</Projection>\n\t<Locationtype>A</Locationtype>\n\t<Location>\n\t\t<Name>W
|
48
|
+
STRAFORD DR</Name>\n\t\t<Area>Chandler</Area>\n\t\t<Areacode>CH</Areacode>\n\t\t<Region>1</Region>\n\t\t<Zipname>85224
|
49
|
+
- Chandler</Zipname>\n\t\t<Latitude>33.353202</Latitude>\n\t\t<Longitude>-111.864902</Longitude>\n\t\t<Address>1315</Address>\n\t\t<Landmarkid>0</Landmarkid>\n\t</Location>\n\t<Appid>ratis-specs</Appid>\n\t<Requestor>98.174.226.185</Requestor>\n\t<Host>s-rpta-soap</Host>\n\t<Copyright>XML
|
50
|
+
schema Copyright (c) 2003-2014 Trapeze Software ULC, its subsidiaries and
|
51
|
+
affiliates. All rights reserved.</Copyright>\n\t<Soapversion>2.7.3 - 11/20/14</Soapversion>\n</namesp1:LocateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"
|
52
|
+
http_version:
|
53
|
+
recorded_at: Wed, 26 Nov 2014 22:12:49 GMT
|
54
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://soap.valleymetro.org/cgi-bin-soap-web-271/soap.cgi
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="PX_WEB"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><Locate xmlns="PX_WEB"><Location>1315
|
11
|
+
W. Straford Dr.</Location><Area xsi:nil="true"/><Region xsi:nil="true"/><Maxanswers>20</Maxanswers><Media>W</Media><Appid>ratis-specs</Appid></Locate></env:Body></env:Envelope>
|
12
|
+
headers:
|
13
|
+
Soapaction:
|
14
|
+
- '"PX_WEB#Locate"'
|
15
|
+
Content-Type:
|
16
|
+
- text/xml;charset=UTF-8
|
17
|
+
Content-Length:
|
18
|
+
- '449'
|
19
|
+
Accept-Encoding:
|
20
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
+
Accept:
|
22
|
+
- '*/*'
|
23
|
+
User-Agent:
|
24
|
+
- Ruby
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 200
|
28
|
+
message: OK
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Wed, 26 Nov 2014 22:14:26 GMT
|
32
|
+
Server:
|
33
|
+
- Apache/2.2.3 (CentOS)
|
34
|
+
Soapserver:
|
35
|
+
- SOAP::Lite/Perl/0.55
|
36
|
+
Content-Length:
|
37
|
+
- '1162'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Content-Type:
|
41
|
+
- text/xml; charset=utf-8
|
42
|
+
body:
|
43
|
+
encoding: UTF-8
|
44
|
+
string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><SOAP-ENV:Envelope xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\"
|
45
|
+
xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"
|
46
|
+
xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><SOAP-ENV:Body><namesp1:LocateResponse
|
47
|
+
xmlns:namesp1=\"PX_WEB\">\n\t<Responsecode>ok</Responsecode>\n\t<Version>1.14</Version>\n\t<Hint>1</Hint>\n\t<Projection>SP</Projection>\n\t<Locationtype>A</Locationtype>\n\t<Location>\n\t\t<Name>W
|
48
|
+
STRAFORD DR</Name>\n\t\t<Area>Chandler</Area>\n\t\t<Areacode>CH</Areacode>\n\t\t<Region>1</Region>\n\t\t<Zipname>85224
|
49
|
+
- Chandler</Zipname>\n\t\t<Latitude>33.353202</Latitude>\n\t\t<Longitude>-111.864902</Longitude>\n\t\t<Address>1315</Address>\n\t\t<Landmarkid>0</Landmarkid>\n\t</Location>\n\t<Appid>ratis-specs</Appid>\n\t<Requestor>98.174.226.185</Requestor>\n\t<Host>s-rpta-soap</Host>\n\t<Copyright>XML
|
50
|
+
schema Copyright (c) 2003-2014 Trapeze Software ULC, its subsidiaries and
|
51
|
+
affiliates. All rights reserved.</Copyright>\n\t<Soapversion>2.7.3 - 11/20/14</Soapversion>\n</namesp1:LocateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"
|
52
|
+
http_version:
|
53
|
+
recorded_at: Wed, 26 Nov 2014 22:14:26 GMT
|
54
|
+
recorded_with: VCR 2.8.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ratis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Velocity Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -354,6 +354,8 @@ files:
|
|
354
354
|
- spec/support/vcr_cassettes/Ratis_LandmarkCategory/_all/should_return_a_collection_of_Ratis_LandmarkCategory_s_.yml
|
355
355
|
- spec/support/vcr_cassettes/Ratis_LandmarkCategory/_all/should_return_all_landmark_categories.yml
|
356
356
|
- spec/support/vcr_cassettes/Ratis_LandmarkCategory/_web_categories/does_something.yml
|
357
|
+
- spec/support/vcr_cassettes/Ratis_Location/_to_hash/returns_a_subset_of_Location_params.yml
|
358
|
+
- spec/support/vcr_cassettes/Ratis_Location/_to_hash/returns_all_params.yml
|
357
359
|
- spec/support/vcr_cassettes/Ratis_Location/_where/only_makes_one_request.yml
|
358
360
|
- spec/support/vcr_cassettes/Ratis_Location/_where/parses_out_fields_correctly.yml
|
359
361
|
- spec/support/vcr_cassettes/Ratis_Location/_where/should_return_a_collection_of_Ratis_Location_s_.yml
|