soaspec 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/Gemfile.lock +1 -1
- data/exe/soaspec-init +3 -13
- data/lib/soaspec/spec_logger.rb +7 -1
- data/lib/soaspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 908d8b0ef22286c2ca694e2382e394c197e366a4
|
4
|
+
data.tar.gz: dcc17777f4eca00da363246371ac3413fa04ea61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c1e6d0b7310a9ed57d738aec9b032a0769922ecf417d50a95351c426f9b77555ebb2a7d6cefb05e4bf90f89f21efd20864e79c5b5fc1a0f80d3a82e0abddb3b
|
7
|
+
data.tar.gz: 1b6548bcc759d783fa362290b3d9a8cf425d88ac0682c3b213e8b559ff3b08b1dfcd3e51d35e8a5bced08498b1b44ca2203c1a72148df3de1f05148cb557f85b
|
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
Version 0.0.27 / 2018-3-5
|
2
|
+
* Bug fix
|
3
|
+
* Fixed log file not present error
|
4
|
+
* Updated exe binaries to use latest format
|
5
|
+
|
1
6
|
Version 0.0.26 / 2018-3-5
|
2
7
|
* Refactorings
|
3
8
|
* Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
|
data/Gemfile.lock
CHANGED
data/exe/soaspec-init
CHANGED
@@ -38,23 +38,13 @@ class WeatherWebService < Soaspec::BasicSoapHandler
|
|
38
38
|
end
|
39
39
|
|
40
40
|
# Specifying that get_weather_result must be present in the SOAP response
|
41
|
-
|
42
|
-
[:get_weather_result]
|
43
|
-
end
|
41
|
+
mandatory_elements [:get_weather_result]
|
44
42
|
|
45
43
|
# Example of xpath value that must be true for all success scenarios
|
46
|
-
|
47
|
-
{
|
48
|
-
'//xmlns:GetWeatherResult' => 'Data Not Found'
|
49
|
-
}
|
50
|
-
end
|
44
|
+
mandatory_xpath_values '//xmlns:GetWeatherResult' => 'Data Not Found'
|
51
45
|
|
52
46
|
# Example of setting an attribute on the root XML element
|
53
|
-
|
54
|
-
{
|
55
|
-
'Version' => '1'
|
56
|
-
}
|
57
|
-
end
|
47
|
+
root_attributes 'Version' => '1'
|
58
48
|
|
59
49
|
end
|
60
50
|
|
data/lib/soaspec/spec_logger.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
|
2
|
+
require 'logger'
|
3
|
+
require 'fileutils'
|
4
|
+
|
2
5
|
module Soaspec
|
3
|
-
require 'logger'
|
4
6
|
|
5
7
|
# Handles logs of API requests and responses
|
6
8
|
class SpecLogger
|
7
9
|
def self.create
|
10
|
+
unless File.exist?('logs/traffic.log')
|
11
|
+
FileUtils.mkdir_p 'logs'
|
12
|
+
FileUtils.touch 'traffic.log'
|
13
|
+
end
|
8
14
|
@logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored
|
9
15
|
@logger.level = Logger::DEBUG
|
10
16
|
@logger
|
data/lib/soaspec/version.rb
CHANGED