soaspec 0.0.81 → 0.0.82

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +15 -15
  3. data/.gitlab-ci.yml +31 -31
  4. data/.rspec +3 -3
  5. data/.rubocop.yml +2 -2
  6. data/.travis.yml +5 -5
  7. data/CODE_OF_CONDUCT.md +74 -74
  8. data/ChangeLog +345 -341
  9. data/Gemfile +6 -6
  10. data/LICENSE.txt +21 -21
  11. data/README.md +85 -85
  12. data/Rakefile +24 -24
  13. data/Todo.md +6 -6
  14. data/exe/soaspec +123 -123
  15. data/exe/soaspec-virtual-server +98 -92
  16. data/exe/xml_to_yaml_file +60 -60
  17. data/lib/soaspec.rb +86 -85
  18. data/lib/soaspec/core_ext/hash.rb +83 -83
  19. data/lib/soaspec/exchange.rb +230 -230
  20. data/lib/soaspec/exchange_handlers/exchange_handler.rb +98 -98
  21. data/lib/soaspec/exchange_handlers/handler_accessors.rb +95 -95
  22. data/lib/soaspec/exchange_handlers/rest_handler.rb +367 -367
  23. data/lib/soaspec/exchange_handlers/rest_methods.rb +44 -44
  24. data/lib/soaspec/exchange_handlers/soap_handler.rb +231 -231
  25. data/lib/soaspec/exe_helpers.rb +56 -56
  26. data/lib/soaspec/generator/.rspec.erb +5 -5
  27. data/lib/soaspec/generator/.travis.yml.erb +5 -5
  28. data/lib/soaspec/generator/Gemfile.erb +8 -8
  29. data/lib/soaspec/generator/README.md.erb +29 -29
  30. data/lib/soaspec/generator/Rakefile.erb +19 -19
  31. data/lib/soaspec/generator/config/data/default.yml.erb +1 -1
  32. data/lib/soaspec/generator/lib/blz_service.rb.erb +24 -24
  33. data/lib/soaspec/generator/lib/dynamic_class_content.rb.erb +12 -12
  34. data/lib/soaspec/generator/lib/shared_example.rb.erb +8 -8
  35. data/lib/soaspec/generator/spec/dynamic_soap_spec.rb.erb +14 -14
  36. data/lib/soaspec/generator/spec/soap_spec.rb.erb +53 -53
  37. data/lib/soaspec/generator/spec/spec_helper.rb.erb +20 -20
  38. data/lib/soaspec/generator/template/soap_template.xml +6 -6
  39. data/lib/soaspec/interpreter.rb +25 -25
  40. data/lib/soaspec/matchers.rb +65 -65
  41. data/lib/soaspec/not_found_errors.rb +13 -13
  42. data/lib/soaspec/soaspec_shared_examples.rb +24 -24
  43. data/lib/soaspec/spec_logger.rb +27 -27
  44. data/lib/soaspec/test_server/bank.wsdl +90 -90
  45. data/lib/soaspec/test_server/get_bank.rb +160 -160
  46. data/lib/soaspec/test_server/invoices.rb +27 -27
  47. data/lib/soaspec/test_server/namespace.xml +15 -0
  48. data/lib/soaspec/test_server/note.xml +5 -5
  49. data/lib/soaspec/test_server/puppy_service.rb +20 -20
  50. data/lib/soaspec/test_server/test_attribute.rb +13 -13
  51. data/lib/soaspec/test_server/test_namespace.rb +13 -0
  52. data/lib/soaspec/version.rb +2 -2
  53. data/lib/soaspec/wsdl_generator.rb +93 -93
  54. data/soaspec.gemspec +45 -45
  55. data/test.wsdl +116 -116
  56. data/test.xml +10 -10
  57. data/test_rest.rb +97 -97
  58. data/test_wsdl.rb +43 -43
  59. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d0ce7232476ee664c72f0da3b4de626f492cde07
4
- data.tar.gz: 9201c90f1c9556586658cc55e5bb1d790469c393
2
+ SHA256:
3
+ metadata.gz: b665f8fd5cc430c65a0c58f55d089357300b02fe9317c8d81f266682ac9d6e7f
4
+ data.tar.gz: 965778e5a1208f0f2eb66d89f3f2100e6c2ce086a3a44ff56baa4df5ee3245c4
5
5
  SHA512:
6
- metadata.gz: 79afd7ed3dc188bffd720dff83647164f12cf9fe64603e51938dab0a5d8189bc08cd8401c3d5a82abebf5773d36cad670daf6af7d0ad0aa6cc8f77bd49ddcdfa
7
- data.tar.gz: 978cdd1b657de34b2f858b633183b6f23c69073a2c170b30eca213f3412cb5d8adb9f1b8ab85517c00d6f7fcb1ae4136bf891e1144120376c9ae0567305caa53
6
+ metadata.gz: 82c53305ca2d84fa2267f72406ba381bad05693bf2dcc1c6154b5ebebdd780ac66146db91b2a57f0f773511b29dd8d55688bec1eabe9e4a7e77a57c21b1c9517
7
+ data.tar.gz: d23504d491f992156cf434a368139cf762e83b6cd46d2108e1ddf0ff093fc75be38078168e84e1ee3c6264af36071e595e1df17e5cd302dd9f2c200797132071
data/.gitignore CHANGED
@@ -1,15 +1,15 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /logs/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /.idea/
11
- Gemfile.lock
12
- coverage
13
-
14
- # rspec failure tracking
15
- .rspec_status
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /logs/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.idea/
11
+ Gemfile.lock
12
+ coverage
13
+
14
+ # rspec failure tracking
15
+ .rspec_status
data/.gitlab-ci.yml CHANGED
@@ -1,32 +1,32 @@
1
- before_script:
2
- - apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
3
- - ruby -v
4
- - which ruby
5
- - gem install bundler rake --no-ri --no-rdoc
6
- - bundle install --jobs $(nproc) "${FLAGS[@]}"
7
-
8
- rspec:
9
- stage: test
10
- script:
11
- - bundle exec rake spec
12
- artifacts:
13
- paths:
14
- - coverage/
15
-
16
- cucumber:
17
- stage: test
18
- script:
19
- - bundle exec cucumber
20
-
21
- pages:
22
- stage: deploy
23
- dependencies:
24
- - rspec
25
- script:
26
- - mv coverage/ public/
27
- artifacts:
28
- paths:
29
- - public
30
- expire_in: 30 days
31
- only:
1
+ before_script:
2
+ - apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
3
+ - ruby -v
4
+ - which ruby
5
+ - gem install bundler rake --no-ri --no-rdoc
6
+ - bundle install --jobs $(nproc) "${FLAGS[@]}"
7
+
8
+ rspec:
9
+ stage: test
10
+ script:
11
+ - bundle exec rake spec
12
+ artifacts:
13
+ paths:
14
+ - coverage/
15
+
16
+ cucumber:
17
+ stage: test
18
+ script:
19
+ - bundle exec cucumber
20
+
21
+ pages:
22
+ stage: deploy
23
+ dependencies:
24
+ - rspec
25
+ script:
26
+ - mv coverage/ public/
27
+ artifacts:
28
+ paths:
29
+ - public
30
+ expire_in: 30 days
31
+ only:
32
32
  - master
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --require spec_helper
2
- --format documentation
3
- --color
1
+ --require spec_helper
2
+ --format documentation
3
+ --color
data/.rubocop.yml CHANGED
@@ -1,2 +1,2 @@
1
- Metrics/LineLength:
2
- Max: 154
1
+ Metrics/LineLength:
2
+ Max: 154
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.4
5
- before_install: gem install bundler -v 1.16.0
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.4
5
+ before_install: gem install bundler -v 1.16.0
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,74 +1,74 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at samuel.garratt@integrationqa.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at samuel.garratt@integrationqa.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/ChangeLog CHANGED
@@ -1,342 +1,346 @@
1
- Version 0.0.81
2
- * Enhancements
3
- * SoapHandler - define exchange method for each SOAP operation. See `one_off_spec` for example
4
-
5
- Version 0.0.80
6
- * Enhancements
7
- * `values_from_path` method on `RestHandler` to easily extract multiple values for an xpath or json path
8
- * Bug fix
9
- * Support response that has white space surrounding message
10
-
11
- Version 0.0.79
12
- * Enhancements
13
- * `values_from_path` method on `SoapHandler` to easily extract multiple values for an xpath
14
- * If `id` is specified on associated factory, FactoryBot will populate the primary factory with that id. See `rest/factory_spec` for eg
15
-
16
- Version 0.0.78
17
- * Enhancements
18
- * Use 'thor' for `soaspec generate`, allowing less prompt and more options through command line. Added tests for it
19
-
20
- Version 0.0.77
21
- * Enhancements
22
- * Use 'thor' for soaspec-init binary changing it to be `soaspec init`. Will update `soaspec-generate` in next version
23
- * Put pause of 1/2 a second for each API retry. Often retry is too quick otherwise
24
-
25
- Version 0.0.76
26
- * Bug fix
27
- * Fixed BLZService scenario on soaspec-virtual-server
28
- * Fixed return value for retry_for_success failure
29
- * Enhancements
30
- * Added method to indicate a factory create should actually return a failure status
31
-
32
- Version 0.0.75
33
- * Enhancements
34
- * For Factory created methods, set retry_for_success to true. Allow for this to be set at Exchange class level
35
-
36
- Version 0.0.74
37
- * Enhancements
38
- * RestHandler, enable api username to be set upon initialisation
39
-
40
- Version 0.0.73
41
- * Enhancements
42
- * Added 'default_handler' method with which define an exchange_handler to be created when an exchange is initialized
43
- * Refactoring
44
- * Use `@exchange_handler` instead of `@api_class` which is more consistent
45
-
46
- Version 0.0.72
47
- * Enhancements
48
- * Add ability to convert XML response to lower case for simpler xpath searching
49
-
50
- Version 0.0.71
51
- * Bug fix
52
- * Got exe 'soaspec-virtual-server' working
53
-
54
- Version 0.0.70
55
- * Enhancements
56
- * Added api_username method to REST handler to change user for an API during runtime
57
-
58
- Version 0.0.69
59
- * Enhancements
60
- * Calculate base_url ERB at time of handler's first request (Rather than when initialised).
61
- - Important for where base url uses ERB and so does oauth whose user may change
62
- * Demonstrate using oauth via spec
63
- * Demonstrate using basic auth via spec
64
-
65
- Version 0.0.68
66
- * Enhancements
67
- * Use ERB to calculate base_url for dynamic bases
68
-
69
- Version 0.0.67
70
- * Enhancements
71
- * Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
72
- - if first character of key is captial, PascalCase conversion is ignored
73
-
74
- Version 0.0.66
75
- * Enhancements
76
- * Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
77
- * This also converts paths obtaining elements to 'PascalCase' if they're simple and have no starting '//' or '$..'
78
-
79
- Version 0.0.65
80
- * Enhancements
81
- * Added ability to set 'suburl' and 'method' in Exchange accessor. Will be used in FactoryBot later
82
-
83
- Version 0.0.64
84
- * Enhancements
85
- * Got FactoryBot working for RestHandler. See specs for example
86
- * Add element? method to exchange to make it easier to check element is at path
87
- * Define 'element_name?' created when element is defined on ExchangeHandler
88
-
89
- Version 0.0.63
90
- * Enhancements
91
- * Interpret ERB for oauth credentials within oauth response. Needed for when params like 'username' can change in runtime
92
-
93
- Version 0.0.62
94
- * Enhancements
95
- * Use q parameter to simply to query parameters on REST requests
96
-
97
- Version 0.0.61
98
- * Enhancements
99
- * Retrieving oauth response try 3 times (to bypass intermittent errors)
100
-
101
- Version 0.0.60
102
- * Enhancements
103
- * Allow for factory_bot with automatic setting of missing setter methods
104
-
105
- Version 0.0.59
106
- * Enhancements
107
- * Perform ERB in headers to make using access_token using 'headers' possible
108
- * Try better way of testing `soaspec-init`.
109
-
110
- Version 0.0.58
111
- * Enhancements
112
- * Add method to set parts of the request body through `exchange[key]= 'value'`
113
- * Added example of Cucumber feature demonstrating this
114
-
115
- Version 0.0.56
116
- * Bug fix
117
- * Handle creating of traffic.log file within lib properly
118
-
119
- Version 0.0.55
120
- * Enhancements
121
- * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
122
-
123
- Version 0.0.54
124
- * Enhancements
125
- * Make 'headers' accessor for setting headers on RestHandler easier
126
-
127
- Version 0.0.53
128
- * Enhancements
129
- * Make attribute possible for REST methods as well (as they can use XML too)
130
- * For non XML, non JSON responses, handle with regex or key for a Hash
131
-
132
- Version 0.0.52
133
- * Enhancements
134
- * Now have 'attribute' accessor making it easy to access an attribute from a response
135
-
136
- Version 0.0.51
137
- * Enhancements
138
- * Allow for 'default_hash=' method to be used in RestHandler. See 'many_calls_one_method_spec' for example
139
- * Got 'element' accessor working correctly (See soap/hash_spec.rb + 'blz_service' for example)
140
-
141
- Version 0.0.50
142
- * Enhancements
143
- * Able to use ERB in oauth parameters and extract oauth hash with 'oauth_response' method defined by 'oauth_file'
144
-
145
- Version 0.0.47
146
- * Bug Fix
147
- * Using 'Strip namespace' handle both namespace or not dependent if used
148
-
149
- Version 0.0.47
150
- * Enhancements
151
- * 'success scenarios' shared eg and 'retry_for_success' exchange method's status codes include 200..299, not just 200.
152
-
153
- Version 0.0.46
154
- * Enhancements
155
- * 'include_key?' method use 'value_from_path'. Iterating through Hashes with 'include_key?' wouldn't work as expected with some JSON bodies with my current implementation
156
-
157
- Version 0.0.45
158
- * Enhancements
159
- * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
160
-
161
- Version 0.0.44
162
- * Enhancements
163
- * Test Server log to logs/test_server.log
164
- * Simplify ExchangeHandler storing and retrieving values (see soap/hash_spec.rb)
165
- * Make setting SoapHandler operation and other params possible through object instantiation. Less code needed
166
-
167
- Version 0.0.43
168
- * Bug fix
169
- * Remove Environment namespace from 'soaspec-generate'
170
- * Enhancements
171
- * Convenience methods for REST calls in which you can call something like 'ClassInheritingRestHandler.get(params)' See 'spec/soaspec/rest/one_off_spec.rb' for details
172
-
173
- Version 0.0.42
174
- * Enhancements
175
- * Set Soaspec.api_handler work class is created. No need to call '.to_s' method
176
-
177
- Version 0.0.41
178
- * Bug fix
179
- * soaspec-generate not designed to work with virtual service. Rakefile not try to set that up
180
-
181
- Version 0.0.40
182
- * Enhancements
183
- * soaspec-generate now handle a wsdl without parameters in the operation and rather look up input element type
184
- * test_server virtual service now handle scenario where bank is not found and test made for that
185
-
186
- Version 0.0.39
187
- * Spec
188
- * Create task to use soaspec-init to create test structure and test it.
189
- * Enhancements
190
- * Take away need to use Environment namespace
191
- * Added response headers to REST response log
192
- * Now using virtual Web Service for SOAP
193
-
194
- Version 0.0.38
195
- * Bug fix
196
- * Fixed error in soaspec-generate. TODO: Test this in CI
197
-
198
- Version 0.0.37 / 2018-3-16
199
- * Enhancements
200
- * Made retry_for_success method to keep making request until 200 status code if set on exchange
201
- * If '$' not included for json_path, by default a '$..' is added for convenience
202
-
203
- Version 0.0.36 / 2018-3-15
204
- * Bug fix
205
- * Make test name log in correct place
206
- * Enhancements
207
- * Made accessor 'mandatory_json_values' to make it easier to share mandatory json path - value pairs
208
- * Created 'store' method for handler through which one can store a value and use it later on it in the same context
209
- * Deprecated
210
- * Removed old 'mandatory_elements', 'mandatory_xpath_values' overridden way of handling data for favor of new way of it setting 'expected_mandatory_elements'
211
-
212
- Version 0.0.35 / 2018-3-13
213
- * Enhancements
214
- * Handle array of JSON hashes starting with '['
215
- * Handle patch and put methods with data for REST
216
-
217
- Version 0.0.34 / 2018-3-12
218
- * Enhancements
219
- * Add oauth2 and oauth2_file methods to make it easy to load oauth2 parameters. Still a work in progress to handle all oauth2 variations
220
-
221
- Version 0.0.33 / 2018-3-9
222
- * Enhancements
223
- * Use 'jsonpath' instead of dig to check JSON responses. Much better for finding complex paths
224
-
225
- Version 0.0.32 / 2018-3-9
226
- * Enhancements
227
- * Made :body key in hash that can be used to use JSON.generate for a payload when using rest_handler exchanges
228
-
229
- Version 0.0.31 / 2018-3-8
230
- * Enhancements
231
- * Compacted unit tests for exchange handler
232
- * Implemented include_key? and find via xpath for REST handler. See specs
233
-
234
- Version 0.0.30 / 2018-3-6
235
- * Bug fix
236
- * Made generated class file name in soaspec-generate snakecase (was CamelCase)
237
-
238
- Version 0.0.29 / 2018-3-6
239
- * Refactorings
240
- * Base 'test' class from 'Tester' to 'ExhangeHandler'
241
- * Made default Soap Handler class 'SoapHandler' and making use of 'BasicSoapHandler' deprecated
242
-
243
- Version 0.0.28 / 2018-3-6
244
- * Enhancements
245
- * Added not_found matcher and used in spec example
246
- * Only call request upon first need of an Exchange response. This means test request is made as part of 'it' rather than in describe
247
-
248
- Version 0.0.27 / 2018-3-5
249
- * Bug fix
250
- * Fixed log file not present error
251
- * Updated exe binaries to use latest format
252
-
253
- Version 0.0.26 / 2018-3-5
254
- * Refactorings
255
- * Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
256
-
257
- Version 0.0.25 / 2018-2-25
258
- * Enhancements
259
- * Updated rest_handler to convert JSON and XML into Hash and use it in 'contain_value'. This still needs work.
260
- * Showed example of workflow using 'pet' url
261
-
262
- Version 0.0.24 / 2018-2-25
263
- * Enhancements
264
- * Added to soaspec-generate more types when creating YAML with data (int, boolean, double and custom enumeration).
265
- * Binaries use common module (exe-helper) to reduce repeatability
266
- * TODO: soaspec-generate read xsd's mentioned to import in WSDL schema
267
-
268
- Version 0.0.23 / 2018-2-23
269
- * Enhancements
270
- * Created RestHandler class (Very messy and ugly still) to handle REST requests using style used for SOAP using Rest Client resource
271
-
272
- Version 0.0.22 / 2018-2-15
273
- * Enhancements
274
- * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
275
-
276
- Version 0.0.21 / 2018-1-29
277
- * Enhancements
278
- * Added soaspec-generate - still in POC mode to generate files from a WSDL.
279
- * Added test_wsdl to start at validating xml according to WSDL. Still needs polishing
280
-
281
- Version 0.0.20 / 2018-1-26
282
- * Enhancements
283
- * Added ability to strip namespaces 'Soaspec::Environment.strip_namespaces = true'. See spec for example
284
- * Fixes
285
- * Made custom error and used it to make 'have_element_at_xpath' work when negated
286
-
287
- Version 0.0.19 / 2018-1-25
288
- * Enhancements
289
- * Added own shared examples to init script and to in built specs
290
-
291
- Version 0.0.18 / 2018-1-25
292
- * Fixes
293
- * Updated 'soaspec-init' so that it works again.
294
- * Enhancements
295
- * Added example showing representing data for request in YAML
296
-
297
- Version 0.0.17 / 2018-1-25
298
- * Fixes
299
- * Updated hash search so that it handles Array
300
-
301
- Version 0.0.16 / 2018-1-23
302
- * Fixes
303
- * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
304
-
305
- Version 0.0.15 / 2018-1-23
306
- * Fixes
307
- * Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
308
- the user doing the conversion themselves.
309
-
310
- Version 0.0.14 / 2018-1-23
311
- * Fixes
312
- * Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
313
- Now it's more like something you can read and pass into Savon request.
314
-
315
- Version 0.0.13 / 2018-1-23
316
- * Enhancements
317
- * Executable to create xml file from yaml
318
-
319
- Version 0.0.12 / 2018/1-22
320
- * Enhancements
321
- * Example name added to log file
322
-
323
- Version 0.0.10 / 2018-1-21
324
- * Enhancements
325
- * Added [] method to perform xpath assertion
326
- * Using Savon xpath. No need to explicitly provide namespace for xpath
327
-
328
- Version 0.0.9 / 2018-1-20
329
- * Refactoring
330
- * class_options -> savon_options - More specific
331
- * default_operation -> operation - Not default anymore so better not in name
332
- * Enhancements
333
- * Made mandatory_xpath_values method to add to 'success scenarios' shared example
334
-
335
- Version 0.0.8 / 2018-1-19
336
- * Enhancements
337
- * Added root_attributes method to add attribute to the root class
338
-
339
- Version 0.0.7 / 2018-1-19
340
- * Enhancements
341
- * Added contain_key matcher
1
+ Version 0.0.82
2
+ * Enhancements
3
+ * Fixed namespace handling for REST
4
+
5
+ Version 0.0.81
6
+ * Enhancements
7
+ * SoapHandler - define exchange method for each SOAP operation. See `one_off_spec` for example
8
+
9
+ Version 0.0.80
10
+ * Enhancements
11
+ * `values_from_path` method on `RestHandler` to easily extract multiple values for an xpath or json path
12
+ * Bug fix
13
+ * Support response that has white space surrounding message
14
+
15
+ Version 0.0.79
16
+ * Enhancements
17
+ * `values_from_path` method on `SoapHandler` to easily extract multiple values for an xpath
18
+ * If `id` is specified on associated factory, FactoryBot will populate the primary factory with that id. See `rest/factory_spec` for eg
19
+
20
+ Version 0.0.78
21
+ * Enhancements
22
+ * Use 'thor' for `soaspec generate`, allowing less prompt and more options through command line. Added tests for it
23
+
24
+ Version 0.0.77
25
+ * Enhancements
26
+ * Use 'thor' for soaspec-init binary changing it to be `soaspec init`. Will update `soaspec-generate` in next version
27
+ * Put pause of 1/2 a second for each API retry. Often retry is too quick otherwise
28
+
29
+ Version 0.0.76
30
+ * Bug fix
31
+ * Fixed BLZService scenario on soaspec-virtual-server
32
+ * Fixed return value for retry_for_success failure
33
+ * Enhancements
34
+ * Added method to indicate a factory create should actually return a failure status
35
+
36
+ Version 0.0.75
37
+ * Enhancements
38
+ * For Factory created methods, set retry_for_success to true. Allow for this to be set at Exchange class level
39
+
40
+ Version 0.0.74
41
+ * Enhancements
42
+ * RestHandler, enable api username to be set upon initialisation
43
+
44
+ Version 0.0.73
45
+ * Enhancements
46
+ * Added 'default_handler' method with which define an exchange_handler to be created when an exchange is initialized
47
+ * Refactoring
48
+ * Use `@exchange_handler` instead of `@api_class` which is more consistent
49
+
50
+ Version 0.0.72
51
+ * Enhancements
52
+ * Add ability to convert XML response to lower case for simpler xpath searching
53
+
54
+ Version 0.0.71
55
+ * Bug fix
56
+ * Got exe 'soaspec-virtual-server' working
57
+
58
+ Version 0.0.70
59
+ * Enhancements
60
+ * Added api_username method to REST handler to change user for an API during runtime
61
+
62
+ Version 0.0.69
63
+ * Enhancements
64
+ * Calculate base_url ERB at time of handler's first request (Rather than when initialised).
65
+ - Important for where base url uses ERB and so does oauth whose user may change
66
+ * Demonstrate using oauth via spec
67
+ * Demonstrate using basic auth via spec
68
+
69
+ Version 0.0.68
70
+ * Enhancements
71
+ * Use ERB to calculate base_url for dynamic bases
72
+
73
+ Version 0.0.67
74
+ * Enhancements
75
+ * Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
76
+ - if first character of key is captial, PascalCase conversion is ignored
77
+
78
+ Version 0.0.66
79
+ * Enhancements
80
+ * Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
81
+ * This also converts paths obtaining elements to 'PascalCase' if they're simple and have no starting '//' or '$..'
82
+
83
+ Version 0.0.65
84
+ * Enhancements
85
+ * Added ability to set 'suburl' and 'method' in Exchange accessor. Will be used in FactoryBot later
86
+
87
+ Version 0.0.64
88
+ * Enhancements
89
+ * Got FactoryBot working for RestHandler. See specs for example
90
+ * Add element? method to exchange to make it easier to check element is at path
91
+ * Define 'element_name?' created when element is defined on ExchangeHandler
92
+
93
+ Version 0.0.63
94
+ * Enhancements
95
+ * Interpret ERB for oauth credentials within oauth response. Needed for when params like 'username' can change in runtime
96
+
97
+ Version 0.0.62
98
+ * Enhancements
99
+ * Use q parameter to simply to query parameters on REST requests
100
+
101
+ Version 0.0.61
102
+ * Enhancements
103
+ * Retrieving oauth response try 3 times (to bypass intermittent errors)
104
+
105
+ Version 0.0.60
106
+ * Enhancements
107
+ * Allow for factory_bot with automatic setting of missing setter methods
108
+
109
+ Version 0.0.59
110
+ * Enhancements
111
+ * Perform ERB in headers to make using access_token using 'headers' possible
112
+ * Try better way of testing `soaspec-init`.
113
+
114
+ Version 0.0.58
115
+ * Enhancements
116
+ * Add method to set parts of the request body through `exchange[key]= 'value'`
117
+ * Added example of Cucumber feature demonstrating this
118
+
119
+ Version 0.0.56
120
+ * Bug fix
121
+ * Handle creating of traffic.log file within lib properly
122
+
123
+ Version 0.0.55
124
+ * Enhancements
125
+ * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
126
+
127
+ Version 0.0.54
128
+ * Enhancements
129
+ * Make 'headers' accessor for setting headers on RestHandler easier
130
+
131
+ Version 0.0.53
132
+ * Enhancements
133
+ * Make attribute possible for REST methods as well (as they can use XML too)
134
+ * For non XML, non JSON responses, handle with regex or key for a Hash
135
+
136
+ Version 0.0.52
137
+ * Enhancements
138
+ * Now have 'attribute' accessor making it easy to access an attribute from a response
139
+
140
+ Version 0.0.51
141
+ * Enhancements
142
+ * Allow for 'default_hash=' method to be used in RestHandler. See 'many_calls_one_method_spec' for example
143
+ * Got 'element' accessor working correctly (See soap/hash_spec.rb + 'blz_service' for example)
144
+
145
+ Version 0.0.50
146
+ * Enhancements
147
+ * Able to use ERB in oauth parameters and extract oauth hash with 'oauth_response' method defined by 'oauth_file'
148
+
149
+ Version 0.0.47
150
+ * Bug Fix
151
+ * Using 'Strip namespace' handle both namespace or not dependent if used
152
+
153
+ Version 0.0.47
154
+ * Enhancements
155
+ * 'success scenarios' shared eg and 'retry_for_success' exchange method's status codes include 200..299, not just 200.
156
+
157
+ Version 0.0.46
158
+ * Enhancements
159
+ * 'include_key?' method use 'value_from_path'. Iterating through Hashes with 'include_key?' wouldn't work as expected with some JSON bodies with my current implementation
160
+
161
+ Version 0.0.45
162
+ * Enhancements
163
+ * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
164
+
165
+ Version 0.0.44
166
+ * Enhancements
167
+ * Test Server log to logs/test_server.log
168
+ * Simplify ExchangeHandler storing and retrieving values (see soap/hash_spec.rb)
169
+ * Make setting SoapHandler operation and other params possible through object instantiation. Less code needed
170
+
171
+ Version 0.0.43
172
+ * Bug fix
173
+ * Remove Environment namespace from 'soaspec-generate'
174
+ * Enhancements
175
+ * Convenience methods for REST calls in which you can call something like 'ClassInheritingRestHandler.get(params)' See 'spec/soaspec/rest/one_off_spec.rb' for details
176
+
177
+ Version 0.0.42
178
+ * Enhancements
179
+ * Set Soaspec.api_handler work class is created. No need to call '.to_s' method
180
+
181
+ Version 0.0.41
182
+ * Bug fix
183
+ * soaspec-generate not designed to work with virtual service. Rakefile not try to set that up
184
+
185
+ Version 0.0.40
186
+ * Enhancements
187
+ * soaspec-generate now handle a wsdl without parameters in the operation and rather look up input element type
188
+ * test_server virtual service now handle scenario where bank is not found and test made for that
189
+
190
+ Version 0.0.39
191
+ * Spec
192
+ * Create task to use soaspec-init to create test structure and test it.
193
+ * Enhancements
194
+ * Take away need to use Environment namespace
195
+ * Added response headers to REST response log
196
+ * Now using virtual Web Service for SOAP
197
+
198
+ Version 0.0.38
199
+ * Bug fix
200
+ * Fixed error in soaspec-generate. TODO: Test this in CI
201
+
202
+ Version 0.0.37 / 2018-3-16
203
+ * Enhancements
204
+ * Made retry_for_success method to keep making request until 200 status code if set on exchange
205
+ * If '$' not included for json_path, by default a '$..' is added for convenience
206
+
207
+ Version 0.0.36 / 2018-3-15
208
+ * Bug fix
209
+ * Make test name log in correct place
210
+ * Enhancements
211
+ * Made accessor 'mandatory_json_values' to make it easier to share mandatory json path - value pairs
212
+ * Created 'store' method for handler through which one can store a value and use it later on it in the same context
213
+ * Deprecated
214
+ * Removed old 'mandatory_elements', 'mandatory_xpath_values' overridden way of handling data for favor of new way of it setting 'expected_mandatory_elements'
215
+
216
+ Version 0.0.35 / 2018-3-13
217
+ * Enhancements
218
+ * Handle array of JSON hashes starting with '['
219
+ * Handle patch and put methods with data for REST
220
+
221
+ Version 0.0.34 / 2018-3-12
222
+ * Enhancements
223
+ * Add oauth2 and oauth2_file methods to make it easy to load oauth2 parameters. Still a work in progress to handle all oauth2 variations
224
+
225
+ Version 0.0.33 / 2018-3-9
226
+ * Enhancements
227
+ * Use 'jsonpath' instead of dig to check JSON responses. Much better for finding complex paths
228
+
229
+ Version 0.0.32 / 2018-3-9
230
+ * Enhancements
231
+ * Made :body key in hash that can be used to use JSON.generate for a payload when using rest_handler exchanges
232
+
233
+ Version 0.0.31 / 2018-3-8
234
+ * Enhancements
235
+ * Compacted unit tests for exchange handler
236
+ * Implemented include_key? and find via xpath for REST handler. See specs
237
+
238
+ Version 0.0.30 / 2018-3-6
239
+ * Bug fix
240
+ * Made generated class file name in soaspec-generate snakecase (was CamelCase)
241
+
242
+ Version 0.0.29 / 2018-3-6
243
+ * Refactorings
244
+ * Base 'test' class from 'Tester' to 'ExhangeHandler'
245
+ * Made default Soap Handler class 'SoapHandler' and making use of 'BasicSoapHandler' deprecated
246
+
247
+ Version 0.0.28 / 2018-3-6
248
+ * Enhancements
249
+ * Added not_found matcher and used in spec example
250
+ * Only call request upon first need of an Exchange response. This means test request is made as part of 'it' rather than in describe
251
+
252
+ Version 0.0.27 / 2018-3-5
253
+ * Bug fix
254
+ * Fixed log file not present error
255
+ * Updated exe binaries to use latest format
256
+
257
+ Version 0.0.26 / 2018-3-5
258
+ * Refactorings
259
+ * Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
260
+
261
+ Version 0.0.25 / 2018-2-25
262
+ * Enhancements
263
+ * Updated rest_handler to convert JSON and XML into Hash and use it in 'contain_value'. This still needs work.
264
+ * Showed example of workflow using 'pet' url
265
+
266
+ Version 0.0.24 / 2018-2-25
267
+ * Enhancements
268
+ * Added to soaspec-generate more types when creating YAML with data (int, boolean, double and custom enumeration).
269
+ * Binaries use common module (exe-helper) to reduce repeatability
270
+ * TODO: soaspec-generate read xsd's mentioned to import in WSDL schema
271
+
272
+ Version 0.0.23 / 2018-2-23
273
+ * Enhancements
274
+ * Created RestHandler class (Very messy and ugly still) to handle REST requests using style used for SOAP using Rest Client resource
275
+
276
+ Version 0.0.22 / 2018-2-15
277
+ * Enhancements
278
+ * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
279
+
280
+ Version 0.0.21 / 2018-1-29
281
+ * Enhancements
282
+ * Added soaspec-generate - still in POC mode to generate files from a WSDL.
283
+ * Added test_wsdl to start at validating xml according to WSDL. Still needs polishing
284
+
285
+ Version 0.0.20 / 2018-1-26
286
+ * Enhancements
287
+ * Added ability to strip namespaces 'Soaspec::Environment.strip_namespaces = true'. See spec for example
288
+ * Fixes
289
+ * Made custom error and used it to make 'have_element_at_xpath' work when negated
290
+
291
+ Version 0.0.19 / 2018-1-25
292
+ * Enhancements
293
+ * Added own shared examples to init script and to in built specs
294
+
295
+ Version 0.0.18 / 2018-1-25
296
+ * Fixes
297
+ * Updated 'soaspec-init' so that it works again.
298
+ * Enhancements
299
+ * Added example showing representing data for request in YAML
300
+
301
+ Version 0.0.17 / 2018-1-25
302
+ * Fixes
303
+ * Updated hash search so that it handles Array
304
+
305
+ Version 0.0.16 / 2018-1-23
306
+ * Fixes
307
+ * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
308
+
309
+ Version 0.0.15 / 2018-1-23
310
+ * Fixes
311
+ * Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
312
+ the user doing the conversion themselves.
313
+
314
+ Version 0.0.14 / 2018-1-23
315
+ * Fixes
316
+ * Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
317
+ Now it's more like something you can read and pass into Savon request.
318
+
319
+ Version 0.0.13 / 2018-1-23
320
+ * Enhancements
321
+ * Executable to create xml file from yaml
322
+
323
+ Version 0.0.12 / 2018/1-22
324
+ * Enhancements
325
+ * Example name added to log file
326
+
327
+ Version 0.0.10 / 2018-1-21
328
+ * Enhancements
329
+ * Added [] method to perform xpath assertion
330
+ * Using Savon xpath. No need to explicitly provide namespace for xpath
331
+
332
+ Version 0.0.9 / 2018-1-20
333
+ * Refactoring
334
+ * class_options -> savon_options - More specific
335
+ * default_operation -> operation - Not default anymore so better not in name
336
+ * Enhancements
337
+ * Made mandatory_xpath_values method to add to 'success scenarios' shared example
338
+
339
+ Version 0.0.8 / 2018-1-19
340
+ * Enhancements
341
+ * Added root_attributes method to add attribute to the root class
342
+
343
+ Version 0.0.7 / 2018-1-19
344
+ * Enhancements
345
+ * Added contain_key matcher
342
346
  * mandatory_elements method created for SoapHandler - can be used to add tests to success scenarios (see example get_weather_web_service class for details)