atco 1.0.3 → 1.0.5

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: 59b747dbf14f2f4ab07ca86c8344fda6294efbf4d7b83cdd11fcfa45a9e4961b
4
- data.tar.gz: 276916993eae21683270e35ba8d4d167820eb2ae65dd410ab535f94a7ba50134
3
+ metadata.gz: 7415f66d4eafb4428737b275baca8471a43e0f03863ca2705cbebe2124312129
4
+ data.tar.gz: 27043e632b025a4084d6666c145787bb6acf53b878675ce525b2946bbd5c8d30
5
5
  SHA512:
6
- metadata.gz: 54cf093ae098cc2fbc2b38067ffeeec9fa7a513107b00a4cb7822b8c0b65e273b016be3465dffed59403a9f88ce9f4cfb3c750236fb8c1354ffa9347511b26ca
7
- data.tar.gz: 92c5635e38a717f4ba9f0e036d081463b4d84bb5bd3d1788d99b191b54e8bcd09f6a44bc114f5495302a191fc47b8887f8c97934696c7a5b6f3ad9d6217fc544
6
+ metadata.gz: 210d0f52a29cc65760d3445b829430c9018ce18d429658bc5311caa8e1279af96f9fc03b0a369f8c5ea251373e2fdeea9152fc6ee964631a4ef1085bdcff1b7e
7
+ data.tar.gz: 8dad485652657476d6d00a5c1203d599cc8560091737712aef3a0728da39ffa585df94a580c7b80f5b6aaf5fb5cb5e92e157928ee5d9e415a6f33ccfacad4ab1
data/README.md CHANGED
@@ -35,3 +35,9 @@ result = Atco.parse('SVRTMAO009A-20091005.cif) # an example data file in the rep
35
35
  journies: {…}
36
36
  }
37
37
  ```
38
+
39
+ ### Author & Contributors
40
+
41
+ The `ATCO-CIF` Ruby library was originally authored by David Rice [@davidjrice](https://github.com/davidjrice) in response to an FOI request to [Translink](https://www.translink.co.uk) for there timetable data as part of an [OpenDataNI](https://admin.opendatani.gov.uk) initiative.
42
+
43
+ See [CONTRIBUTORS.md](http://github.com/davidjrice/atco/blob/master/CONTRIBUTORS.md)
data/lib/atco/stop.rb CHANGED
@@ -3,7 +3,12 @@
3
3
  module Atco
4
4
  # Atco::Stop is a class to abstract ATCO-CIF Origin, Intermediate and Destination (Stop) records.
5
5
  class Stop
6
- attr_accessor :bay_number, :location, :timing_point_indicator, :fare_stage_indicator, :published_departure_time,
6
+ attr_accessor :bay_number,
7
+ :location,
8
+ :timing_point_indicator,
9
+ :fare_stage_indicator,
10
+ :published_arrival_time,
11
+ :published_departure_time,
7
12
  :record_identity
8
13
 
9
14
  def origin?
@@ -23,6 +28,7 @@ module Atco
23
28
  @location = data[:location]
24
29
  @timing_point_indicator = data[:timing_point_indicator]
25
30
  @fare_stage_indicator = data[:fare_stage_indicator]
31
+ @published_arrival_time = data[:published_arrival_time]
26
32
  @published_departure_time = data[:published_departure_time]
27
33
  @record_identity = data[:record_identity]
28
34
  end
@@ -31,6 +37,7 @@ module Atco
31
37
  {
32
38
  record_identity: @record_identity,
33
39
  location: @location,
40
+ published_arrival_time: @published_arrival_time,
34
41
  published_departure_time: @published_departure_time,
35
42
  timing_point_indicator: @timing_point_indicator,
36
43
  fare_stage_indicator: @fare_stage_indicator,
data/lib/atco/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Atco
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.5"
5
5
  end
data/lib/atco.rb CHANGED
@@ -70,7 +70,7 @@ module Atco # rubocop:disable Metrics/ModuleLength
70
70
  end
71
71
  objects << object
72
72
  rescue UnidentifiedRecordError
73
- unparsed << {line: line, line_number: line_number}
73
+ unparsed << { line: line, line_number: line_number }
74
74
  next
75
75
  end
76
76
  end
data/spec/atco_spec.rb CHANGED
@@ -200,18 +200,21 @@ RSpec.describe Atco do # rubocop:disable Metrics/BlockLength
200
200
  end
201
201
 
202
202
  it "should not parse GS records" do
203
- expect(@atco[:unparsed][0]).to eq({
204
- line: "GS00001433 N Belfast Metro Ops 7000\n",
205
- line_number: 3
206
- })
203
+ expect(@atco[:unparsed][0]).to eq(
204
+ {
205
+ line: "GS00001433 N Belfast Metro Ops 7000\n",
206
+ line_number: 3
207
+ }
208
+ )
207
209
  end
208
210
 
209
211
  it "should not parse GR records" do
210
- expect(@atco[:unparsed][1]).to eq({
211
- line: "GR00001433Donegall Square East 7000\n",
212
- line_number: 4
213
- })
212
+ expect(@atco[:unparsed][1]).to eq(
213
+ {
214
+ line: "GR00001433Donegall Square East 7000\n", # rubocop:disable Layout/LineLength
215
+ line_number: 4
216
+ }
217
+ )
214
218
  end
215
-
216
219
  end
217
220
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atco
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rice