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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2ac29504ad115a369e0253fcada9d104b774abc
4
- data.tar.gz: cddb4e89ca8872941fd28b2a90343d844a10012e
3
+ metadata.gz: 7fe3adc302cb24a2698f659a391904c0059132b1
4
+ data.tar.gz: 4c3511215fe615aebf29cc4cf9f36a94098a6c63
5
5
  SHA512:
6
- metadata.gz: 30f38373cb887677faac653553f5b435c4d7469fc5418b7dd62c0736508459aa261332b472bc265fbee5c08dfe33e7c8e75f44e0327708c20853dde6289e4ee6
7
- data.tar.gz: ce53de1953da87f85284beeb46c5012c48b39969f508ea2ba094a4233920bcb61438e09cb381fd31db7d0fc2b91de1cf151013bf7b8452bdcc4516d6649a3783
6
+ metadata.gz: c63591e4fe1c9d77b7823758890907e41255d7124ad64651eabe41cbf94ba50c1edfc39fe05d4bc6a6c312f923f4edac911fb71e2805890662200c90859cf02e
7
+ data.tar.gz: 9d542fbd6f45d3f9fbfa5a19757d908311de599562562b5f212bf094c8b3a918cae14c63d50b3f619825b757cf36dfe289a92221d3a815fc84eb2195721c32d2
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 3.6.5
2
+ - Expose all attributes for a Location
3
+
1
4
  3.6.4
2
5
  - Expose all attributes for a Plantrip itinerary's legs
3
6
  - Fix overly strict dependencies, per 'gem build' warnings
@@ -59,7 +59,7 @@ module Ratis
59
59
  end
60
60
 
61
61
  def to_hash
62
- keys = [:latitude, :longitude, :name, :area, :address, :startaddr, :endaddr, :address_string, :landmark_id]
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
 
@@ -5,7 +5,7 @@ module Ratis
5
5
  def version
6
6
  @version ||= begin
7
7
 
8
- string = '3.6.4'
8
+ string = '3.6.5'
9
9
 
10
10
  def string.parts
11
11
  split('.').map { |p| p.to_i }
@@ -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 a subset of Location params' do
60
- pending
61
- hash = {
62
- :latitude => '33.5811205',
63
- :longitude => '-112.2989325',
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
@@ -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
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-18 00:00:00.000000000 Z
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