soaspec 0.0.88 → 0.0.89

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