global_weather 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +86 -0
- data/Rakefile +18 -0
- data/TODO +5 -0
- data/global_weather.gemspec +29 -0
- data/lib/global_weather.rb +11 -0
- data/lib/global_weather/client.rb +29 -0
- data/lib/global_weather/country.rb +49 -0
- data/lib/global_weather/errors.rb +10 -0
- data/lib/global_weather/utils.rb +21 -0
- data/lib/global_weather/version.rb +3 -0
- data/lib/global_weather/weather.rb +85 -0
- data/test/functional/country_functional_test.rb +26 -0
- data/test/functional/weather_functional_test.rb +47 -0
- data/test/test_helper.rb +17 -0
- data/test/unit/utils_test.rb +16 -0
- data/test/unit/weather_test.rb +51 -0
- data/test/vcr/vcr_cassettes/cities_by_country_basic_call.yml +197 -0
- data/test/vcr/vcr_cassettes/cities_by_country_invalid_country.yml +49 -0
- data/test/vcr/vcr_cassettes/get_weather_basic_call.yml +56 -0
- data/test/vcr/vcr_cassettes/get_weather_invalid_1.yml +48 -0
- data/test/vcr/vcr_cassettes/get_weather_invalid_2.yml +48 -0
- data/test/vcr/vcr_cassettes/get_weather_invalid_3.yml +48 -0
- data/wsdl/globalweather.asmx.xml +209 -0
- metadata +211 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'vcr'
|
3
|
+
require 'global_weather'
|
4
|
+
require 'debugger'
|
5
|
+
|
6
|
+
VCR.configure do |c|
|
7
|
+
c.cassette_library_dir = File.join(File.expand_path(File.dirname(__FILE__)),'vcr','vcr_cassettes')
|
8
|
+
c.hook_into :webmock
|
9
|
+
c.allow_http_connections_when_no_cassette = true
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
# all configuration here are passed as options for Savon client
|
14
|
+
# see full list http://savonrb.com/version2/globals.html
|
15
|
+
GlobalWeather::Client.configure do |config|
|
16
|
+
config.log false
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
|
+
|
3
|
+
class UtilsTests < Test::Unit::TestCase
|
4
|
+
|
5
|
+
include GlobalWeather::Utils
|
6
|
+
|
7
|
+
def test_camelize
|
8
|
+
assert_equal 'SkyConditions', camelize('sky_conditions')
|
9
|
+
assert_equal 'Temperature', camelize('temperature')
|
10
|
+
assert_equal 'RelativeHumidity', camelize('relative_humidity')
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_fix_header
|
14
|
+
assert_equal '<tag>Blah</tag>',fix_header!('<?xml some attributes here ?><tag>Blah</tag>')
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
|
+
|
3
|
+
class GlobalWeatherTests < Test::Unit::TestCase
|
4
|
+
def test_basic_call
|
5
|
+
VCR.use_cassette('get_weather_basic_call') do
|
6
|
+
weather = GlobalWeather::Weather.new 'Germany', 'Berlin', log: false
|
7
|
+
|
8
|
+
assert_equal 14,weather.temperature[:C]
|
9
|
+
assert_equal 57, weather.temperature[:F]
|
10
|
+
assert_equal 10, weather.dew_point[:C]
|
11
|
+
assert_equal 50, weather.dew_point[:F]
|
12
|
+
assert_equal 29.94, weather.pressure[:Hg]
|
13
|
+
assert_equal 1014, weather.pressure[:hPa]
|
14
|
+
assert weather.location =~ /Berlin/
|
15
|
+
assert weather.location =~ /Germany/
|
16
|
+
assert_equal 76, weather.relative_humidity
|
17
|
+
assert_equal DateTime.new(2013,8,25,3,20,0), weather.time[:UTC]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_convert_time_to_datetime
|
22
|
+
output = GlobalWeather::Weather.send(:convert_time_to_datetime, 'Aug 21, 2013 - 11:21 AM EDT / 2013.08.21 1521 UTC')
|
23
|
+
assert_equal DateTime.new(2013,8,21,15,21,0), output[:UTC]
|
24
|
+
assert_equal DateTime.new(2013,8,21,15,21,0), output[:EDT]
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_convert_pressure_to_hash_1
|
28
|
+
output = GlobalWeather::Weather.send(:convert_pressure_to_hash, '20.34 in. Hg (688.79 hPa)')
|
29
|
+
assert_equal output[:Hg], 20.34
|
30
|
+
assert_equal output[:hg], 20.34
|
31
|
+
assert_equal output[:hPa], 688.79
|
32
|
+
assert_equal output[:hpa], 688.79
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_convert_temperature_to_hash_1
|
36
|
+
output = GlobalWeather::Weather.send(:convert_temperature_to_hash, '57 F (14 C)')
|
37
|
+
assert_equal output[:F], 57
|
38
|
+
assert_equal output[:f], 57
|
39
|
+
assert_equal output[:c], 14
|
40
|
+
assert_equal output[:C], 14
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_convert_temperature_to_hash_2
|
44
|
+
output = GlobalWeather::Weather.send(:convert_temperature_to_hash, ' -31 F (-35 C)')
|
45
|
+
assert_equal output[:F], -31
|
46
|
+
assert_equal output[:f], -31
|
47
|
+
assert_equal output[:c], -35
|
48
|
+
assert_equal output[:C], -35
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,197 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.webservicex.net/globalweather.asmx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.webserviceX.NET"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:GetCitiesByCountry><tns:CountryName>Germany</tns:CountryName></tns:GetCitiesByCountry></env:Body></env:Envelope>
|
11
|
+
headers:
|
12
|
+
Soapaction:
|
13
|
+
- ! '"http://www.webserviceX.NET/GetCitiesByCountry"'
|
14
|
+
Content-Type:
|
15
|
+
- text/xml;charset=UTF-8
|
16
|
+
Content-Length:
|
17
|
+
- '371'
|
18
|
+
Accept:
|
19
|
+
- ! '*/*'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Cache-Control:
|
28
|
+
- private, max-age=0
|
29
|
+
Content-Length:
|
30
|
+
- '12518'
|
31
|
+
Content-Type:
|
32
|
+
- text/xml; charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Microsoft-IIS/7.0
|
35
|
+
X-Aspnet-Version:
|
36
|
+
- 4.0.30319
|
37
|
+
X-Powered-By:
|
38
|
+
- ASP.NET
|
39
|
+
Date:
|
40
|
+
- Sun, 25 Aug 2013 03:53:36 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
|
44
|
+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><GetCitiesByCountryResponse
|
45
|
+
xmlns=\"http://www.webserviceX.NET\"><GetCitiesByCountryResult><NewDataSet>\r\n
|
46
|
+
\ <Table>\r\n <Country>Germany</Country>\r\n <City>Berlin-Schoenefeld</City>\r\n
|
47
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
48
|
+
\ <City>Dresden-Klotzsche</City>\r\n </Table>\r\n <Table>\r\n
|
49
|
+
\ <Country>Germany</Country>\r\n <City>Erfurt-Bindersleben</City>\r\n
|
50
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
51
|
+
\ <City>Frankfurt / M-Flughafen</City>\r\n </Table>\r\n
|
52
|
+
\ <Table>\r\n <Country>Germany</Country>\r\n <City>Muenster
|
53
|
+
/ Osnabrueck</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
54
|
+
\ <City>Hamburg-Fuhlsbuettel</City>\r\n </Table>\r\n
|
55
|
+
\ <Table>\r\n <Country>Germany</Country>\r\n <City>Berlin-Tempelhof</City>\r\n
|
56
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
57
|
+
\ <City>Koeln / Bonn</City>\r\n </Table>\r\n <Table>\r\n
|
58
|
+
\ <Country>Germany</Country>\r\n <City>Duesseldorf</City>\r\n
|
59
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
60
|
+
\ <City>Munich / Riem</City>\r\n </Table>\r\n <Table>\r\n
|
61
|
+
\ <Country>Germany</Country>\r\n <City>Nuernberg</City>\r\n
|
62
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
63
|
+
\ <City>Leipzig-Schkeuditz</City>\r\n </Table>\r\n <Table>\r\n
|
64
|
+
\ <Country>Germany</Country>\r\n <City>Saarbruecken
|
65
|
+
/ Ensheim</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
66
|
+
\ <City>Stuttgart-Echterdingen</City>\r\n </Table>\r\n
|
67
|
+
\ <Table>\r\n <Country>Germany</Country>\r\n <City>Berlin-Tegel</City>\r\n
|
68
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
69
|
+
\ <City>Hannover</City>\r\n </Table>\r\n <Table>\r\n
|
70
|
+
\ <Country>Germany</Country>\r\n <City>Bremen</City>\r\n
|
71
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
72
|
+
\ <City>Hahn</City>\r\n </Table>\r\n <Table>\r\n
|
73
|
+
\ <Country>Germany</Country>\r\n <City>Baden Wurttemberg,
|
74
|
+
Neuostheim</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
75
|
+
\ <City>Hamburg-Finkenwerder</City>\r\n </Table>\r\n
|
76
|
+
\ <Table>\r\n <Country>Germany</Country>\r\n <City>Luebeck-Blankensee</City>\r\n
|
77
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
78
|
+
\ <City>Monchengladbach</City>\r\n </Table>\r\n <Table>\r\n
|
79
|
+
\ <Country>Germany</Country>\r\n <City>Paderborn /
|
80
|
+
Lippstadt</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
81
|
+
\ <City>Dortmund / Wickede</City>\r\n </Table>\r\n <Table>\r\n
|
82
|
+
\ <Country>Germany</Country>\r\n <City>Augsburg</City>\r\n
|
83
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
84
|
+
\ <City>Oberpfaffenhofen</City>\r\n </Table>\r\n <Table>\r\n
|
85
|
+
\ <Country>Germany</Country>\r\n <City>Friedrichshafen</City>\r\n
|
86
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
87
|
+
\ <City>Mecklenburg-Vorpommern, Parchim</City>\r\n </Table>\r\n
|
88
|
+
\ <Table>\r\n <Country>Germany</Country>\r\n <City>Bayreuth</City>\r\n
|
89
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
90
|
+
\ <City>Hof</City>\r\n </Table>\r\n <Table>\r\n
|
91
|
+
\ <Country>Germany</Country>\r\n <City>Konstanz</City>\r\n
|
92
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
93
|
+
\ <City>Braunschweig</City>\r\n </Table>\r\n <Table>\r\n
|
94
|
+
\ <Country>Germany</Country>\r\n <City>Kassel / Calden</City>\r\n
|
95
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
96
|
+
\ <City>Lemwerder</City>\r\n </Table>\r\n <Table>\r\n
|
97
|
+
\ <Country>Germany</Country>\r\n <City>Westerland /
|
98
|
+
Sylt</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
99
|
+
\ <City>Essen</City>\r\n </Table>\r\n <Table>\r\n
|
100
|
+
\ <Country>Germany</Country>\r\n <City>Spangdahlem</City>\r\n
|
101
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
102
|
+
\ <City>Ramstein</City>\r\n </Table>\r\n <Table>\r\n
|
103
|
+
\ <Country>Germany</Country>\r\n <City>Sembach United
|
104
|
+
States Air Force</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
105
|
+
\ <City>Aachen / Merzbruck</City>\r\n </Table>\r\n <Table>\r\n
|
106
|
+
\ <Country>Germany</Country>\r\n <City>Ansbach / Katterbach</City>\r\n
|
107
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
108
|
+
\ <City>Bad Kreuznach</City>\r\n </Table>\r\n <Table>\r\n
|
109
|
+
\ <Country>Germany</Country>\r\n <City>Giebelstadt</City>\r\n
|
110
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
111
|
+
\ <City>Bergen</City>\r\n </Table>\r\n <Table>\r\n
|
112
|
+
\ <Country>Germany</Country>\r\n <City>Gluecksburg
|
113
|
+
/ Meierwik</City>\r\n </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
114
|
+
\ <City>Idar-Oberstein</City>\r\n </Table>\r\n <Table>\r\n
|
115
|
+
\ <Country>Germany</Country>\r\n <City>Kuemmersruck</City>\r\n
|
116
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
117
|
+
\ <City>Wittstock</City>\r\n </Table>\r\n <Table>\r\n
|
118
|
+
\ <Country>Germany</Country>\r\n <City>Kalkar</City>\r\n
|
119
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
120
|
+
\ <City>Messstetten</City>\r\n </Table>\r\n <Table>\r\n
|
121
|
+
\ <Country>Germany</Country>\r\n <City>Altenstadt</City>\r\n
|
122
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
123
|
+
\ <City>Bueckeburg</City>\r\n </Table>\r\n <Table>\r\n
|
124
|
+
\ <Country>Germany</Country>\r\n <City>Celle</City>\r\n
|
125
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
126
|
+
\ <City>Rheine-Bentlage</City>\r\n </Table>\r\n <Table>\r\n
|
127
|
+
\ <Country>Germany</Country>\r\n <City>Fritzlar</City>\r\n
|
128
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
129
|
+
\ <City>Itzehoe</City>\r\n </Table>\r\n <Table>\r\n
|
130
|
+
\ <Country>Germany</Country>\r\n <City>Laupheim</City>\r\n
|
131
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
132
|
+
\ <City>Mendig</City>\r\n </Table>\r\n <Table>\r\n
|
133
|
+
\ <Country>Germany</Country>\r\n <City>Niederstetten</City>\r\n
|
134
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
135
|
+
\ <City>Roth</City>\r\n </Table>\r\n <Table>\r\n
|
136
|
+
\ <Country>Germany</Country>\r\n <City>Fassberg</City>\r\n
|
137
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
138
|
+
\ <City>Cottbus Flugplatz</City>\r\n </Table>\r\n <Table>\r\n
|
139
|
+
\ <Country>Germany</Country>\r\n <City>Grafenwoehr</City>\r\n
|
140
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
141
|
+
\ <City>Hanau</City>\r\n </Table>\r\n <Table>\r\n
|
142
|
+
\ <Country>Germany</Country>\r\n <City>Heidelberg</City>\r\n
|
143
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
144
|
+
\ <City>Hohenfels</City>\r\n </Table>\r\n <Table>\r\n
|
145
|
+
\ <Country>Germany</Country>\r\n <City>Illesheim</City>\r\n
|
146
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
147
|
+
\ <City>Kitzingen Usa Af</City>\r\n </Table>\r\n <Table>\r\n
|
148
|
+
\ <Country>Germany</Country>\r\n <City>Eggebek</City>\r\n
|
149
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
150
|
+
\ <City>Kiel-Holtenau</City>\r\n </Table>\r\n <Table>\r\n
|
151
|
+
\ <Country>Germany</Country>\r\n <City>Nordholz</City>\r\n
|
152
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
153
|
+
\ <City>Diepholz</City>\r\n </Table>\r\n <Table>\r\n
|
154
|
+
\ <Country>Germany</Country>\r\n <City>Geilenkirchen</City>\r\n
|
155
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
156
|
+
\ <City>Hohn</City>\r\n </Table>\r\n <Table>\r\n
|
157
|
+
\ <Country>Germany</Country>\r\n <City>Jever</City>\r\n
|
158
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
159
|
+
\ <City>Laage</City>\r\n </Table>\r\n <Table>\r\n
|
160
|
+
\ <Country>Germany</Country>\r\n <City>Noervenich</City>\r\n
|
161
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
162
|
+
\ <City>Hopsten</City>\r\n </Table>\r\n <Table>\r\n
|
163
|
+
\ <Country>Germany</Country>\r\n <City>Preschen</City>\r\n
|
164
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
165
|
+
\ <City>Schleswig-Jagel</City>\r\n </Table>\r\n <Table>\r\n
|
166
|
+
\ <Country>Germany</Country>\r\n <City>Wittmundhaven</City>\r\n
|
167
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
168
|
+
\ <City>Trollenhagen</City>\r\n </Table>\r\n <Table>\r\n
|
169
|
+
\ <Country>Germany</Country>\r\n <City>Wunstorf</City>\r\n
|
170
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
171
|
+
\ <City>Coleman Mannheim</City>\r\n </Table>\r\n <Table>\r\n
|
172
|
+
\ <Country>Germany</Country>\r\n <City>Wiesbaden</City>\r\n
|
173
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
174
|
+
\ <City>Landsberg</City>\r\n </Table>\r\n <Table>\r\n
|
175
|
+
\ <Country>Germany</Country>\r\n <City>Buechel</City>\r\n
|
176
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
177
|
+
\ <City>Erding</City>\r\n </Table>\r\n <Table>\r\n
|
178
|
+
\ <Country>Germany</Country>\r\n <City>Fuerstenfeldbruck</City>\r\n
|
179
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
180
|
+
\ <City>Holzdorf</City>\r\n </Table>\r\n <Table>\r\n
|
181
|
+
\ <Country>Germany</Country>\r\n <City>Ingolstadt</City>\r\n
|
182
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
183
|
+
\ <City>Lechfeld</City>\r\n </Table>\r\n <Table>\r\n
|
184
|
+
\ <Country>Germany</Country>\r\n <City>Memmingen</City>\r\n
|
185
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
186
|
+
\ <City>Neuburg / Donau</City>\r\n </Table>\r\n <Table>\r\n
|
187
|
+
\ <Country>Germany</Country>\r\n <City>Pferdsfeld</City>\r\n
|
188
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
189
|
+
\ <City>Laarbruch</City>\r\n </Table>\r\n <Table>\r\n
|
190
|
+
\ <Country>Germany</Country>\r\n <City>Nordhorn</City>\r\n
|
191
|
+
\ </Table>\r\n <Table>\r\n <Country>Germany</Country>\r\n
|
192
|
+
\ <City>Guetersloh</City>\r\n </Table>\r\n <Table>\r\n
|
193
|
+
\ <Country>Germany</Country>\r\n <City>Brueggen</City>\r\n
|
194
|
+
\ </Table>\r\n</NewDataSet></GetCitiesByCountryResult></GetCitiesByCountryResponse></soap:Body></soap:Envelope>"
|
195
|
+
http_version:
|
196
|
+
recorded_at: Sun, 25 Aug 2013 03:53:34 GMT
|
197
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.webservicex.net/globalweather.asmx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.webserviceX.NET"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:GetCitiesByCountry><tns:CountryName>FarFarFarAway</tns:CountryName></tns:GetCitiesByCountry></env:Body></env:Envelope>
|
11
|
+
headers:
|
12
|
+
Soapaction:
|
13
|
+
- ! '"http://www.webserviceX.NET/GetCitiesByCountry"'
|
14
|
+
Content-Type:
|
15
|
+
- text/xml;charset=UTF-8
|
16
|
+
Content-Length:
|
17
|
+
- '377'
|
18
|
+
Accept:
|
19
|
+
- ! '*/*'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Cache-Control:
|
28
|
+
- private, max-age=0
|
29
|
+
Content-Length:
|
30
|
+
- '411'
|
31
|
+
Content-Type:
|
32
|
+
- text/xml; charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Microsoft-IIS/7.0
|
35
|
+
X-Aspnet-Version:
|
36
|
+
- 4.0.30319
|
37
|
+
X-Powered-By:
|
38
|
+
- ASP.NET
|
39
|
+
Date:
|
40
|
+
- Sun, 25 Aug 2013 03:53:35 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
44
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetCitiesByCountryResponse
|
45
|
+
xmlns="http://www.webserviceX.NET"><GetCitiesByCountryResult><NewDataSet
|
46
|
+
/></GetCitiesByCountryResult></GetCitiesByCountryResponse></soap:Body></soap:Envelope>
|
47
|
+
http_version:
|
48
|
+
recorded_at: Sun, 25 Aug 2013 03:53:32 GMT
|
49
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.webservicex.net/globalweather.asmx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.webserviceX.NET"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:GetWeather><tns:CountryName>Germany</tns:CountryName><tns:CityName>Berlin</tns:CityName></tns:GetWeather></env:Body></env:Envelope>
|
11
|
+
headers:
|
12
|
+
Soapaction:
|
13
|
+
- ! '"http://www.webserviceX.NET/GetWeather"'
|
14
|
+
Content-Type:
|
15
|
+
- text/xml;charset=UTF-8
|
16
|
+
Content-Length:
|
17
|
+
- '390'
|
18
|
+
Accept:
|
19
|
+
- ! '*/*'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Cache-Control:
|
28
|
+
- private, max-age=0
|
29
|
+
Content-Length:
|
30
|
+
- '1017'
|
31
|
+
Content-Type:
|
32
|
+
- text/xml; charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Microsoft-IIS/7.0
|
35
|
+
X-Aspnet-Version:
|
36
|
+
- 4.0.30319
|
37
|
+
X-Powered-By:
|
38
|
+
- ASP.NET
|
39
|
+
Date:
|
40
|
+
- Sun, 25 Aug 2013 03:53:41 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
|
44
|
+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><GetWeatherResponse
|
45
|
+
xmlns=\"http://www.webserviceX.NET\"><GetWeatherResult><?xml version=\"1.0\"
|
46
|
+
encoding=\"utf-16\"?>\r\n<CurrentWeather>\r\n <Location>Berlin-Tegel,
|
47
|
+
Germany (EDDT) 52-34N 013-19E 37M</Location>\r\n <Time>Aug 24,
|
48
|
+
2013 - 11:20 PM EDT / 2013.08.25 0320 UTC</Time>\r\n <Wind> from
|
49
|
+
the ENE (060 degrees) at 7 MPH (6 KT):0</Wind>\r\n <Visibility>
|
50
|
+
greater than 7 mile(s):0</Visibility>\r\n <Temperature> 57 F
|
51
|
+
(14 C)</Temperature>\r\n <DewPoint> 50 F (10 C)</DewPoint>\r\n
|
52
|
+
\ <RelativeHumidity> 76%</RelativeHumidity>\r\n <Pressure>
|
53
|
+
29.94 in. Hg (1014 hPa)</Pressure>\r\n <Status>Success</Status>\r\n</CurrentWeather></GetWeatherResult></GetWeatherResponse></soap:Body></soap:Envelope>"
|
54
|
+
http_version:
|
55
|
+
recorded_at: Sun, 25 Aug 2013 03:53:38 GMT
|
56
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.webservicex.net/globalweather.asmx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.webserviceX.NET"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:GetWeather><tns:CountryName>Blah</tns:CountryName><tns:CityName>Berlin</tns:CityName></tns:GetWeather></env:Body></env:Envelope>
|
11
|
+
headers:
|
12
|
+
Soapaction:
|
13
|
+
- ! '"http://www.webserviceX.NET/GetWeather"'
|
14
|
+
Content-Type:
|
15
|
+
- text/xml;charset=UTF-8
|
16
|
+
Content-Length:
|
17
|
+
- '387'
|
18
|
+
Accept:
|
19
|
+
- ! '*/*'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Cache-Control:
|
28
|
+
- private, max-age=0
|
29
|
+
Content-Length:
|
30
|
+
- '373'
|
31
|
+
Content-Type:
|
32
|
+
- text/xml; charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Microsoft-IIS/7.0
|
35
|
+
X-Aspnet-Version:
|
36
|
+
- 4.0.30319
|
37
|
+
X-Powered-By:
|
38
|
+
- ASP.NET
|
39
|
+
Date:
|
40
|
+
- Sun, 25 Aug 2013 03:53:38 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
44
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetWeatherResponse
|
45
|
+
xmlns="http://www.webserviceX.NET"><GetWeatherResult>Data Not Found</GetWeatherResult></GetWeatherResponse></soap:Body></soap:Envelope>
|
46
|
+
http_version:
|
47
|
+
recorded_at: Sun, 25 Aug 2013 03:53:35 GMT
|
48
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.webservicex.net/globalweather.asmx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.webserviceX.NET"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:GetWeather><tns:CountryName>Germany</tns:CountryName><tns:CityName>Blah</tns:CityName></tns:GetWeather></env:Body></env:Envelope>
|
11
|
+
headers:
|
12
|
+
Soapaction:
|
13
|
+
- ! '"http://www.webserviceX.NET/GetWeather"'
|
14
|
+
Content-Type:
|
15
|
+
- text/xml;charset=UTF-8
|
16
|
+
Content-Length:
|
17
|
+
- '388'
|
18
|
+
Accept:
|
19
|
+
- ! '*/*'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Cache-Control:
|
28
|
+
- private, max-age=0
|
29
|
+
Content-Length:
|
30
|
+
- '373'
|
31
|
+
Content-Type:
|
32
|
+
- text/xml; charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Microsoft-IIS/7.0
|
35
|
+
X-Aspnet-Version:
|
36
|
+
- 4.0.30319
|
37
|
+
X-Powered-By:
|
38
|
+
- ASP.NET
|
39
|
+
Date:
|
40
|
+
- Sun, 25 Aug 2013 03:53:39 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
44
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetWeatherResponse
|
45
|
+
xmlns="http://www.webserviceX.NET"><GetWeatherResult>Data Not Found</GetWeatherResult></GetWeatherResponse></soap:Body></soap:Envelope>
|
46
|
+
http_version:
|
47
|
+
recorded_at: Sun, 25 Aug 2013 03:53:36 GMT
|
48
|
+
recorded_with: VCR 2.5.0
|