octranspo 0.0.1 → 0.0.2

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octranspo (0.0.0)
4
+ octranspo (0.0.2)
5
5
  activesupport (>= 2.3.5)
6
6
  hpricot
7
7
  htmlentities
@@ -13,6 +13,7 @@ module OCTranspo
13
13
  autoload :RemoteResourceMethods, "octranspo/remote_resource_methods"
14
14
  autoload :Route, "octranspo/route"
15
15
  autoload :ServiceDate, "octranspo/service_date"
16
+ autoload :Station, "octranspo/station"
16
17
  autoload :Stop, "octranspo/stop"
17
18
  autoload :StopResource, "octranspo/stop_resource"
18
19
  autoload :VERSION, "octranspo/version"
@@ -0,0 +1,9 @@
1
+ module OCTranspo
2
+ module Station
3
+ extend self
4
+
5
+ def all
6
+ @stations ||= YAML.load_file "#{File.dirname(__FILE__)}/stations.yml"
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module OCTranspo
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,13 @@
1
+ require "#{File.dirname(File.dirname(__FILE__))}/test_helper"
2
+
3
+ module OCTranspo
4
+ class StationTest < ActiveSupport::TestCase
5
+
6
+ test "list of all stations" do
7
+ stations = OCTranspo::Station.all
8
+ assert stations.any?
9
+ assert stations.all? {|s| s["name"] }, "Some stations are missing names"
10
+ assert stations.all? {|s| s["number"] }, "Some stations are missing numbers"
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octranspo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Craig Davey
@@ -119,6 +119,7 @@ files:
119
119
  - lib/octranspo/route.rb
120
120
  - lib/octranspo/routes.yml
121
121
  - lib/octranspo/service_date.rb
122
+ - lib/octranspo/station.rb
122
123
  - lib/octranspo/stations.yml
123
124
  - lib/octranspo/stop.rb
124
125
  - lib/octranspo/stop_resource.rb
@@ -169,6 +170,7 @@ files:
169
170
  - test/unit/mobile_route_schedule_test.rb
170
171
  - test/unit/mobile_stop_schedule_test.rb
171
172
  - test/unit/service_date_test.rb
173
+ - test/unit/station_test.rb
172
174
  - test/unit/stop_resource_test.rb
173
175
  homepage: http://github.com/craigdavey/octranspo
174
176
  licenses: []
@@ -248,4 +250,5 @@ test_files:
248
250
  - test/unit/mobile_route_schedule_test.rb
249
251
  - test/unit/mobile_stop_schedule_test.rb
250
252
  - test/unit/service_date_test.rb
253
+ - test/unit/station_test.rb
251
254
  - test/unit/stop_resource_test.rb