muni 0.0.3 → 0.0.4
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.
- data/README.md +6 -0
- data/lib/muni/base.rb +3 -2
- data/lib/muni/direction.rb +1 -1
- data/lib/muni/route.rb +1 -1
- data/lib/muni/version.rb +1 -1
- data/muni.gemspec +0 -1
- data/spec/direction_spec.rb +27 -0
- metadata +4 -18
data/README.md
CHANGED
@@ -46,3 +46,9 @@ Tasks:
|
|
46
46
|
muni predict [ROUTE] [DIRECTION] [STOP] # Retrieve predictions for a route at a specific stop
|
47
47
|
muni show [ROUTE_TAG] [DIRECTION] # Shows a specifc route by name
|
48
48
|
```
|
49
|
+
|
50
|
+
Contributors
|
51
|
+
============
|
52
|
+
|
53
|
+
* [@jeffremer](https://github.com/jeffremer) (maintainer)
|
54
|
+
* [@gregorym](https://github.com/gregorym)
|
data/lib/muni/base.rb
CHANGED
data/lib/muni/direction.rb
CHANGED
data/lib/muni/route.rb
CHANGED
data/lib/muni/version.rb
CHANGED
data/muni.gemspec
CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency "mash"
|
22
21
|
s.add_dependency "xml-simple"
|
23
22
|
s.add_dependency "actionpack"
|
24
23
|
s.add_dependency "amatch"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Muni::Direction do
|
4
|
+
use_vcr_cassette "Muni_Route"
|
5
|
+
|
6
|
+
let(:route) { Muni::Route.find(21) }
|
7
|
+
|
8
|
+
context "#stop_at" do
|
9
|
+
context "given a stop tag" do
|
10
|
+
it "should return the corresponding stop" do
|
11
|
+
stop = route.inbound.stop_at("36497")
|
12
|
+
|
13
|
+
stop.should be_present
|
14
|
+
stop.title.should == "Steuart St & Mission St"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context "given a stop title" do
|
19
|
+
it "should return corresponding stop" do
|
20
|
+
stop = route.inbound.stop_at("Hayes St & Shrader St")
|
21
|
+
|
22
|
+
stop.should be_present
|
23
|
+
stop.title.should == "Hayes St & Shrader St"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: mash
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
14
|
- !ruby/object:Gem::Dependency
|
31
15
|
name: xml-simple
|
32
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -169,6 +153,7 @@ files:
|
|
169
153
|
- muni.gemspec
|
170
154
|
- spec/cassettes/Muni_Route.yml
|
171
155
|
- spec/cassettes/Muni_Stop.yml
|
156
|
+
- spec/direction_spec.rb
|
172
157
|
- spec/route_spec.rb
|
173
158
|
- spec/spec_helper.rb
|
174
159
|
- spec/stop_spec.rb
|
@@ -199,6 +184,7 @@ summary: NextBus San Francisco Muni API Client
|
|
199
184
|
test_files:
|
200
185
|
- spec/cassettes/Muni_Route.yml
|
201
186
|
- spec/cassettes/Muni_Stop.yml
|
187
|
+
- spec/direction_spec.rb
|
202
188
|
- spec/route_spec.rb
|
203
189
|
- spec/spec_helper.rb
|
204
190
|
- spec/stop_spec.rb
|