soaspec 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -7
- data/Todo.md +0 -5
- data/lib/soaspec.rb +1 -0
- data/lib/soaspec/core_ext/hash.rb +0 -7
- data/lib/soaspec/not_found_errors.rb +2 -2
- data/lib/soaspec/spec_logger.rb +14 -10
- data/lib/soaspec/version.rb +1 -1
- data/soaspec.gemspec +1 -1
- metadata +2 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/config/data/default.yml +0 -37
- data/template/soap_template.xml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ca711d0fe88c0b2181c2791c5908f76b9d9a5a7
|
4
|
+
data.tar.gz: 3d9d66498b61796dc9c6e8d8aa4717659f0fd8fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22036e4d33d4b377816c9799ef717b99a1df24b68e0f8b475538889649efba711f03a4c45de38fe664be19026092d3fae0d3cb7c97adcdd6d50a38c7d0396b9b
|
7
|
+
data.tar.gz: 6be02c83421551ea9e0f1e94bb6c42a4a535d9cdc56c303f846cb5e376b3f25c8799e7284bc967e29b0105a3234c378496870c5a58788046e85b22e147afd11a
|
data/ChangeLog
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -9,12 +9,6 @@ RSpec::Core::RakeTask.new(:run_spec) do |t|
|
|
9
9
|
t.pattern = "{spec/*/#{ENV['folder']}*/,tmp/*/spec/}#{ENV['test']}*_spec.rb"
|
10
10
|
end
|
11
11
|
|
12
|
-
desc 'Prepare log files'
|
13
|
-
task :logs do
|
14
|
-
mkdir_p 'logs'
|
15
|
-
touch 'logs/traffic.log'
|
16
|
-
end
|
17
|
-
|
18
12
|
desc 'Use soaspec_init in tmp to generate test files. Used for verifying it'
|
19
13
|
task :use_soaspec_init do
|
20
14
|
mkdir_p 'tmp'
|
@@ -24,7 +18,7 @@ end
|
|
24
18
|
|
25
19
|
|
26
20
|
desc 'Run tests'
|
27
|
-
task spec: %w[clean clobber use_soaspec_init
|
21
|
+
task spec: %w[clean clobber use_soaspec_init start_test_server run_spec]
|
28
22
|
|
29
23
|
task default: :spec
|
30
24
|
|
data/Todo.md
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
* ouath2 - handler
|
2
|
-
* Need to handle where username and password and no security token
|
3
|
-
* Perform ERB on values taken by file
|
4
|
-
|
5
1
|
* SoapHandler - define exhange method for each SOAP operation
|
6
|
-
* Accessors - similar to HappyMapper
|
7
2
|
* exchange add fields to overide parameters to support cucumber steps. exchange[from_temp] =
|
8
3
|
* Demonstrate using Cucumber
|
9
4
|
* Give examples and convenience methods for building classes for each SOAP or REST operation
|
data/lib/soaspec.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
|
2
2
|
# Raised to represent when there's no element at an Xpath
|
3
3
|
class NoElementAtPath < StandardError
|
4
|
-
def initialize(msg=
|
4
|
+
def initialize(msg = 'No element at path found')
|
5
5
|
super
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
9
|
# Did not find any element by provided key in the Hash
|
10
10
|
class NoElementInHash < StandardError
|
11
|
-
def initialize(msg='No element in Hash found')
|
11
|
+
def initialize(msg = 'No element in Hash found')
|
12
12
|
super
|
13
13
|
end
|
14
14
|
end
|
data/lib/soaspec/spec_logger.rb
CHANGED
@@ -6,18 +6,22 @@ module Soaspec
|
|
6
6
|
|
7
7
|
# Handles logs of API requests and responses
|
8
8
|
class SpecLogger
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
class << self
|
10
|
+
def create
|
11
|
+
unless File.exist?('logs/traffic.log')
|
12
|
+
FileUtils.mkdir_p 'logs'
|
13
|
+
FileUtils.touch File.join('logs', 'traffic.log')
|
14
|
+
end
|
15
|
+
@logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored
|
16
|
+
@logger.level = Logger::DEBUG
|
17
|
+
@logger
|
13
18
|
end
|
14
|
-
@logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored
|
15
|
-
@logger.level = Logger::DEBUG
|
16
|
-
@logger
|
17
|
-
end
|
18
19
|
|
19
|
-
|
20
|
-
@logger
|
20
|
+
# Log a message using Soaspec logger
|
21
|
+
# @param [String] message The message to add to the logger
|
22
|
+
def add_to(message)
|
23
|
+
@logger.info(message)
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
end
|
data/lib/soaspec/version.rb
CHANGED
data/soaspec.gemspec
CHANGED
@@ -16,7 +16,7 @@ the same configuration "
|
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
-
f.match(%r{^(test|spec|features)/})
|
19
|
+
f.match(%r{^(test|spec|features|bin|config|template)/})
|
20
20
|
end
|
21
21
|
spec.bindir = 'exe'
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soaspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -161,9 +161,6 @@ files:
|
|
161
161
|
- README.md
|
162
162
|
- Rakefile
|
163
163
|
- Todo.md
|
164
|
-
- bin/console
|
165
|
-
- bin/setup
|
166
|
-
- config/data/default.yml
|
167
164
|
- exe/soaspec-generate
|
168
165
|
- exe/soaspec-init
|
169
166
|
- exe/soaspec-virtual-server
|
@@ -189,7 +186,6 @@ files:
|
|
189
186
|
- lib/soaspec/test_server/test_attribute.rb
|
190
187
|
- lib/soaspec/version.rb
|
191
188
|
- soaspec.gemspec
|
192
|
-
- template/soap_template.xml
|
193
189
|
- test.wsdl
|
194
190
|
- test.xml
|
195
191
|
- test_rest.rb
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "soaspec"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/config/data/default.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
small_id:
|
2
|
-
blz: 100
|
3
|
-
|
4
|
-
pet:
|
5
|
-
id: '1122338409073'
|
6
|
-
category:
|
7
|
-
id: '5436'
|
8
|
-
name: 'soaspec_test'
|
9
|
-
name: 'test_rest'
|
10
|
-
photoUrls:
|
11
|
-
- 'string'
|
12
|
-
tags:
|
13
|
-
- id: '1'
|
14
|
-
name: 'string'
|
15
|
-
status: sold
|
16
|
-
|
17
|
-
default_pet:
|
18
|
-
id: '123987'
|
19
|
-
category:
|
20
|
-
id: '1'
|
21
|
-
name: 'string'
|
22
|
-
name: 'new_puppy'
|
23
|
-
photoUrls:
|
24
|
-
- 'string'
|
25
|
-
tags:
|
26
|
-
- id: '1'
|
27
|
-
name: 'string'
|
28
|
-
status: available
|
29
|
-
|
30
|
-
pet1:
|
31
|
-
id: '123987'
|
32
|
-
|
33
|
-
pet2:
|
34
|
-
id: '9998772'
|
35
|
-
|
36
|
-
pet3:
|
37
|
-
id: '554678'
|
data/template/soap_template.xml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://thomas-bayer.com/blz/" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
|
2
|
-
<env:Body>
|
3
|
-
<tns:getBank>
|
4
|
-
<tns:blz><%= test_values[:blz] || '70070010' %></tns:blz>
|
5
|
-
</tns:getBank>
|
6
|
-
</env:Body>
|
7
|
-
</env:Envelope>
|