soaspec 0.0.85 → 0.0.86

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.
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 +362 -358
  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 -98
  16. data/exe/xml_to_yaml_file +60 -60
  17. data/lib/soaspec.rb +80 -73
  18. data/lib/soaspec/core_ext/hash.rb +83 -83
  19. data/lib/soaspec/exchange.rb +234 -234
  20. data/lib/soaspec/exchange_handlers/exchange_handler.rb +103 -103
  21. data/lib/soaspec/exchange_handlers/handler_accessors.rb +106 -106
  22. data/lib/soaspec/exchange_handlers/rest_accessors.rb +97 -83
  23. data/lib/soaspec/exchange_handlers/rest_handler.rb +296 -296
  24. data/lib/soaspec/exchange_handlers/rest_methods.rb +44 -44
  25. data/lib/soaspec/exchange_handlers/soap_handler.rb +236 -236
  26. data/lib/soaspec/exe_helpers.rb +56 -56
  27. data/lib/soaspec/generator/.rspec.erb +5 -5
  28. data/lib/soaspec/generator/.travis.yml.erb +5 -5
  29. data/lib/soaspec/generator/Gemfile.erb +8 -8
  30. data/lib/soaspec/generator/README.md.erb +29 -29
  31. data/lib/soaspec/generator/Rakefile.erb +19 -19
  32. data/lib/soaspec/generator/config/data/default.yml.erb +1 -1
  33. data/lib/soaspec/generator/lib/blz_service.rb.erb +26 -26
  34. data/lib/soaspec/generator/lib/dynamic_class_content.rb.erb +12 -12
  35. data/lib/soaspec/generator/lib/shared_example.rb.erb +8 -8
  36. data/lib/soaspec/generator/spec/dynamic_soap_spec.rb.erb +12 -12
  37. data/lib/soaspec/generator/spec/soap_spec.rb.erb +51 -51
  38. data/lib/soaspec/generator/spec/spec_helper.rb.erb +20 -20
  39. data/lib/soaspec/generator/template/soap_template.xml +6 -6
  40. data/lib/soaspec/interpreter.rb +40 -40
  41. data/lib/soaspec/matchers.rb +65 -65
  42. data/lib/soaspec/not_found_errors.rb +13 -13
  43. data/lib/soaspec/soaspec_shared_examples.rb +24 -24
  44. data/lib/soaspec/spec_logger.rb +27 -27
  45. data/lib/soaspec/test_server/bank.wsdl +90 -90
  46. data/lib/soaspec/test_server/get_bank.rb +160 -160
  47. data/lib/soaspec/test_server/invoices.rb +27 -27
  48. data/lib/soaspec/test_server/namespace.xml +14 -14
  49. data/lib/soaspec/test_server/note.xml +5 -5
  50. data/lib/soaspec/test_server/puppy_service.rb +20 -20
  51. data/lib/soaspec/test_server/test_attribute.rb +13 -13
  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 +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: f08d6c3e2e6a997ad5502fc3734af904a6a6d382f96ade70eba5bd1e7e3fc739
4
- data.tar.gz: 23f32d1bddc77c6bbc31ef12c24b1fe5223651d08f425d72320a177ac8a00850
2
+ SHA1:
3
+ metadata.gz: 32fc01d8faf3e3605348300c6be499db923da39b
4
+ data.tar.gz: ea571b9c2bfdab7ad19d6657429c08d7fe4e92f7
5
5
  SHA512:
6
- metadata.gz: c35253d0eaae45312f1a149320c91112a213bdc0cc8f2a886454757d4bdaaf4020864c733d5459bd39a8b268dca011d7fb5e2d783d3c32179280e43b6b0b1bd5
7
- data.tar.gz: c872d3b2bf8be8560fa23e492006da4ecca735faf423a67990f7a2caf9647566138ab9fd64c64f4da13a67b6de4138c567ac6da5765e341f4132664997057fec
6
+ metadata.gz: c9ed4e0de6079eb02bc357f56e719c6c9df1dc01c62991455ea3a3cb5600c9bce6700ee5722ef6b86750697b9f2d476f907008b804e8bb4a24282bbb852e02c0
7
+ data.tar.gz: e2e6e18910b617bb6dae289e4c61f14b8d6f98d7c386dea437aeb17a7bb4d05736ab188759e1c2c3223bdfaf32598c1daf562a278fbd70d625960cec4422a955
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
@@ -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
@@ -1,2 +1,2 @@
1
- Metrics/LineLength:
2
- Max: 154
1
+ Metrics/LineLength:
2
+ Max: 154
@@ -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
@@ -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,359 +1,363 @@
1
- Version 0.0.85
2
- * Enhancements
3
- * Interpret XML and JSON better so that JSON with XML in it's tags is catered for
4
-
5
- Version 0.0.84
6
- * Enhancements
7
- * 'strip_namespaces' defined in exchange handlers not globally which makes more sense
8
- * Created 'to_hash' method for Exchange that returns a Hash of XML or JSON response (primarily for REST)
9
-
10
- Version 0.0.83
11
- * Enhancements
12
- * Handle BOM or other characters that could be at start of xml of json response string
13
-
14
- Version 0.0.82
15
- * Enhancements
16
- * Fixed namespace handling for REST
17
-
18
- Version 0.0.81
19
- * Enhancements
20
- * SoapHandler - define exchange method for each SOAP operation. See `one_off_spec` for example
21
-
22
- Version 0.0.80
23
- * Enhancements
24
- * `values_from_path` method on `RestHandler` to easily extract multiple values for an xpath or json path
25
- * Bug fix
26
- * Support response that has white space surrounding message
27
-
28
- Version 0.0.79
29
- * Enhancements
30
- * `values_from_path` method on `SoapHandler` to easily extract multiple values for an xpath
31
- * If `id` is specified on associated factory, FactoryBot will populate the primary factory with that id. See `rest/factory_spec` for eg
32
-
33
- Version 0.0.78
34
- * Enhancements
35
- * Use 'thor' for `soaspec generate`, allowing less prompt and more options through command line. Added tests for it
36
-
37
- Version 0.0.77
38
- * Enhancements
39
- * Use 'thor' for soaspec-init binary changing it to be `soaspec init`. Will update `soaspec-generate` in next version
40
- * Put pause of 1/2 a second for each API retry. Often retry is too quick otherwise
41
-
42
- Version 0.0.76
43
- * Bug fix
44
- * Fixed BLZService scenario on soaspec-virtual-server
45
- * Fixed return value for retry_for_success failure
46
- * Enhancements
47
- * Added method to indicate a factory create should actually return a failure status
48
-
49
- Version 0.0.75
50
- * Enhancements
51
- * For Factory created methods, set retry_for_success to true. Allow for this to be set at Exchange class level
52
-
53
- Version 0.0.74
54
- * Enhancements
55
- * RestHandler, enable api username to be set upon initialisation
56
-
57
- Version 0.0.73
58
- * Enhancements
59
- * Added 'default_handler' method with which define an exchange_handler to be created when an exchange is initialized
60
- * Refactoring
61
- * Use `@exchange_handler` instead of `@api_class` which is more consistent
62
-
63
- Version 0.0.72
64
- * Enhancements
65
- * Add ability to convert XML response to lower case for simpler xpath searching
66
-
67
- Version 0.0.71
68
- * Bug fix
69
- * Got exe 'soaspec-virtual-server' working
70
-
71
- Version 0.0.70
72
- * Enhancements
73
- * Added api_username method to REST handler to change user for an API during runtime
74
-
75
- Version 0.0.69
76
- * Enhancements
77
- * Calculate base_url ERB at time of handler's first request (Rather than when initialised).
78
- - Important for where base url uses ERB and so does oauth whose user may change
79
- * Demonstrate using oauth via spec
80
- * Demonstrate using basic auth via spec
81
-
82
- Version 0.0.68
83
- * Enhancements
84
- * Use ERB to calculate base_url for dynamic bases
85
-
86
- Version 0.0.67
87
- * Enhancements
88
- * Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
89
- - if first character of key is captial, PascalCase conversion is ignored
90
-
91
- Version 0.0.66
92
- * Enhancements
93
- * Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
94
- * This also converts paths obtaining elements to 'PascalCase' if they're simple and have no starting '//' or '$..'
95
-
96
- Version 0.0.65
97
- * Enhancements
98
- * Added ability to set 'suburl' and 'method' in Exchange accessor. Will be used in FactoryBot later
99
-
100
- Version 0.0.64
101
- * Enhancements
102
- * Got FactoryBot working for RestHandler. See specs for example
103
- * Add element? method to exchange to make it easier to check element is at path
104
- * Define 'element_name?' created when element is defined on ExchangeHandler
105
-
106
- Version 0.0.63
107
- * Enhancements
108
- * Interpret ERB for oauth credentials within oauth response. Needed for when params like 'username' can change in runtime
109
-
110
- Version 0.0.62
111
- * Enhancements
112
- * Use q parameter to simply to query parameters on REST requests
113
-
114
- Version 0.0.61
115
- * Enhancements
116
- * Retrieving oauth response try 3 times (to bypass intermittent errors)
117
-
118
- Version 0.0.60
119
- * Enhancements
120
- * Allow for factory_bot with automatic setting of missing setter methods
121
-
122
- Version 0.0.59
123
- * Enhancements
124
- * Perform ERB in headers to make using access_token using 'headers' possible
125
- * Try better way of testing `soaspec-init`.
126
-
127
- Version 0.0.58
128
- * Enhancements
129
- * Add method to set parts of the request body through `exchange[key]= 'value'`
130
- * Added example of Cucumber feature demonstrating this
131
-
132
- Version 0.0.56
133
- * Bug fix
134
- * Handle creating of traffic.log file within lib properly
135
-
136
- Version 0.0.55
137
- * Enhancements
138
- * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
139
-
140
- Version 0.0.54
141
- * Enhancements
142
- * Make 'headers' accessor for setting headers on RestHandler easier
143
-
144
- Version 0.0.53
145
- * Enhancements
146
- * Make attribute possible for REST methods as well (as they can use XML too)
147
- * For non XML, non JSON responses, handle with regex or key for a Hash
148
-
149
- Version 0.0.52
150
- * Enhancements
151
- * Now have 'attribute' accessor making it easy to access an attribute from a response
152
-
153
- Version 0.0.51
154
- * Enhancements
155
- * Allow for 'default_hash=' method to be used in RestHandler. See 'many_calls_one_method_spec' for example
156
- * Got 'element' accessor working correctly (See soap/hash_spec.rb + 'blz_service' for example)
157
-
158
- Version 0.0.50
159
- * Enhancements
160
- * Able to use ERB in oauth parameters and extract oauth hash with 'oauth_response' method defined by 'oauth_file'
161
-
162
- Version 0.0.47
163
- * Bug Fix
164
- * Using 'Strip namespace' handle both namespace or not dependent if used
165
-
166
- Version 0.0.47
167
- * Enhancements
168
- * 'success scenarios' shared eg and 'retry_for_success' exchange method's status codes include 200..299, not just 200.
169
-
170
- Version 0.0.46
171
- * Enhancements
172
- * '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
173
-
174
- Version 0.0.45
175
- * Enhancements
176
- * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
177
-
178
- Version 0.0.44
179
- * Enhancements
180
- * Test Server log to logs/test_server.log
181
- * Simplify ExchangeHandler storing and retrieving values (see soap/hash_spec.rb)
182
- * Make setting SoapHandler operation and other params possible through object instantiation. Less code needed
183
-
184
- Version 0.0.43
185
- * Bug fix
186
- * Remove Environment namespace from 'soaspec-generate'
187
- * Enhancements
188
- * 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
189
-
190
- Version 0.0.42
191
- * Enhancements
192
- * Set Soaspec.api_handler work class is created. No need to call '.to_s' method
193
-
194
- Version 0.0.41
195
- * Bug fix
196
- * soaspec-generate not designed to work with virtual service. Rakefile not try to set that up
197
-
198
- Version 0.0.40
199
- * Enhancements
200
- * soaspec-generate now handle a wsdl without parameters in the operation and rather look up input element type
201
- * test_server virtual service now handle scenario where bank is not found and test made for that
202
-
203
- Version 0.0.39
204
- * Spec
205
- * Create task to use soaspec-init to create test structure and test it.
206
- * Enhancements
207
- * Take away need to use Environment namespace
208
- * Added response headers to REST response log
209
- * Now using virtual Web Service for SOAP
210
-
211
- Version 0.0.38
212
- * Bug fix
213
- * Fixed error in soaspec-generate. TODO: Test this in CI
214
-
215
- Version 0.0.37 / 2018-3-16
216
- * Enhancements
217
- * Made retry_for_success method to keep making request until 200 status code if set on exchange
218
- * If '$' not included for json_path, by default a '$..' is added for convenience
219
-
220
- Version 0.0.36 / 2018-3-15
221
- * Bug fix
222
- * Make test name log in correct place
223
- * Enhancements
224
- * Made accessor 'mandatory_json_values' to make it easier to share mandatory json path - value pairs
225
- * Created 'store' method for handler through which one can store a value and use it later on it in the same context
226
- * Deprecated
227
- * Removed old 'mandatory_elements', 'mandatory_xpath_values' overridden way of handling data for favor of new way of it setting 'expected_mandatory_elements'
228
-
229
- Version 0.0.35 / 2018-3-13
230
- * Enhancements
231
- * Handle array of JSON hashes starting with '['
232
- * Handle patch and put methods with data for REST
233
-
234
- Version 0.0.34 / 2018-3-12
235
- * Enhancements
236
- * Add oauth2 and oauth2_file methods to make it easy to load oauth2 parameters. Still a work in progress to handle all oauth2 variations
237
-
238
- Version 0.0.33 / 2018-3-9
239
- * Enhancements
240
- * Use 'jsonpath' instead of dig to check JSON responses. Much better for finding complex paths
241
-
242
- Version 0.0.32 / 2018-3-9
243
- * Enhancements
244
- * Made :body key in hash that can be used to use JSON.generate for a payload when using rest_handler exchanges
245
-
246
- Version 0.0.31 / 2018-3-8
247
- * Enhancements
248
- * Compacted unit tests for exchange handler
249
- * Implemented include_key? and find via xpath for REST handler. See specs
250
-
251
- Version 0.0.30 / 2018-3-6
252
- * Bug fix
253
- * Made generated class file name in soaspec-generate snakecase (was CamelCase)
254
-
255
- Version 0.0.29 / 2018-3-6
256
- * Refactorings
257
- * Base 'test' class from 'Tester' to 'ExhangeHandler'
258
- * Made default Soap Handler class 'SoapHandler' and making use of 'BasicSoapHandler' deprecated
259
-
260
- Version 0.0.28 / 2018-3-6
261
- * Enhancements
262
- * Added not_found matcher and used in spec example
263
- * Only call request upon first need of an Exchange response. This means test request is made as part of 'it' rather than in describe
264
-
265
- Version 0.0.27 / 2018-3-5
266
- * Bug fix
267
- * Fixed log file not present error
268
- * Updated exe binaries to use latest format
269
-
270
- Version 0.0.26 / 2018-3-5
271
- * Refactorings
272
- * Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
273
-
274
- Version 0.0.25 / 2018-2-25
275
- * Enhancements
276
- * Updated rest_handler to convert JSON and XML into Hash and use it in 'contain_value'. This still needs work.
277
- * Showed example of workflow using 'pet' url
278
-
279
- Version 0.0.24 / 2018-2-25
280
- * Enhancements
281
- * Added to soaspec-generate more types when creating YAML with data (int, boolean, double and custom enumeration).
282
- * Binaries use common module (exe-helper) to reduce repeatability
283
- * TODO: soaspec-generate read xsd's mentioned to import in WSDL schema
284
-
285
- Version 0.0.23 / 2018-2-23
286
- * Enhancements
287
- * Created RestHandler class (Very messy and ugly still) to handle REST requests using style used for SOAP using Rest Client resource
288
-
289
- Version 0.0.22 / 2018-2-15
290
- * Enhancements
291
- * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
292
-
293
- Version 0.0.21 / 2018-1-29
294
- * Enhancements
295
- * Added soaspec-generate - still in POC mode to generate files from a WSDL.
296
- * Added test_wsdl to start at validating xml according to WSDL. Still needs polishing
297
-
298
- Version 0.0.20 / 2018-1-26
299
- * Enhancements
300
- * Added ability to strip namespaces 'Soaspec::Environment.strip_namespaces = true'. See spec for example
301
- * Fixes
302
- * Made custom error and used it to make 'have_element_at_xpath' work when negated
303
-
304
- Version 0.0.19 / 2018-1-25
305
- * Enhancements
306
- * Added own shared examples to init script and to in built specs
307
-
308
- Version 0.0.18 / 2018-1-25
309
- * Fixes
310
- * Updated 'soaspec-init' so that it works again.
311
- * Enhancements
312
- * Added example showing representing data for request in YAML
313
-
314
- Version 0.0.17 / 2018-1-25
315
- * Fixes
316
- * Updated hash search so that it handles Array
317
-
318
- Version 0.0.16 / 2018-1-23
319
- * Fixes
320
- * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
321
-
322
- Version 0.0.15 / 2018-1-23
323
- * Fixes
324
- * Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
325
- the user doing the conversion themselves.
326
-
327
- Version 0.0.14 / 2018-1-23
328
- * Fixes
329
- * Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
330
- Now it's more like something you can read and pass into Savon request.
331
-
332
- Version 0.0.13 / 2018-1-23
333
- * Enhancements
334
- * Executable to create xml file from yaml
335
-
336
- Version 0.0.12 / 2018/1-22
337
- * Enhancements
338
- * Example name added to log file
339
-
340
- Version 0.0.10 / 2018-1-21
341
- * Enhancements
342
- * Added [] method to perform xpath assertion
343
- * Using Savon xpath. No need to explicitly provide namespace for xpath
344
-
345
- Version 0.0.9 / 2018-1-20
346
- * Refactoring
347
- * class_options -> savon_options - More specific
348
- * default_operation -> operation - Not default anymore so better not in name
349
- * Enhancements
350
- * Made mandatory_xpath_values method to add to 'success scenarios' shared example
351
-
352
- Version 0.0.8 / 2018-1-19
353
- * Enhancements
354
- * Added root_attributes method to add attribute to the root class
355
-
356
- Version 0.0.7 / 2018-1-19
357
- * Enhancements
358
- * Added contain_key matcher
1
+ Version 0.0.86
2
+ * Enhancements
3
+ * 'debug_oauth' attribute used to toggle showing params used in retrieving access token
4
+
5
+ Version 0.0.85
6
+ * Enhancements
7
+ * Interpret XML and JSON better so that JSON with XML in it's tags is catered for
8
+
9
+ Version 0.0.84
10
+ * Enhancements
11
+ * 'strip_namespaces' defined in exchange handlers not globally which makes more sense
12
+ * Created 'to_hash' method for Exchange that returns a Hash of XML or JSON response (primarily for REST)
13
+
14
+ Version 0.0.83
15
+ * Enhancements
16
+ * Handle BOM or other characters that could be at start of xml of json response string
17
+
18
+ Version 0.0.82
19
+ * Enhancements
20
+ * Fixed namespace handling for REST
21
+
22
+ Version 0.0.81
23
+ * Enhancements
24
+ * SoapHandler - define exchange method for each SOAP operation. See `one_off_spec` for example
25
+
26
+ Version 0.0.80
27
+ * Enhancements
28
+ * `values_from_path` method on `RestHandler` to easily extract multiple values for an xpath or json path
29
+ * Bug fix
30
+ * Support response that has white space surrounding message
31
+
32
+ Version 0.0.79
33
+ * Enhancements
34
+ * `values_from_path` method on `SoapHandler` to easily extract multiple values for an xpath
35
+ * If `id` is specified on associated factory, FactoryBot will populate the primary factory with that id. See `rest/factory_spec` for eg
36
+
37
+ Version 0.0.78
38
+ * Enhancements
39
+ * Use 'thor' for `soaspec generate`, allowing less prompt and more options through command line. Added tests for it
40
+
41
+ Version 0.0.77
42
+ * Enhancements
43
+ * Use 'thor' for soaspec-init binary changing it to be `soaspec init`. Will update `soaspec-generate` in next version
44
+ * Put pause of 1/2 a second for each API retry. Often retry is too quick otherwise
45
+
46
+ Version 0.0.76
47
+ * Bug fix
48
+ * Fixed BLZService scenario on soaspec-virtual-server
49
+ * Fixed return value for retry_for_success failure
50
+ * Enhancements
51
+ * Added method to indicate a factory create should actually return a failure status
52
+
53
+ Version 0.0.75
54
+ * Enhancements
55
+ * For Factory created methods, set retry_for_success to true. Allow for this to be set at Exchange class level
56
+
57
+ Version 0.0.74
58
+ * Enhancements
59
+ * RestHandler, enable api username to be set upon initialisation
60
+
61
+ Version 0.0.73
62
+ * Enhancements
63
+ * Added 'default_handler' method with which define an exchange_handler to be created when an exchange is initialized
64
+ * Refactoring
65
+ * Use `@exchange_handler` instead of `@api_class` which is more consistent
66
+
67
+ Version 0.0.72
68
+ * Enhancements
69
+ * Add ability to convert XML response to lower case for simpler xpath searching
70
+
71
+ Version 0.0.71
72
+ * Bug fix
73
+ * Got exe 'soaspec-virtual-server' working
74
+
75
+ Version 0.0.70
76
+ * Enhancements
77
+ * Added api_username method to REST handler to change user for an API during runtime
78
+
79
+ Version 0.0.69
80
+ * Enhancements
81
+ * Calculate base_url ERB at time of handler's first request (Rather than when initialised).
82
+ - Important for where base url uses ERB and so does oauth whose user may change
83
+ * Demonstrate using oauth via spec
84
+ * Demonstrate using basic auth via spec
85
+
86
+ Version 0.0.68
87
+ * Enhancements
88
+ * Use ERB to calculate base_url for dynamic bases
89
+
90
+ Version 0.0.67
91
+ * Enhancements
92
+ * Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
93
+ - if first character of key is captial, PascalCase conversion is ignored
94
+
95
+ Version 0.0.66
96
+ * Enhancements
97
+ * Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
98
+ * This also converts paths obtaining elements to 'PascalCase' if they're simple and have no starting '//' or '$..'
99
+
100
+ Version 0.0.65
101
+ * Enhancements
102
+ * Added ability to set 'suburl' and 'method' in Exchange accessor. Will be used in FactoryBot later
103
+
104
+ Version 0.0.64
105
+ * Enhancements
106
+ * Got FactoryBot working for RestHandler. See specs for example
107
+ * Add element? method to exchange to make it easier to check element is at path
108
+ * Define 'element_name?' created when element is defined on ExchangeHandler
109
+
110
+ Version 0.0.63
111
+ * Enhancements
112
+ * Interpret ERB for oauth credentials within oauth response. Needed for when params like 'username' can change in runtime
113
+
114
+ Version 0.0.62
115
+ * Enhancements
116
+ * Use q parameter to simply to query parameters on REST requests
117
+
118
+ Version 0.0.61
119
+ * Enhancements
120
+ * Retrieving oauth response try 3 times (to bypass intermittent errors)
121
+
122
+ Version 0.0.60
123
+ * Enhancements
124
+ * Allow for factory_bot with automatic setting of missing setter methods
125
+
126
+ Version 0.0.59
127
+ * Enhancements
128
+ * Perform ERB in headers to make using access_token using 'headers' possible
129
+ * Try better way of testing `soaspec-init`.
130
+
131
+ Version 0.0.58
132
+ * Enhancements
133
+ * Add method to set parts of the request body through `exchange[key]= 'value'`
134
+ * Added example of Cucumber feature demonstrating this
135
+
136
+ Version 0.0.56
137
+ * Bug fix
138
+ * Handle creating of traffic.log file within lib properly
139
+
140
+ Version 0.0.55
141
+ * Enhancements
142
+ * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
143
+
144
+ Version 0.0.54
145
+ * Enhancements
146
+ * Make 'headers' accessor for setting headers on RestHandler easier
147
+
148
+ Version 0.0.53
149
+ * Enhancements
150
+ * Make attribute possible for REST methods as well (as they can use XML too)
151
+ * For non XML, non JSON responses, handle with regex or key for a Hash
152
+
153
+ Version 0.0.52
154
+ * Enhancements
155
+ * Now have 'attribute' accessor making it easy to access an attribute from a response
156
+
157
+ Version 0.0.51
158
+ * Enhancements
159
+ * Allow for 'default_hash=' method to be used in RestHandler. See 'many_calls_one_method_spec' for example
160
+ * Got 'element' accessor working correctly (See soap/hash_spec.rb + 'blz_service' for example)
161
+
162
+ Version 0.0.50
163
+ * Enhancements
164
+ * Able to use ERB in oauth parameters and extract oauth hash with 'oauth_response' method defined by 'oauth_file'
165
+
166
+ Version 0.0.47
167
+ * Bug Fix
168
+ * Using 'Strip namespace' handle both namespace or not dependent if used
169
+
170
+ Version 0.0.47
171
+ * Enhancements
172
+ * 'success scenarios' shared eg and 'retry_for_success' exchange method's status codes include 200..299, not just 200.
173
+
174
+ Version 0.0.46
175
+ * Enhancements
176
+ * '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
177
+
178
+ Version 0.0.45
179
+ * Enhancements
180
+ * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
181
+
182
+ Version 0.0.44
183
+ * Enhancements
184
+ * Test Server log to logs/test_server.log
185
+ * Simplify ExchangeHandler storing and retrieving values (see soap/hash_spec.rb)
186
+ * Make setting SoapHandler operation and other params possible through object instantiation. Less code needed
187
+
188
+ Version 0.0.43
189
+ * Bug fix
190
+ * Remove Environment namespace from 'soaspec-generate'
191
+ * Enhancements
192
+ * 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
193
+
194
+ Version 0.0.42
195
+ * Enhancements
196
+ * Set Soaspec.api_handler work class is created. No need to call '.to_s' method
197
+
198
+ Version 0.0.41
199
+ * Bug fix
200
+ * soaspec-generate not designed to work with virtual service. Rakefile not try to set that up
201
+
202
+ Version 0.0.40
203
+ * Enhancements
204
+ * soaspec-generate now handle a wsdl without parameters in the operation and rather look up input element type
205
+ * test_server virtual service now handle scenario where bank is not found and test made for that
206
+
207
+ Version 0.0.39
208
+ * Spec
209
+ * Create task to use soaspec-init to create test structure and test it.
210
+ * Enhancements
211
+ * Take away need to use Environment namespace
212
+ * Added response headers to REST response log
213
+ * Now using virtual Web Service for SOAP
214
+
215
+ Version 0.0.38
216
+ * Bug fix
217
+ * Fixed error in soaspec-generate. TODO: Test this in CI
218
+
219
+ Version 0.0.37 / 2018-3-16
220
+ * Enhancements
221
+ * Made retry_for_success method to keep making request until 200 status code if set on exchange
222
+ * If '$' not included for json_path, by default a '$..' is added for convenience
223
+
224
+ Version 0.0.36 / 2018-3-15
225
+ * Bug fix
226
+ * Make test name log in correct place
227
+ * Enhancements
228
+ * Made accessor 'mandatory_json_values' to make it easier to share mandatory json path - value pairs
229
+ * Created 'store' method for handler through which one can store a value and use it later on it in the same context
230
+ * Deprecated
231
+ * Removed old 'mandatory_elements', 'mandatory_xpath_values' overridden way of handling data for favor of new way of it setting 'expected_mandatory_elements'
232
+
233
+ Version 0.0.35 / 2018-3-13
234
+ * Enhancements
235
+ * Handle array of JSON hashes starting with '['
236
+ * Handle patch and put methods with data for REST
237
+
238
+ Version 0.0.34 / 2018-3-12
239
+ * Enhancements
240
+ * Add oauth2 and oauth2_file methods to make it easy to load oauth2 parameters. Still a work in progress to handle all oauth2 variations
241
+
242
+ Version 0.0.33 / 2018-3-9
243
+ * Enhancements
244
+ * Use 'jsonpath' instead of dig to check JSON responses. Much better for finding complex paths
245
+
246
+ Version 0.0.32 / 2018-3-9
247
+ * Enhancements
248
+ * Made :body key in hash that can be used to use JSON.generate for a payload when using rest_handler exchanges
249
+
250
+ Version 0.0.31 / 2018-3-8
251
+ * Enhancements
252
+ * Compacted unit tests for exchange handler
253
+ * Implemented include_key? and find via xpath for REST handler. See specs
254
+
255
+ Version 0.0.30 / 2018-3-6
256
+ * Bug fix
257
+ * Made generated class file name in soaspec-generate snakecase (was CamelCase)
258
+
259
+ Version 0.0.29 / 2018-3-6
260
+ * Refactorings
261
+ * Base 'test' class from 'Tester' to 'ExhangeHandler'
262
+ * Made default Soap Handler class 'SoapHandler' and making use of 'BasicSoapHandler' deprecated
263
+
264
+ Version 0.0.28 / 2018-3-6
265
+ * Enhancements
266
+ * Added not_found matcher and used in spec example
267
+ * Only call request upon first need of an Exchange response. This means test request is made as part of 'it' rather than in describe
268
+
269
+ Version 0.0.27 / 2018-3-5
270
+ * Bug fix
271
+ * Fixed log file not present error
272
+ * Updated exe binaries to use latest format
273
+
274
+ Version 0.0.26 / 2018-3-5
275
+ * Refactorings
276
+ * Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
277
+
278
+ Version 0.0.25 / 2018-2-25
279
+ * Enhancements
280
+ * Updated rest_handler to convert JSON and XML into Hash and use it in 'contain_value'. This still needs work.
281
+ * Showed example of workflow using 'pet' url
282
+
283
+ Version 0.0.24 / 2018-2-25
284
+ * Enhancements
285
+ * Added to soaspec-generate more types when creating YAML with data (int, boolean, double and custom enumeration).
286
+ * Binaries use common module (exe-helper) to reduce repeatability
287
+ * TODO: soaspec-generate read xsd's mentioned to import in WSDL schema
288
+
289
+ Version 0.0.23 / 2018-2-23
290
+ * Enhancements
291
+ * Created RestHandler class (Very messy and ugly still) to handle REST requests using style used for SOAP using Rest Client resource
292
+
293
+ Version 0.0.22 / 2018-2-15
294
+ * Enhancements
295
+ * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
296
+
297
+ Version 0.0.21 / 2018-1-29
298
+ * Enhancements
299
+ * Added soaspec-generate - still in POC mode to generate files from a WSDL.
300
+ * Added test_wsdl to start at validating xml according to WSDL. Still needs polishing
301
+
302
+ Version 0.0.20 / 2018-1-26
303
+ * Enhancements
304
+ * Added ability to strip namespaces 'Soaspec::Environment.strip_namespaces = true'. See spec for example
305
+ * Fixes
306
+ * Made custom error and used it to make 'have_element_at_xpath' work when negated
307
+
308
+ Version 0.0.19 / 2018-1-25
309
+ * Enhancements
310
+ * Added own shared examples to init script and to in built specs
311
+
312
+ Version 0.0.18 / 2018-1-25
313
+ * Fixes
314
+ * Updated 'soaspec-init' so that it works again.
315
+ * Enhancements
316
+ * Added example showing representing data for request in YAML
317
+
318
+ Version 0.0.17 / 2018-1-25
319
+ * Fixes
320
+ * Updated hash search so that it handles Array
321
+
322
+ Version 0.0.16 / 2018-1-23
323
+ * Fixes
324
+ * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
325
+
326
+ Version 0.0.15 / 2018-1-23
327
+ * Fixes
328
+ * Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
329
+ the user doing the conversion themselves.
330
+
331
+ Version 0.0.14 / 2018-1-23
332
+ * Fixes
333
+ * Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
334
+ Now it's more like something you can read and pass into Savon request.
335
+
336
+ Version 0.0.13 / 2018-1-23
337
+ * Enhancements
338
+ * Executable to create xml file from yaml
339
+
340
+ Version 0.0.12 / 2018/1-22
341
+ * Enhancements
342
+ * Example name added to log file
343
+
344
+ Version 0.0.10 / 2018-1-21
345
+ * Enhancements
346
+ * Added [] method to perform xpath assertion
347
+ * Using Savon xpath. No need to explicitly provide namespace for xpath
348
+
349
+ Version 0.0.9 / 2018-1-20
350
+ * Refactoring
351
+ * class_options -> savon_options - More specific
352
+ * default_operation -> operation - Not default anymore so better not in name
353
+ * Enhancements
354
+ * Made mandatory_xpath_values method to add to 'success scenarios' shared example
355
+
356
+ Version 0.0.8 / 2018-1-19
357
+ * Enhancements
358
+ * Added root_attributes method to add attribute to the root class
359
+
360
+ Version 0.0.7 / 2018-1-19
361
+ * Enhancements
362
+ * Added contain_key matcher
359
363
  * mandatory_elements method created for SoapHandler - can be used to add tests to success scenarios (see example get_weather_web_service class for details)