ratis 2.5.2.7 → 2.5.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/ratis.rb +5 -0
- data/lib/ratis/errors.rb +6 -6
- data/lib/ratis/point_2_point.rb +19 -13
- data/lib/ratis/point_2_point/routes_only_response.rb +1 -1
- data/lib/ratis/request.rb +9 -2
- data/lib/ratis/version.rb +1 -1
- metadata +55 -95
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
data.tar.gz: 0f2e6e69ee3558dbc0a72e9f59efc8360b576e42
|
4
|
+
metadata.gz: 9dbea42823b010445a18dc1e0335a4f62cbae8aa
|
5
|
+
SHA512:
|
6
|
+
data.tar.gz: deab67f3d48eeb0185500ed04bb77d9be7f5765e57b721fc218484f13ec754f0d9699bd11dffe38c7399c3a793798b4033dc407ee166467d2d52bb12e48521f7
|
7
|
+
metadata.gz: f26051bb556b4f2a43b3a8f5cec8d302422e4729fafd689f5725b853b48d5c8fb6092ce3e811d9edb05f3b80306501f9083792582c3d610acb145b7fcdd0c464
|
data/lib/ratis.rb
CHANGED
@@ -50,4 +50,9 @@ module Ratis
|
|
50
50
|
raise ArgumentError.new("Conditions not used by this class: #{conditions.keys.inspect}") unless conditions.empty?
|
51
51
|
end
|
52
52
|
|
53
|
+
# null out the config so that it can be rewritten to, then used in new 'get' calls
|
54
|
+
def reset
|
55
|
+
@config = nil
|
56
|
+
end
|
57
|
+
|
53
58
|
end
|
data/lib/ratis/errors.rb
CHANGED
@@ -12,11 +12,11 @@ module Ratis
|
|
12
12
|
self.fault_string = fault[:faultstring]
|
13
13
|
end
|
14
14
|
|
15
|
-
def self.version_mismatch(method, version)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
15
|
+
# def self.version_mismatch(method, version)
|
16
|
+
# error = Errors.new
|
17
|
+
# error.fault_string = "Unimplemented SOAP method #{ method } #{ version }"
|
18
|
+
# error
|
19
|
+
# end
|
20
20
|
|
21
21
|
def to_s
|
22
22
|
fault_string
|
@@ -62,7 +62,7 @@ module Ratis
|
|
62
62
|
|
63
63
|
module Errors
|
64
64
|
|
65
|
-
class ConfigError <
|
65
|
+
class ConfigError < StandardError; end
|
66
66
|
class SoapError < Error; end
|
67
67
|
|
68
68
|
end
|
data/lib/ratis/point_2_point.rb
CHANGED
@@ -3,16 +3,17 @@ module Ratis
|
|
3
3
|
class Point2Point
|
4
4
|
|
5
5
|
def self.where(conditions)
|
6
|
-
routes_only
|
6
|
+
routes_only = conditions.delete(:routes_only) || 'N'
|
7
|
+
routes = conditions.delete(:routes) || []
|
7
8
|
|
8
|
-
origin_lat
|
9
|
-
origin_long
|
10
|
-
destination_lat
|
9
|
+
origin_lat = conditions.delete(:origin_lat).to_f
|
10
|
+
origin_long = conditions.delete(:origin_long).to_f
|
11
|
+
destination_lat = conditions.delete(:destination_lat).to_f
|
11
12
|
destination_long = conditions.delete(:destination_long).to_f
|
12
13
|
|
13
|
-
date
|
14
|
-
start_time
|
15
|
-
end_time
|
14
|
+
date = conditions.delete :date
|
15
|
+
start_time = conditions.delete(:start_time)
|
16
|
+
end_time = conditions.delete :end_time
|
16
17
|
|
17
18
|
raise ArgumentError.new("You must specify routes only with true, false, 'y' or 'n'") unless routes_only.y_or_n rescue false
|
18
19
|
|
@@ -27,15 +28,20 @@ module Ratis
|
|
27
28
|
|
28
29
|
Ratis.all_conditions_used? conditions
|
29
30
|
|
30
|
-
response = Request.get 'Point2point', 'Routesonly'
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
response = Request.get 'Point2point', 'Routesonly' => routes_only.y_or_n.upcase,
|
32
|
+
'Originlat' => origin_lat,
|
33
|
+
'Originlong' => origin_long,
|
34
|
+
'Destinationlat' => destination_lat,
|
35
|
+
'Destinationlong' => destination_long,
|
36
|
+
'Date' => date,
|
37
|
+
'Starttime' => start_time,
|
38
|
+
'Endtime' => end_time,
|
39
|
+
'Routes' => routes.join(',')
|
34
40
|
|
35
41
|
return nil unless response.success?
|
36
42
|
|
37
|
-
return parse_routes_only_yes
|
38
|
-
return parse_routes_only_no
|
43
|
+
return parse_routes_only_yes(response) if routes_only.y_or_n.downcase == 'y'
|
44
|
+
return parse_routes_only_no(response) if routes_only.y_or_n.downcase == 'n'
|
39
45
|
|
40
46
|
nil
|
41
47
|
end
|
data/lib/ratis/request.rb
CHANGED
@@ -20,12 +20,19 @@ module Ratis
|
|
20
20
|
|
21
21
|
def self.get(action, params = {})
|
22
22
|
begin
|
23
|
-
|
23
|
+
raise Errors::ConfigError, 'It appears that Ratis.configure has not been called or properly setup' unless Ratis.config.valid?
|
24
|
+
|
25
|
+
# ClassMethods from Savon::Model
|
26
|
+
# Necessary since calling Ratis.configure doesn't allow changing of values set during Savon initialization
|
27
|
+
# Savon memoizes the client config
|
28
|
+
endpoint(Ratis.config.endpoint)
|
29
|
+
namespace(Ratis.config.namespace)
|
30
|
+
|
24
31
|
response = client.request action, :soap_action => "#{Ratis.config.namespace}##{action}", :xmlns => Ratis.config.namespace do
|
25
32
|
soap.body = params unless params.blank?
|
26
33
|
end
|
27
34
|
|
28
|
-
version = response.to_hash["#{action.downcase}_response".to_sym][:version]
|
35
|
+
# version = response.to_hash["#{action.downcase}_response".to_sym][:version]
|
29
36
|
|
30
37
|
response
|
31
38
|
rescue Errno::ECONNREFUSED => e
|
data/lib/ratis/version.rb
CHANGED
metadata
CHANGED
@@ -1,35 +1,24 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ratis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 5
|
9
|
-
- 2
|
10
|
-
- 7
|
11
|
-
version: 2.5.2.7
|
4
|
+
version: 2.5.2.8
|
12
5
|
platform: ruby
|
13
6
|
authors:
|
14
7
|
- AuthorityLabs
|
8
|
+
- Burst Software
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
12
|
|
19
|
-
date: 2013-
|
13
|
+
date: 2013-04-15 00:00:00 Z
|
20
14
|
dependencies:
|
21
15
|
- !ruby/object:Gem::Dependency
|
22
16
|
name: savon
|
23
17
|
prerelease: false
|
24
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
19
|
requirements:
|
27
20
|
- - <
|
28
21
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 0
|
33
22
|
version: "2.0"
|
34
23
|
type: :runtime
|
35
24
|
version_requirements: *id001
|
@@ -37,13 +26,10 @@ dependencies:
|
|
37
26
|
name: activesupport
|
38
27
|
prerelease: false
|
39
28
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
29
|
requirements:
|
42
|
-
-
|
30
|
+
- &id004
|
31
|
+
- ">="
|
43
32
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 3
|
45
|
-
segments:
|
46
|
-
- 0
|
47
33
|
version: "0"
|
48
34
|
type: :development
|
49
35
|
version_requirements: *id002
|
@@ -51,104 +37,88 @@ dependencies:
|
|
51
37
|
name: rspec
|
52
38
|
prerelease: false
|
53
39
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
40
|
requirements:
|
56
|
-
- -
|
41
|
+
- - ~>
|
57
42
|
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
version: "0"
|
43
|
+
version: 2.13.0
|
62
44
|
type: :development
|
63
45
|
version_requirements: *id003
|
64
46
|
- !ruby/object:Gem::Dependency
|
65
47
|
name: simplecov
|
66
48
|
prerelease: false
|
67
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
|
-
requirements:
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
hash: 3
|
73
|
-
segments:
|
74
|
-
- 0
|
75
|
-
version: "0"
|
76
|
-
type: :development
|
77
|
-
version_requirements: *id004
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: webmock
|
80
|
-
prerelease: false
|
81
49
|
requirement: &id005 !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
50
|
requirements:
|
84
|
-
-
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
hash: 3
|
87
|
-
segments:
|
88
|
-
- 0
|
89
|
-
version: "0"
|
51
|
+
- *id004
|
90
52
|
type: :development
|
91
53
|
version_requirements: *id005
|
92
54
|
- !ruby/object:Gem::Dependency
|
93
|
-
name:
|
55
|
+
name: webmock
|
94
56
|
prerelease: false
|
95
57
|
requirement: &id006 !ruby/object:Gem::Requirement
|
96
|
-
none: false
|
97
58
|
requirements:
|
98
|
-
-
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
hash: 3
|
101
|
-
segments:
|
102
|
-
- 0
|
103
|
-
version: "0"
|
59
|
+
- *id004
|
104
60
|
type: :development
|
105
61
|
version_requirements: *id006
|
106
62
|
- !ruby/object:Gem::Dependency
|
107
|
-
name:
|
63
|
+
name: hashdiff
|
108
64
|
prerelease: false
|
109
65
|
requirement: &id007 !ruby/object:Gem::Requirement
|
110
|
-
none: false
|
111
66
|
requirements:
|
112
|
-
-
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
hash: 23
|
115
|
-
segments:
|
116
|
-
- 1
|
117
|
-
- 0
|
118
|
-
- 0
|
119
|
-
version: 1.0.0
|
67
|
+
- *id004
|
120
68
|
type: :development
|
121
69
|
version_requirements: *id007
|
122
70
|
- !ruby/object:Gem::Dependency
|
123
|
-
name:
|
71
|
+
name: bundler
|
124
72
|
prerelease: false
|
125
73
|
requirement: &id008 !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
74
|
requirements:
|
128
75
|
- - ">="
|
129
76
|
- !ruby/object:Gem::Version
|
130
|
-
|
131
|
-
segments:
|
132
|
-
- 0
|
133
|
-
version: "0"
|
77
|
+
version: 1.0.0
|
134
78
|
type: :development
|
135
79
|
version_requirements: *id008
|
136
80
|
- !ruby/object:Gem::Dependency
|
137
|
-
name:
|
81
|
+
name: yard
|
138
82
|
prerelease: false
|
139
83
|
requirement: &id009 !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
84
|
requirements:
|
142
|
-
-
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
hash: 3
|
145
|
-
segments:
|
146
|
-
- 0
|
147
|
-
version: "0"
|
85
|
+
- *id004
|
148
86
|
type: :development
|
149
87
|
version_requirements: *id009
|
88
|
+
- !ruby/object:Gem::Dependency
|
89
|
+
name: redcarpet
|
90
|
+
prerelease: false
|
91
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- *id004
|
94
|
+
type: :development
|
95
|
+
version_requirements: *id010
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rake
|
98
|
+
prerelease: false
|
99
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- *id004
|
102
|
+
type: :development
|
103
|
+
version_requirements: *id011
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: vcr
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- *id004
|
110
|
+
type: :development
|
111
|
+
version_requirements: *id012
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: ruby-debug
|
114
|
+
prerelease: false
|
115
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- *id004
|
118
|
+
type: :development
|
119
|
+
version_requirements: *id013
|
150
120
|
description:
|
151
|
-
email:
|
121
|
+
email: irish@burstdev.com
|
152
122
|
executables: []
|
153
123
|
|
154
124
|
extensions: []
|
@@ -187,35 +157,25 @@ files:
|
|
187
157
|
homepage:
|
188
158
|
licenses: []
|
189
159
|
|
160
|
+
metadata: {}
|
161
|
+
|
190
162
|
post_install_message:
|
191
163
|
rdoc_options:
|
192
164
|
- --charset=UTF-8 --main=README.md
|
193
165
|
require_paths:
|
194
166
|
- lib
|
195
167
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
168
|
requirements:
|
198
|
-
-
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
hash: 3
|
201
|
-
segments:
|
202
|
-
- 0
|
203
|
-
version: "0"
|
169
|
+
- *id004
|
204
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
|
-
none: false
|
206
171
|
requirements:
|
207
|
-
-
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
hash: 3
|
210
|
-
segments:
|
211
|
-
- 0
|
212
|
-
version: "0"
|
172
|
+
- *id004
|
213
173
|
requirements: []
|
214
174
|
|
215
175
|
rubyforge_project:
|
216
|
-
rubygems_version:
|
176
|
+
rubygems_version: 2.0.3
|
217
177
|
signing_key:
|
218
|
-
specification_version:
|
178
|
+
specification_version: 4
|
219
179
|
summary: A Ruby wrapper around the ATIS SOAP Interface
|
220
180
|
test_files: []
|
221
181
|
|