national_rail_wrapper 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51437140b30b89c764fa6c109d77d4cd297461c52fde30293e90f67d572ee0ac
4
- data.tar.gz: aa1b0c7213f92e622391efbaf9d8adb35628b5517e0d1576789f5ad8e299ff17
3
+ metadata.gz: 8f7582b3bfd8354d6a4715526e4b5ad3d2bf362bb51d5dfc53370f014ffd99ca
4
+ data.tar.gz: a1c69ad65fda48c252af898f6a3435c8d79c25bae6357a06018c9742217df1e3
5
5
  SHA512:
6
- metadata.gz: b56172b92d537b53e7db54ea661cae240179b161253f891c80a5eae0154e6c65b1509480ef54f6418f10ef87096a19d2a9f5af611224fddab7afa328012f45ac
7
- data.tar.gz: fd11583390c172b1d11887f3670b1246c872204e46d0f37a68fe9b6e86a3cd2c1e436bc25eced96c1746477ae6933d344fef2e63f4472300ff6598ef5a1b74e3
6
+ metadata.gz: 4b74af511d5ede8f886bddb60b96b9b8f30fafafa5b56eabc2443933d2d25e27d05e3290fa86d5b442d1cf00786a89e4e9ce43bcb5ac879bc38f5ada5c697ba3
7
+ data.tar.gz: 16942aac3b1029de083ce8305e1d5653fa944c5883726320b4b187ea9018eb4219ac5b6cf009ddf0343f95cc94cfeceeb0e876599b3c1345b249cd39ea9ef5b7
@@ -11,21 +11,17 @@ module NationalRailWrapper
11
11
  options = Nokogiri::XML::ParseOptions.new.nonet.noent.noblanks.huge
12
12
  doc = Nokogiri::XML.parse(@data, nil, nil, options)
13
13
 
14
- doc.xpath('/xmlns:StationList/xmlns:Station').map do |toc_node|
14
+ doc.xpath('/xmlns:TrainOperatingCompanyList/xmlns:TrainOperatingCompany').map do |toc_node|
15
15
  {
16
- name: toc_node.xpath('./xmlns:Name')&.text,
17
- crs_code: toc_node.css('CrsCode')&.text,
18
- alternative_identifiers: toc_node.css('AlternativeIdentifiers')&.text,
19
- sixteen_character_name: toc_node.css('SixteenCharacterName')&.text,
20
- longitude: toc_node.css('Longitude')&.text,
21
- latitude: toc_node.css('Latitude')&.text,
22
- station_operator: toc_node.css('StationOperator')&.text,
23
- staffing_level: toc_node.css('Staffing/StaffingLevel')&.text,
24
- closed_circuit_television: toc_node.css('Staffing/ClosedCircuitTelevision')&.text,
25
- station_facilities: station_facilities(toc_node.css('StationFacilities')),
26
- # impaired_access: impaired_access(toc_node.css('ImpairedAccess'))
27
- car_park: car_park(toc_node.css('CarPark'))
28
-
16
+ name: toc_node.css('Name')&.text,
17
+ atoc_code: toc_node.css('AtocCode')&.text,
18
+ atoc_member: toc_node.css('AtocMember')&.text,
19
+ legal_name: toc_node.css('LegalName')&.text,
20
+ station_operator: toc_node.css('LegalName')&.text,
21
+ managing_director: toc_node.css('ManagingDirector')&.text,
22
+ logo: toc_node.css('Logo')&.text,
23
+ network_map: toc_node.css('NetworkMap')&.text,
24
+ company_website: toc_node.css('CompanyWebsite')&.text
29
25
  }
30
26
  end
31
27
  end
@@ -1,3 +1,3 @@
1
1
  module NationalRailWrapper
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: national_rail_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Best
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-21 00:00:00.000000000 Z
11
+ date: 2020-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus