soaspec 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -1
- data/exe/soaspec-virtual-server +6 -10
- data/lib/soaspec.rb +3 -0
- data/lib/soaspec/exchange.rb +1 -0
- data/lib/soaspec/test_server/id_manager.rb +32 -0
- data/lib/soaspec/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a5dcd5cdd343b6810ee2db2355f21e54f656d0c
|
4
|
+
data.tar.gz: 34e57ec477e54a15732b2c2b790450f2c27fc758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a42cbc94cebdb981b04414e77ea422860776fbe78c85068e2168500164a2bb64609bec8a88e070e41a049148cad0faa78d94a323a892cc15e989617112441196
|
7
|
+
data.tar.gz: 6e90d5d6d7ef41900b2c1a1361ae6790a253521a0f3b298f8b4c35109a745410de4ac8fef3c48d25e6ec81b0325d543cd85ab1544bc07bb82600d5c1d9b2a6d8
|
data/ChangeLog
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
Version 0.1.5
|
2
|
+
* Enhancements
|
3
|
+
* Package spec changes status after a post is made. Help to illustrate scenario where status changes
|
4
|
+
* Record last exchange made for debugging purposes in 'last_exchange'
|
5
|
+
|
1
6
|
Version 0.1.4
|
2
7
|
* Enhancements
|
3
8
|
* create_file method create folders automatically if necessary
|
4
|
-
* Package spec to help
|
9
|
+
* Package spec to help learn testing for items in a list
|
5
10
|
* Added docs for soaspec-virtual-server
|
6
11
|
|
7
12
|
Version 0.1.3
|
data/exe/soaspec-virtual-server
CHANGED
@@ -54,16 +54,12 @@ class SoaspecVirtualServer < Sinatra::Application
|
|
54
54
|
'
|
55
55
|
end
|
56
56
|
get '/packages/:num/:id' do |num, id|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
true
|
64
|
-
end
|
65
|
-
result ||= true
|
66
|
-
JSON.generate(success: result, id: id)
|
57
|
+
JSON.generate(success: Soaspec::TestServer::IdManager.result_for(num, id), id: id)
|
58
|
+
end
|
59
|
+
|
60
|
+
post '/packages/developed' do
|
61
|
+
Soaspec::TestServer::IdManager.developed = request.body.include?('true')
|
62
|
+
Soaspec::TestServer::IdManager.developed.to_s
|
67
63
|
end
|
68
64
|
|
69
65
|
# Used for simple testing of posing
|
data/lib/soaspec.rb
CHANGED
@@ -27,6 +27,7 @@ require 'soaspec/test_server/test_attribute'
|
|
27
27
|
require 'soaspec/test_server/puppy_service'
|
28
28
|
require 'soaspec/test_server/invoices'
|
29
29
|
require 'soaspec/test_server/test_namespace'
|
30
|
+
require 'soaspec/test_server/id_manager'
|
30
31
|
require 'soaspec/wsdl_generator'
|
31
32
|
|
32
33
|
# Gem for handling SOAP and REST api tests
|
@@ -39,6 +40,8 @@ module Soaspec
|
|
39
40
|
attr_writer :debug_oauth
|
40
41
|
# Folder used to store templates for API calls
|
41
42
|
attr_accessor :template_folder
|
43
|
+
# Stores last exchange
|
44
|
+
attr_accessor :last_exchange
|
42
45
|
|
43
46
|
# Folder used to store credentials
|
44
47
|
# Used in auth2_file command
|
data/lib/soaspec/exchange.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Soaspec
|
2
|
+
module TestServer
|
3
|
+
# Handles returning ids dependent on a number of factors
|
4
|
+
# Made to demonstrate creating testing a list of ids
|
5
|
+
class IdManager
|
6
|
+
@developed = false
|
7
|
+
class << self
|
8
|
+
|
9
|
+
attr_accessor :developed
|
10
|
+
|
11
|
+
# @return Result depending on num, id and whether '@developed' is set
|
12
|
+
def result_for(num, id)
|
13
|
+
result = undeveloped_id(num, id) unless @developed
|
14
|
+
result || 'true'
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [String] true of false depending on num and id
|
18
|
+
def undeveloped_id(num, id)
|
19
|
+
case num
|
20
|
+
when '1', '4', '10' then 'false' if id == '40'
|
21
|
+
when '3', '11', '9' then 'false' if id == '74'
|
22
|
+
when '8', '6', '8' then 'false' if id == '80'
|
23
|
+
when '7', '5', '12' then 'false' if id == '64'
|
24
|
+
else
|
25
|
+
'true'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/soaspec/version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -359,6 +359,7 @@ files:
|
|
359
359
|
- lib/soaspec/spec_logger.rb
|
360
360
|
- lib/soaspec/test_server/bank.wsdl
|
361
361
|
- lib/soaspec/test_server/get_bank.rb
|
362
|
+
- lib/soaspec/test_server/id_manager.rb
|
362
363
|
- lib/soaspec/test_server/invoices.rb
|
363
364
|
- lib/soaspec/test_server/namespace.xml
|
364
365
|
- lib/soaspec/test_server/note.xml
|