ratis 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -1
- data/Gemfile.lock +1 -1
- data/lib/ratis/next_bus.rb +8 -5
- data/lib/ratis/version.rb +1 -1
- data/spec/support/vcr_cassettes/Point2Point.yml +25 -25
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
1
|
3.1
|
2
2
|
- The NextBus class was really using the Nextbus2 api call all along. This was pretty confusing, so 2 seperate classes now exist; one for NextBus and NextBus2. This means any code using NextBus prior to 3.1 will break since it was really calling the Nextbus2 api and we've updated it so the class of matching name is calling the matching api method.
|
3
|
-
- Dev dependencies of chronic and rspec-instafail were also added to aid testing
|
3
|
+
- Dev dependencies of chronic and rspec-instafail were also added to aid testing
|
4
|
+
|
5
|
+
3.1.1
|
6
|
+
- spec updates, and general tidy
|
7
|
+
|
8
|
+
3.1.2
|
9
|
+
- NextBus#stop added
|
10
|
+
- Contains info about the stop (:side, :stopid, :heading, :lat, :area, :servicetype, :route, :operator)
|
data/Gemfile.lock
CHANGED
data/lib/ratis/next_bus.rb
CHANGED
@@ -2,10 +2,11 @@ module Ratis
|
|
2
2
|
|
3
3
|
class NextBus
|
4
4
|
|
5
|
-
attr_accessor :runs, :status, :sign, :routetype, :times, :direction
|
5
|
+
attr_accessor :runs, :status, :sign, :routetype, :times, :direction, :stop
|
6
6
|
|
7
|
-
def initialize(service, _runs = [])
|
7
|
+
def initialize(service, _runs = [], _stop = {})
|
8
8
|
@runs = _runs
|
9
|
+
@stop = _stop
|
9
10
|
|
10
11
|
@status = service[:status]
|
11
12
|
@sign = service[:sign]
|
@@ -36,9 +37,11 @@ module Ratis
|
|
36
37
|
'Type' => type }
|
37
38
|
return [] unless response.success?
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
stop = response.body[:nextbus_response][:atstop]
|
41
|
+
service = stop.delete(:service)
|
42
|
+
runs = service.delete(:tripinfo)
|
43
|
+
|
44
|
+
NextBus.new service, runs, stop
|
42
45
|
end
|
43
46
|
|
44
47
|
# Gets description of first stop
|
data/lib/ratis/version.rb
CHANGED
@@ -24,10 +24,10 @@ http_interactions:
|
|
24
24
|
- "*/*"
|
25
25
|
Soapaction:
|
26
26
|
- "\"PX_WEB#Point2point\""
|
27
|
-
Content-Length:
|
28
|
-
- "576"
|
29
27
|
Content-Type:
|
30
28
|
- text/xml;charset=UTF-8
|
29
|
+
Content-Length:
|
30
|
+
- "576"
|
31
31
|
response:
|
32
32
|
status:
|
33
33
|
code: 302
|
@@ -35,12 +35,12 @@ http_interactions:
|
|
35
35
|
headers:
|
36
36
|
Connection:
|
37
37
|
- Keep-Alive
|
38
|
-
Server:
|
39
|
-
- BigIP
|
40
38
|
Location:
|
41
39
|
- http://www.iana.org/domains/example/
|
42
40
|
Content-Length:
|
43
41
|
- "0"
|
42
|
+
Server:
|
43
|
+
- BigIP
|
44
44
|
body:
|
45
45
|
base64_string: ""
|
46
46
|
http_version:
|
@@ -51,28 +51,28 @@ http_interactions:
|
|
51
51
|
body:
|
52
52
|
base64_string: |
|
53
53
|
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48ZW52OkVu
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
dmVsb3BlIHhtbG5zOndzZGw9IlBYX1dFQiIgeG1sbnM6eHNkPSJodHRwOi8v
|
55
|
+
d3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8v
|
56
|
+
d3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6ZW52
|
57
|
+
PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+
|
58
58
|
PGVudjpCb2R5PjxQb2ludDJwb2ludCB4bWxucz0iUFhfV0VCIj48T3JpZ2lu
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
bG9uZz4tMTEyLjA5NzkwMzwvT3JpZ2lubG9uZz48RGVzdGluYXRpb25sYXQ+
|
60
|
+
MzMuNDQ3MDk4PC9EZXN0aW5hdGlvbmxhdD48RGF0ZT4wNi8wNi8yMDEzPC9E
|
61
|
+
YXRlPjxSb3V0ZXNvbmx5Plk8L1JvdXRlc29ubHk+PERlc3RpbmF0aW9ubG9u
|
62
|
+
Zz4tMTEyLjA3NzIxMzwvRGVzdGluYXRpb25sb25nPjxTdGFydHRpbWU+MTcw
|
63
|
+
MDwvU3RhcnR0aW1lPjxFbmR0aW1lPjE4MDA8L0VuZHRpbWU+PFJvdXRlcz4x
|
64
|
+
PC9Sb3V0ZXM+PE9yaWdpbmxhdD4zMy40NDY5MzE8L09yaWdpbmxhdD48L1Bv
|
65
65
|
aW50MnBvaW50PjwvZW52OkJvZHk+PC9lbnY6RW52ZWxvcGU+
|
66
66
|
|
67
67
|
headers:
|
68
|
-
Accept:
|
69
|
-
- "*/*"
|
70
68
|
Soapaction:
|
71
69
|
- "\"PX_WEB#Point2point\""
|
72
|
-
|
73
|
-
- "
|
70
|
+
Accept:
|
71
|
+
- "*/*"
|
74
72
|
Content-Type:
|
75
73
|
- text/xml;charset=UTF-8
|
74
|
+
Content-Length:
|
75
|
+
- "576"
|
76
76
|
response:
|
77
77
|
status:
|
78
78
|
code: 200
|
@@ -80,16 +80,16 @@ http_interactions:
|
|
80
80
|
headers:
|
81
81
|
Connection:
|
82
82
|
- close
|
83
|
-
Server:
|
84
|
-
- Apache/2.2.3 (CentOS)
|
85
|
-
Date:
|
86
|
-
- Thu, 06 Jun 2013 19:05:58 GMT
|
87
83
|
Soapserver:
|
88
84
|
- SOAP::Lite/Perl/0.55
|
89
|
-
|
90
|
-
-
|
85
|
+
Date:
|
86
|
+
- Thu, 06 Jun 2013 19:24:21 GMT
|
91
87
|
Content-Type:
|
92
88
|
- text/xml; charset=utf-8
|
89
|
+
Content-Length:
|
90
|
+
- "4558"
|
91
|
+
Server:
|
92
|
+
- Apache/2.2.3 (CentOS)
|
93
93
|
body:
|
94
94
|
base64_string: |
|
95
95
|
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48U09BUC1F
|
@@ -196,5 +196,5 @@ http_interactions:
|
|
196
196
|
RU5WOkVudmVsb3BlPg==
|
197
197
|
|
198
198
|
http_version:
|
199
|
-
recorded_at: Thu, 06 Jun 2013 19:
|
199
|
+
recorded_at: Thu, 06 Jun 2013 19:24:21 GMT
|
200
200
|
recorded_with: VCR 2.4.0
|
metadata
CHANGED