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 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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ratis (3.1.0)
4
+ ratis (3.1.1)
5
5
  savon (< 2.0)
6
6
 
7
7
  GEM
@@ -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
- service = response.body[:nextbus_response][:atstop][:service]
40
- runs = response.to_array :nextbus_response, :atstop, :service, :tripinfo
41
- NextBus.new service, runs
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
@@ -5,7 +5,7 @@ module Ratis
5
5
  def version
6
6
  @version ||= begin
7
7
 
8
- string = '3.1.1'
8
+ string = '3.1.2'
9
9
 
10
10
  def string.parts
11
11
  split('.').map { |p| p.to_i }
@@ -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
- dmVsb3BlIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxT
55
- Y2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxT
56
- Y2hlbWEtaW5zdGFuY2UiIHhtbG5zOmVudj0iaHR0cDovL3NjaGVtYXMueG1s
57
- c29hcC5vcmcvc29hcC9lbnZlbG9wZS8iIHhtbG5zOndzZGw9IlBYX1dFQiI+
54
+ dmVsb3BlIHhtbG5zOndzZGw9IlBYX1dFQiIgeG1sbnM6eHNkPSJodHRwOi8v
55
+ d3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8v
56
+ d3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6ZW52
57
+ PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+
58
58
  PGVudjpCb2R5PjxQb2ludDJwb2ludCB4bWxucz0iUFhfV0VCIj48T3JpZ2lu
59
- bG9uZz4tMTEyLjA5NzkwMzwvT3JpZ2lubG9uZz48Um91dGVzPjE8L1JvdXRl
60
- cz48Um91dGVzb25seT5ZPC9Sb3V0ZXNvbmx5PjxEYXRlPjA2LzA2LzIwMTM8
61
- L0RhdGU+PERlc3RpbmF0aW9ubGF0PjMzLjQ0NzA5ODwvRGVzdGluYXRpb25s
62
- YXQ+PE9yaWdpbmxhdD4zMy40NDY5MzE8L09yaWdpbmxhdD48U3RhcnR0aW1l
63
- PjE3MDA8L1N0YXJ0dGltZT48RW5kdGltZT4xODAwPC9FbmR0aW1lPjxEZXN0
64
- aW5hdGlvbmxvbmc+LTExMi4wNzcyMTM8L0Rlc3RpbmF0aW9ubG9uZz48L1Bv
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
- Content-Length:
73
- - "576"
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
- Content-Length:
90
- - "4558"
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:05:58 GMT
199
+ recorded_at: Thu, 06 Jun 2013 19:24:21 GMT
200
200
  recorded_with: VCR 2.4.0
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratis
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
- - 1
10
- version: 3.1.1
9
+ - 2
10
+ version: 3.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Burst Software