bart 0.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bart/estimate.rb +4 -1
- data/lib/bart/station/list.rb +2 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90ab24afed59d4357feb751ccb35708d844fd6e7
|
4
|
+
data.tar.gz: 4f9ea43f955032eb54dbf1a0dfc0b6dbfaf3b1cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04dfc62e4582a060e5577f2e4dfa31b7507c8e7b7e8fdccacaa7ecd792b07e3800d76453a02307a93dcec5957b45b8be232902c34b5e8d09700143eaf356f156
|
7
|
+
data.tar.gz: 5cc577fd09141b28ea9b4c2ecd1a5d0c0de03fcdaeec0c776953541122e5a505e5a7f69922ed936fc4d13a211b7c57d5e152d38a7373e2bde2ca8da79567c3ca
|
data/lib/bart/estimate.rb
CHANGED
@@ -3,7 +3,7 @@ require 'nokogiri'
|
|
3
3
|
module Bart
|
4
4
|
class Estimate
|
5
5
|
|
6
|
-
attr_reader :minutes, :platform, :direction, :length
|
6
|
+
attr_reader :minutes, :platform, :direction, :length, :color, :hexcolor, :bikeflag
|
7
7
|
|
8
8
|
def initialize(xml)
|
9
9
|
document = Nokogiri::XML.parse(xml)
|
@@ -12,6 +12,9 @@ module Bart
|
|
12
12
|
@platform = document.css('platform').text.to_i
|
13
13
|
@direction = document.css('direction').text
|
14
14
|
@length = document.css('length').text.to_i
|
15
|
+
@color = document.css('color').text
|
16
|
+
@hexcolor = document.css('hexcolor').text
|
17
|
+
@bikeflag = document.css('bikeflag').text.to_i == 1
|
15
18
|
end
|
16
19
|
|
17
20
|
def seconds
|
data/lib/bart/station/list.rb
CHANGED
@@ -12,7 +12,7 @@ module Bart
|
|
12
12
|
{ :id => "bayf", :name => "Bay Fair (San Leandro)" },
|
13
13
|
{ :id => "cast", :name => "Castro Valley" },
|
14
14
|
{ :id => "civc", :name => "Civic Center (SF)" },
|
15
|
-
{ :id => "cols", :name => "Coliseum
|
15
|
+
{ :id => "cols", :name => "Coliseum" },
|
16
16
|
{ :id => "colm", :name => "Colma" },
|
17
17
|
{ :id => "conc", :name => "Concord" },
|
18
18
|
{ :id => "daly", :name => "Daly City" },
|
@@ -32,6 +32,7 @@ module Bart
|
|
32
32
|
{ :id => "mont", :name => "Montgomery St. (SF)" },
|
33
33
|
{ :id => "nbrk", :name => "North Berkeley" },
|
34
34
|
{ :id => "ncon", :name => "North Concord/Martinez" },
|
35
|
+
{ :id => "oakl", :name => "Oakland Int'l Airport" },
|
35
36
|
{ :id => "orin", :name => "Orinda" },
|
36
37
|
{ :id => "pitt", :name => "Pittsburg/Bay Point" },
|
37
38
|
{ :id => "phil", :name => "Pleasant Hill" },
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lubaway
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -38,6 +38,34 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
41
69
|
description: Access the Bay Area Rapid Transit API in Ruby.
|
42
70
|
email: josh.lubaway@gmail.com
|
43
71
|
executables: []
|