bart_waiting_list 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bart_waiting_list.gemspec +1 -1
- data/lib/bart_waiting_list.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54bcbd8696048bdafabd57cd96f98311dc4be821
|
4
|
+
data.tar.gz: b02aa2a0aed85adfbf7cb73b08977583cc704324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04696993f3b77416e1198ec930fce8ad2f0075a5c88e2dbfbd48b052fde55ebc13ae934c199579540576abdcbce1b3633806e8c20630275c714cb5e8780bae1b
|
7
|
+
data.tar.gz: 880d11db60b964106e257d6980f0a43938c978feab962f74c0c83692dbb356cd00d134ecbb98cfda2c571a04bd4beda331a44a34c7a0afe101940f227c713f5b
|
data/bart_waiting_list.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'bart_waiting_list'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.4'
|
8
8
|
spec.authors = ["Brian O'Keefe"]
|
9
9
|
spec.email = ['brian@bokstuff.com']
|
10
10
|
spec.summary = %q{Get data from the BART select-a-spot waiting list page}
|
data/lib/bart_waiting_list.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'mechanize'
|
2
2
|
require 'yaml'
|
3
3
|
|
4
|
+
STATIONS_FILE = File.expand_path "#{__FILE__}/../../stations.yaml"
|
5
|
+
|
4
6
|
HOME_URL = 'https://www.select-a-spot.com/bart/'
|
5
7
|
WAITING_LIST_URL = 'https://www.select-a-spot.com/bart/waiting_lists/'
|
6
8
|
|
@@ -50,7 +52,7 @@ class BartWaitingList
|
|
50
52
|
def get_station_name(station)
|
51
53
|
station_names = {}
|
52
54
|
|
53
|
-
YAML.load_file(
|
55
|
+
YAML.load_file(STATIONS_FILE).each do |key, value|
|
54
56
|
station_names[key.to_sym] = value
|
55
57
|
end
|
56
58
|
|