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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 064df0969f562719437960c515e557b247f92781
4
- data.tar.gz: 3d43ab3da80a0ec6edcfb1eecf567ee5bf2d6187
3
+ metadata.gz: 90ab24afed59d4357feb751ccb35708d844fd6e7
4
+ data.tar.gz: 4f9ea43f955032eb54dbf1a0dfc0b6dbfaf3b1cf
5
5
  SHA512:
6
- metadata.gz: 4029542cec61b7a4be2b4e79f721fd7975844905963ff46ea116846a06eb8d7d1b3d411bbd03a21ec7e9dc634da8b44f04e6ae5b436a26a5e415f69664f99fd4
7
- data.tar.gz: 4348728bf67614008a5117681fbf72679b56b61adeedabbc0dcf4eee7696721c1376f807b7fa622bc3ac91064f70f25ba4d7152e8d884242e0670c7ce82d2b95
6
+ metadata.gz: 04dfc62e4582a060e5577f2e4dfa31b7507c8e7b7e8fdccacaa7ecd792b07e3800d76453a02307a93dcec5957b45b8be232902c34b5e8d09700143eaf356f156
7
+ data.tar.gz: 5cc577fd09141b28ea9b4c2ecd1a5d0c0de03fcdaeec0c776953541122e5a505e5a7f69922ed936fc4d13a211b7c57d5e152d38a7373e2bde2ca8da79567c3ca
@@ -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
@@ -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/Oakland Airport" },
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: '0.2'
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: 2010-11-13 00:00:00.000000000 Z
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: []