national_rail_wrapper 0.1.5 → 0.1.6
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f7582b3bfd8354d6a4715526e4b5ad3d2bf362bb51d5dfc53370f014ffd99ca
|
4
|
+
data.tar.gz: a1c69ad65fda48c252af898f6a3435c8d79c25bae6357a06018c9742217df1e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
14
|
+
doc.xpath('/xmlns:TrainOperatingCompanyList/xmlns:TrainOperatingCompany').map do |toc_node|
|
15
15
|
{
|
16
|
-
name: toc_node.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2020-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|