lothianbusestimetable 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/lothianbusestimetable.rb +3 -6
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b7bf8aeef769426238502b70bc808bb96258991
|
4
|
+
data.tar.gz: 5b873a112b7ef446268c1dc70d09bba89d2f0f3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e32b9855b1cdd5cfe12802edd4d029d3ce04c0363676a32ab47a4ea6fa04510326c95a43e77c1d0dd13c1105c7a63b3c78a0b195fd0609bc592d16ecf12c684
|
7
|
+
data.tar.gz: ec151da37d9a6c8555be33edc9d0301d1c11f30c1ff91d178bd3e7ebb628ddb3082d668b6325a87e6aead2f9aeadfa7f6943c4307a9340df4b4a3842ba7feef7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -122,8 +122,6 @@ class LothianBusesTimetable
|
|
122
122
|
h = a0.shift
|
123
123
|
master[:sunday][:outbound] = h
|
124
124
|
|
125
|
-
# note: the special character looks like a space
|
126
|
-
# but is in fact " ".ord #=> 160
|
127
125
|
|
128
126
|
master.to_a[1..-1].each do |key, timetable|
|
129
127
|
|
@@ -132,10 +130,10 @@ class LothianBusesTimetable
|
|
132
130
|
# find the interval gaps
|
133
131
|
|
134
132
|
a = printed_rows.to_a
|
135
|
-
index = a.index a.detect {|x| x.last.grep(/^
|
133
|
+
index = a.index a.detect {|x| x.last.grep(/^ $/).any? }
|
136
134
|
a2 = a[index].last
|
137
135
|
|
138
|
-
gaps = a2.map.with_index.select {|x,i| x == "
|
136
|
+
gaps = a2.map.with_index.select {|x,i| x == " "}.map(&:last)
|
139
137
|
|
140
138
|
gaps.delete_at -1 if gaps.last >= a2.length - 1
|
141
139
|
|
@@ -219,5 +217,4 @@ class LothianBusesTimetable
|
|
219
217
|
@timetable = master
|
220
218
|
|
221
219
|
end
|
222
|
-
end
|
223
|
-
|
220
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lothianbusestimetable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version: '0.3'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.3.
|
45
|
+
version: 0.3.2
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
version: '0.3'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.3.
|
55
|
+
version: 0.3.2
|
56
56
|
description:
|
57
57
|
email: james@jamesrobertson.eu
|
58
58
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|