soaspec 0.2.32 → 0.2.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +15 -15
  3. data/.gitlab-ci.yml +62 -62
  4. data/.rspec +3 -3
  5. data/.rubocop.yml +2 -2
  6. data/CODE_OF_CONDUCT.md +74 -74
  7. data/ChangeLog +632 -625
  8. data/Dockerfile +7 -7
  9. data/Gemfile +8 -8
  10. data/LICENSE.txt +21 -21
  11. data/README.md +231 -231
  12. data/Rakefile +52 -52
  13. data/Todo.md +16 -16
  14. data/exe/soaspec +138 -138
  15. data/exe/xml_to_yaml_file +43 -43
  16. data/lib/soaspec.rb +106 -105
  17. data/lib/soaspec/baseline.rb +23 -0
  18. data/lib/soaspec/core_ext/hash.rb +44 -44
  19. data/lib/soaspec/cucumber/generic_steps.rb +94 -94
  20. data/lib/soaspec/demo.rb +6 -6
  21. data/lib/soaspec/errors.rb +24 -22
  22. data/lib/soaspec/exchange/exchange.rb +129 -129
  23. data/lib/soaspec/exchange/exchange_extractor.rb +90 -90
  24. data/lib/soaspec/exchange/exchange_properties.rb +28 -28
  25. data/lib/soaspec/exchange/exchange_repeater.rb +21 -21
  26. data/lib/soaspec/exchange/request_builder.rb +70 -70
  27. data/lib/soaspec/exchange/variable_storer.rb +24 -24
  28. data/lib/soaspec/exchange_handlers/exchange_handler.rb +98 -98
  29. data/lib/soaspec/exchange_handlers/exchange_handler_defaults.rb +61 -61
  30. data/lib/soaspec/exchange_handlers/handler_accessors.rb +132 -132
  31. data/lib/soaspec/exchange_handlers/request/rest_request.rb +59 -51
  32. data/lib/soaspec/exchange_handlers/request/soap_request.rb +41 -41
  33. data/lib/soaspec/exchange_handlers/response_extractor.rb +84 -84
  34. data/lib/soaspec/exchange_handlers/rest_exchanger_factory.rb +111 -111
  35. data/lib/soaspec/exchange_handlers/rest_handler.rb +307 -298
  36. data/lib/soaspec/exchange_handlers/rest_methods.rb +65 -65
  37. data/lib/soaspec/exchange_handlers/rest_parameters.rb +112 -112
  38. data/lib/soaspec/exchange_handlers/rest_parameters_defaults.rb +42 -42
  39. data/lib/soaspec/exchange_handlers/soap_handler.rb +241 -241
  40. data/lib/soaspec/exe_helpers.rb +94 -94
  41. data/lib/soaspec/generate_server.rb +48 -48
  42. data/lib/soaspec/generator/.rspec.erb +5 -5
  43. data/lib/soaspec/generator/.travis.yml.erb +5 -5
  44. data/lib/soaspec/generator/Gemfile.erb +8 -8
  45. data/lib/soaspec/generator/README.md.erb +29 -29
  46. data/lib/soaspec/generator/Rakefile.erb +19 -19
  47. data/lib/soaspec/generator/config/data/default.yml.erb +2 -2
  48. data/lib/soaspec/generator/css/bootstrap.css +6833 -6833
  49. data/lib/soaspec/generator/features/support/env.rb.erb +3 -3
  50. data/lib/soaspec/generator/generate_exchange.html.erb +47 -47
  51. data/lib/soaspec/generator/lib/blz_service.rb.erb +26 -26
  52. data/lib/soaspec/generator/lib/dynamic_class_content.rb.erb +12 -12
  53. data/lib/soaspec/generator/lib/new_rest_service.rb.erb +56 -56
  54. data/lib/soaspec/generator/lib/new_soap_service.rb.erb +29 -29
  55. data/lib/soaspec/generator/lib/package_service.rb.erb +2 -2
  56. data/lib/soaspec/generator/lib/shared_example.rb.erb +8 -8
  57. data/lib/soaspec/generator/spec/dynamic_soap_spec.rb.erb +12 -12
  58. data/lib/soaspec/generator/spec/rest_spec.rb.erb +9 -9
  59. data/lib/soaspec/generator/spec/soap_spec.rb.erb +51 -51
  60. data/lib/soaspec/generator/spec/spec_helper.rb.erb +23 -23
  61. data/lib/soaspec/generator/template/soap_template.xml +6 -6
  62. data/lib/soaspec/indifferent_hash.rb +9 -9
  63. data/lib/soaspec/interpreter.rb +70 -70
  64. data/lib/soaspec/matchers.rb +140 -118
  65. data/lib/soaspec/o_auth2.rb +142 -142
  66. data/lib/soaspec/soaspec_shared_examples.rb +26 -26
  67. data/lib/soaspec/spec_logger.rb +143 -143
  68. data/lib/soaspec/template_reader.rb +30 -30
  69. data/lib/soaspec/test_server/bank.wsdl +90 -90
  70. data/lib/soaspec/test_server/get_bank.rb +166 -166
  71. data/lib/soaspec/test_server/id_manager.rb +41 -41
  72. data/lib/soaspec/test_server/invoices.rb +29 -29
  73. data/lib/soaspec/test_server/namespace.xml +14 -14
  74. data/lib/soaspec/test_server/note.xml +5 -5
  75. data/lib/soaspec/test_server/puppy_service.rb +21 -21
  76. data/lib/soaspec/test_server/test_attribute.rb +14 -14
  77. data/lib/soaspec/test_server/test_namespace.rb +14 -14
  78. data/lib/soaspec/version.rb +6 -6
  79. data/lib/soaspec/virtual_server.rb +190 -176
  80. data/lib/soaspec/wait.rb +43 -43
  81. data/lib/soaspec/wsdl_generator.rb +215 -215
  82. data/soaspec.gemspec +58 -58
  83. data/test.wsdl +116 -116
  84. data/test.xml +10 -10
  85. data/test_wsdl.rb +43 -43
  86. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6cfad75ccf8e0eea76dc3b2accf234b9c860fcce91f92466ed16e42c299c547
4
- data.tar.gz: 8d3f05f4adb84a05d91337bf7dcf37a46b0021855ad52d7328b16ded882fa1f5
3
+ metadata.gz: 70d31ba4f6e998b854b97b62ea253d61bd16f03bd8e1304250ae313c18a9d812
4
+ data.tar.gz: 1039626936821748f31edc0f684f4e73b8f82c2536168670bfdea7b746a97450
5
5
  SHA512:
6
- metadata.gz: 0a1ed892b7f3c7d963f9b5940bb8f9ea1a5a051ac636900a2a2a99fac6ff39d2e8147aa599f81e65c72a2f85d473f1ddcde2333b985d595c692801736c207eaf
7
- data.tar.gz: e76e366ac6580ba7aba2def7dc4d39765d5be62095af24493fa2da10cb1087cfcf0038b51ce2671007aa0addc35b3d413b1dd02c26d1eb2de3041da08dc517b0
6
+ metadata.gz: 3d2579570edf53795ac827e395872c17f190360c3095d45716333ee6803374593b543339d75ce6bf486fb7f93da97857c962fd336c5120a4ffcdfffda9e6fc25
7
+ data.tar.gz: ae83c191f93592a65704863924e95739e6b32e9e1c2c231122f4af1e1aea7a3e10a36580480e261348bd490044c9d0851c09ab67fab2bb68d3f129f0a3cebde7
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
- /vendor/
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
+ /vendor/
13
+
14
+ # rspec failure tracking
15
+ .rspec_status
@@ -1,63 +1,63 @@
1
- image: ruby:2.5
2
-
3
- before_script:
4
- - ruby -v
5
- - which ruby
6
- - gem install bundler rake
7
- - bundle install --jobs $(nproc) --path vendor # Install dependencies into ./vendor/ruby
8
-
9
- cache:
10
- key: ${CI_COMMIT_REF_SLUG}
11
- paths:
12
- - vendor/ruby
13
-
14
- ruby_2.3:
15
- stage: test
16
- image: ruby:2.3
17
- script:
18
- - bundle exec rake
19
-
20
- ruby_2.4:
21
- stage: test
22
- image: ruby:2.4
23
- script:
24
- - bundle exec rake
25
-
26
- ruby_2.5:
27
- stage: test
28
- image: ruby:2.5
29
- script:
30
- - bundle exec rake
31
- artifacts:
32
- paths:
33
- - coverage/
34
-
35
- ruby_2.6:
36
- stage: test
37
- image: ruby:2.6
38
- script:
39
- - bundle exec rake
40
-
41
- cucumber:
42
- stage: test
43
- script:
44
- - bundle exec cucumber
45
-
46
- doctest:
47
- stage: test
48
- script:
49
- - bundle exec rake yard:doctest
50
-
51
- pages:
52
- stage: deploy
53
- dependencies:
54
- - ruby_2.5
55
- script:
56
- - mv demo/ public/
57
- - mv coverage/ public/coverage
58
- artifacts:
59
- paths:
60
- - public
61
- expire_in: 30 days
62
- only:
1
+ image: ruby:2.5
2
+
3
+ before_script:
4
+ - ruby -v
5
+ - which ruby
6
+ - gem install bundler rake
7
+ - bundle install --jobs $(nproc) --path vendor # Install dependencies into ./vendor/ruby
8
+
9
+ cache:
10
+ key: ${CI_COMMIT_REF_SLUG}
11
+ paths:
12
+ - vendor/ruby
13
+
14
+ ruby_2.3:
15
+ stage: test
16
+ image: ruby:2.3
17
+ script:
18
+ - bundle exec rake
19
+
20
+ ruby_2.4:
21
+ stage: test
22
+ image: ruby:2.4
23
+ script:
24
+ - bundle exec rake
25
+
26
+ ruby_2.5:
27
+ stage: test
28
+ image: ruby:2.5
29
+ script:
30
+ - bundle exec rake
31
+ artifacts:
32
+ paths:
33
+ - coverage/
34
+
35
+ ruby_2.6:
36
+ stage: test
37
+ image: ruby:2.6
38
+ script:
39
+ - bundle exec rake
40
+
41
+ cucumber:
42
+ stage: test
43
+ script:
44
+ - bundle exec cucumber
45
+
46
+ doctest:
47
+ stage: test
48
+ script:
49
+ - bundle exec rake yard:doctest
50
+
51
+ pages:
52
+ stage: deploy
53
+ dependencies:
54
+ - ruby_2.5
55
+ script:
56
+ - mv demo/ public/
57
+ - mv coverage/ public/coverage
58
+ artifacts:
59
+ paths:
60
+ - public
61
+ expire_in: 30 days
62
+ only:
63
63
  - 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,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,626 +1,633 @@
1
- Version 0.2.32
2
- * Enhancement
3
- * Added a cucumber generic step for a subpath
4
-
5
- Version 0.2.31
6
- * Bug fix
7
- * `soaspec generate` was always creating basic auth even when not specified
8
-
9
- Version 0.2.30
10
- * Enhancement
11
- * New method `retry_on_exceptions` on `exchange_handler` where one can specify
12
- exceptions to retry on for all exchanges using that Handler
13
- * 'exception' method on handler that stores exception of last exchange
14
-
15
- Version 0.2.29
16
- * Enhancement
17
- * SpecLogger - change:
18
- * Programe name
19
- * Date and time format
20
- * Accessor internal logger object
21
- * Removed unnecessarily severity as it's always INFO
22
- * For REST calls log Response under 1 log with headers and body indented on new lines
23
-
24
- Version 0.2.28
25
- * Enhancement
26
- * Ability to change OAuth2 retry limit as retrying too many times can cause a lock out
27
-
28
- Version 0.2.27
29
- * Enhancement
30
- * Enable ability to perform action right after response is retrieved. This could be used to
31
- specify condition to fail straight away for a particular response
32
-
33
- Version 0.2.26
34
- * Enhancement
35
- * Method `successful_status_code?` to return whether status code is 200..299
36
- * Ability to turn off OAuth request message
37
-
38
- Version 0.2.25
39
- * Enhancement
40
- * Started running yard-doctest to check yard examples are correct
41
- * Make it easy to inherit urls for subclasses of handlers through 'parent_url'
42
- * `soaspec generate`
43
- * Run on random port as it only makes sense it context of where it runs
44
- * Add support for basic_auth
45
- * `soaspec cucumber` create initial Gemfile and support/env if not present for getting started quickly
46
- * Bug Fix
47
- * Fixed issue with turning off log part way through test suite not turning off RestClient's logs
48
-
49
- Version 0.2.24
50
- * Bug Fix
51
- * Be explicit about where shared_examples_for is from (RSpec) as it can cause loading issues
52
-
53
- Version 0.2.23
54
- * Enhancement
55
- * Interpreter handles XML Doc
56
- * Get document_type_for complex element working. Hopefully should be able to handle WSDL with large response now
57
-
58
- Version 0.2.22
59
- * Bug Fix
60
- * Allow negated version of 'be_successful' to work
61
- * Fix `Exchange.retry_count` so that it retries after first try the correct number of times
62
- * Enhancement
63
- * Make 'value_from_path' and 'values_from_path' methods accessible from 'response' object
64
- * Get extracting text via RegEx actually working
65
-
66
- Version 0.2.21
67
- * Enhancement
68
- * Enable deprecation warnings to be removed so that they're not annoying with `Soaspec.log_warnings`
69
-
70
- Version 0.2.20
71
- * Enhancement
72
- * 'soaspec pry' command to open pry, loading test API classes
73
-
74
- Version 0.2.19
75
- * Enhancement
76
- * Create 'soaspec generate' (without wsdl) as a way to create an ExchangeHandler from a Web Page
77
-
78
- Version 0.2.18
79
- * Enhancement
80
- * Hash of body returned via 'to_hash' can be accessed through Symbol or String
81
-
82
- Version 0.2.17
83
- * Bug Fix
84
- * Correct Output where does not show the conversion happening by JSONPath and PascalCase conversion
85
-
86
- Version 0.2.16
87
- * Enhancement
88
- * Move debug oauth into OAuth2 class
89
-
90
- Version 0.2.14
91
- * Bug Fix
92
- * Remove default log file being created before it is changed to a custom location
93
-
94
- Version 0.2.13
95
- * Enhancements
96
- * Allow terminal logging color to be changed through a `terminal_color` attribute
97
-
98
- Version 0.2.12
99
- * Enhancements
100
- * Make it easier to set 'traffic_file' location with `Soaspec::SpecLogger.traffic_file = ''`
101
-
102
- Version 0.2.11
103
- * Bug Fix
104
- * Cache 'Soaspec::OAuth2.instance_url' so Access token server not called everytime it's needed
105
-
106
- Version 0.2.10
107
- * Enhancements
108
- * Added 'soaspec/demo' to be required to simplify demoing
109
- * Bug Fix
110
- * Logging wasn't handling Rest log properly
111
-
112
- Version 0.2.9
113
- * Enhancements
114
- * More documentation in README.md
115
- * Started breaking up massive RestHandler more
116
- * Allow one output logs to STDOUT through Soaspec::SpecLogger.output_to_terminal = true
117
-
118
- Version 0.2.8
119
- * Bug Fix
120
- * RSpec-its dependency produces a conflict. Remove specific version reference
121
-
122
- Version 0.2.7
123
- * Bug Fix
124
- * Fix log issue that was failing in Windows
125
-
126
- Version 0.2.6
127
- * Enhancements
128
- * New log file created with time stamp each time tests are run
129
-
130
- Version 0.2.5
131
- * Bug fix
132
- * Error wasn't throw if checking for element with empty response
133
- * Default hash set on Exchange without example overriding value not setting request body
134
-
135
- Version 0.2.4
136
- * Enhancements
137
- * Enable block to be used when creating exchange with Handler.exchange
138
-
139
- Version 0.2.3
140
- * Enhancements
141
- * Exchange.until itself method returns itself making it easier to reuse last result in assertions
142
- * Added parameters to Exchange.until so that timeout, message and interval can be specified
143
- * Soaspec cucumber exe to add generic steps to step_definitions folder
144
-
145
- Version 0.2.2
146
- * Enhancements
147
- * Make accessing test_values from template using indifferent access
148
-
149
- Version 0.2.1
150
- * Enhancements
151
- * Make method to access 'client_id' within a class after specifying 'oauth2_file' to remove unnecessarily loading file twice
152
-
153
- Version 0.2.0
154
- * Exception handling
155
- * Raise meaningful exception if REST header value passed is null
156
- * Enhancements
157
- * `soaspec add` exe to create basic 'rest' or 'soap' service
158
- * Add another matcher to check response is successful
159
- * Default hash and template_name can now be defined within a class rather than just at an instance of it
160
- * Stubs making it clearer what parameters are when looking at code from RubyMine
161
- * Basic auth file method on RestHandler for clearer defining of basic auth
162
- * Handle ERB in 'base_url' method
163
-
164
- Version 0.1.18
165
- * Enhancements
166
- * Define 'exchange' method on response object so original exchange can be accessed
167
- * Make simply approach for setting body of request with just a string passed `ExchangeHandler.post(message_body)` where message_body is not
168
- a `Hash` but a `String`
169
-
170
- Version 0.1.17
171
- * Enhancements
172
- * Added Wait class to easily wait for an expected condition to be true, either using global Soaspec::Wait or `exchange.until { true }`
173
- See spec/unit/wait_spec for example
174
- * Made shorter way to `get` a REST url with `RestHandler.get 'id'` setting the suburl to 'id' automatically
175
-
176
- Version 0.1.16
177
- * Bug fix
178
- * Retry was not working for OAuth access_token
179
-
180
- Version 0.1.15
181
- * Enhancements
182
- * Added more unit test coverage and a few more comments
183
-
184
- Version 0.1.14
185
- * Enhancements
186
- * Got `rest` soaspec new working
187
-
188
- Version 0.1.13
189
- * Enhancements
190
- * Cleaned up comments (mainly OAuth2 related)
191
- * Cleaned up REST handler code, adding more comments on usage
192
- * Added 'soaspec/cucumber/generic_steps' to simplify reusing code and also demonstrate how gem can be used
193
-
194
- Version 0.1.12
195
- * Enhancements
196
- * Add 'refresh_token' attribute to Soaspec::OAuth2 class so that token can be retrieved once and then stored
197
-
198
- Version 0.1.11
199
- * Enhancements
200
- * OAuth2 class can be initialized with strings as keys
201
- * Global attribute, 'Soaspec::OAuth2.token_url' for setting common value
202
-
203
- Version 0.1.10
204
- * Enhancements
205
- * Rename default template folder from to 'template' to 'templates'
206
- * Use TemplateReader to simplify and add error handling to extracting templates
207
- * Got convenience Rest Methods able to handle taking in template_name
208
- * Started making a 'request' method to access request of API actually sent
209
-
210
- Version 0.1.9
211
- * Enhancements
212
- * Finally move `soaspec-virtual-server` into same binary as `soaspec` utilising Thor
213
-
214
- Version 0.1.8
215
- * Bug fix
216
- * Could not see OAuth parameters sent in logs when setting oauth debugging to true
217
-
218
- Version 0.1.7
219
- * Enhancements
220
- * Include access token header automatically if 'authorization' is not set. Turn off with `Soaspec.auto_oauth = false`
221
-
222
- Version 0.1.6
223
- * Enhancements
224
- * Bind localhost to 0.0.0.0 so service is accessible outside localhost
225
-
226
- Version 0.1.5
227
- * Enhancements
228
- * Package spec changes status after a post is made. Help to illustrate scenario where status changes
229
- * Record last exchange made for debugging purposes in 'last_exchange'
230
-
231
- Version 0.1.4
232
- * Enhancements
233
- * create_file method create folders automatically if necessary
234
- * Package spec to help learn testing for items in a list
235
- * Added docs for soaspec-virtual-server
236
-
237
- Version 0.1.3
238
- * Enhancements
239
- * Ability to set template folder
240
- * Json Path handle multiple paths separated by commas
241
-
242
- Version 0.1.1
243
- * Enhancements
244
- * Added ability to turn off logs (helpful if making a lot of API calls)
245
-
246
- Version 0.1.0
247
- * Enhancements
248
- * Cleaned up unit tests for WSDL generator. Won't bother for SOAP ComplexType for now as I'm not needing this and it looks like Savon 3 will create example requests anyway
249
- * Put SOAP Basic Auth in Example
250
- * Added template handling for REST handler
251
-
252
- Version 0.0.89
253
- * Enhancements
254
- * Move more functionality out of soaspec exe and into WsdlGenerator. Started unit tests for it
255
-
256
- Version 0.0.88
257
- * Bug Fix
258
- * Corrected '_format' variable name that was breaking failing to find rest element
259
-
260
- Version 0.0.87
261
- * Bug Fix
262
- * Fixed incorrect logging for when 'debug_oauth' is off
263
-
264
- Version 0.0.86
265
- * Enhancements
266
- * 'debug_oauth' attribute used to toggle showing params used in retrieving access token
267
-
268
- Version 0.0.85
269
- * Enhancements
270
- * Interpret XML and JSON better so that JSON with XML in it's tags is catered for
271
-
272
- Version 0.0.84
273
- * Enhancements
274
- * 'strip_namespaces' defined in exchange handlers not globally which makes more sense
275
- * Created 'to_hash' method for Exchange that returns a Hash of XML or JSON response (primarily for REST)
276
-
277
- Version 0.0.83
278
- * Enhancements
279
- * Handle BOM or other characters that could be at start of xml of json response string
280
-
281
- Version 0.0.82
282
- * Enhancements
283
- * Fixed namespace handling for REST
284
-
285
- Version 0.0.81
286
- * Enhancements
287
- * SoapHandler - define exchange method for each SOAP operation. See `one_off_spec` for example
288
-
289
- Version 0.0.80
290
- * Enhancements
291
- * `values_from_path` method on `RestHandler` to easily extract multiple values for an xpath or json path
292
- * Bug fix
293
- * Support response that has white space surrounding message
294
-
295
- Version 0.0.79
296
- * Enhancements
297
- * `values_from_path` method on `SoapHandler` to easily extract multiple values for an xpath
298
- * If `id` is specified on associated factory, FactoryBot will populate the primary factory with that id. See `rest/factory_spec` for eg
299
-
300
- Version 0.0.78
301
- * Enhancements
302
- * Use 'thor' for `soaspec generate`, allowing less prompt and more options through command line. Added tests for it
303
-
304
- Version 0.0.77
305
- * Enhancements
306
- * Use 'thor' for soaspec-init binary changing it to be `soaspec init`. Will update `soaspec-generate` in next version
307
- * Put pause of 1/2 a second for each API retry. Often retry is too quick otherwise
308
-
309
- Version 0.0.76
310
- * Bug fix
311
- * Fixed BLZService scenario on soaspec-virtual-server
312
- * Fixed return value for retry_for_success failure
313
- * Enhancements
314
- * Added method to indicate a factory create should actually return a failure status
315
-
316
- Version 0.0.75
317
- * Enhancements
318
- * For Factory created methods, set retry_for_success to true. Allow for this to be set at Exchange class level
319
-
320
- Version 0.0.74
321
- * Enhancements
322
- * RestHandler, enable api username to be set upon initialisation
323
-
324
- Version 0.0.73
325
- * Enhancements
326
- * Added 'default_handler' method with which define an exchange_handler to be created when an exchange is initialized
327
- * Refactoring
328
- * Use `@exchange_handler` instead of `@api_class` which is more consistent
329
-
330
- Version 0.0.72
331
- * Enhancements
332
- * Add ability to convert XML response to lower case for simpler xpath searching
333
-
334
- Version 0.0.71
335
- * Bug fix
336
- * Got exe 'soaspec-virtual-server' working
337
-
338
- Version 0.0.70
339
- * Enhancements
340
- * Added api_username method to REST handler to change user for an API during runtime
341
-
342
- Version 0.0.69
343
- * Enhancements
344
- * Calculate base_url ERB at time of handler's first request (Rather than when initialised).
345
- - Important for where base url uses ERB and so does oauth whose user may change
346
- * Demonstrate using oauth via spec
347
- * Demonstrate using basic auth via spec
348
-
349
- Version 0.0.68
350
- * Enhancements
351
- * Use ERB to calculate base_url for dynamic bases
352
-
353
- Version 0.0.67
354
- * Enhancements
355
- * Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
356
- - if first character of key is captial, PascalCase conversion is ignored
357
-
358
- Version 0.0.66
359
- * Enhancements
360
- * Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
361
- * This also converts paths obtaining elements to 'PascalCase' if they're simple and have no starting '//' or '$..'
362
-
363
- Version 0.0.65
364
- * Enhancements
365
- * Added ability to set 'suburl' and 'method' in Exchange accessor. Will be used in FactoryBot later
366
-
367
- Version 0.0.64
368
- * Enhancements
369
- * Got FactoryBot working for RestHandler. See specs for example
370
- * Add element? method to exchange to make it easier to check element is at path
371
- * Define 'element_name?' created when element is defined on ExchangeHandler
372
-
373
- Version 0.0.63
374
- * Enhancements
375
- * Interpret ERB for oauth credentials within oauth response. Needed for when params like 'username' can change in runtime
376
-
377
- Version 0.0.62
378
- * Enhancements
379
- * Use q parameter to simply to query parameters on REST requests
380
-
381
- Version 0.0.61
382
- * Enhancements
383
- * Retrieving oauth response try 3 times (to bypass intermittent errors)
384
-
385
- Version 0.0.60
386
- * Enhancements
387
- * Allow for factory_bot with automatic setting of missing setter methods
388
-
389
- Version 0.0.59
390
- * Enhancements
391
- * Perform ERB in headers to make using access_token using 'headers' possible
392
- * Try better way of testing `soaspec-init`.
393
-
394
- Version 0.0.58
395
- * Enhancements
396
- * Add method to set parts of the request body through `exchange[key]= 'value'`
397
- * Added example of Cucumber feature demonstrating this
398
-
399
- Version 0.0.56
400
- * Bug fix
401
- * Handle creating of traffic.log file within lib properly
402
-
403
- Version 0.0.55
404
- * Enhancements
405
- * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
406
-
407
- Version 0.0.54
408
- * Enhancements
409
- * Make 'headers' accessor for setting headers on RestHandler easier
410
-
411
- Version 0.0.53
412
- * Enhancements
413
- * Make attribute possible for REST methods as well (as they can use XML too)
414
- * For non XML, non JSON responses, handle with regex or key for a Hash
415
-
416
- Version 0.0.52
417
- * Enhancements
418
- * Now have 'attribute' accessor making it easy to access an attribute from a response
419
-
420
- Version 0.0.51
421
- * Enhancements
422
- * Allow for 'default_hash=' method to be used in RestHandler. See 'many_calls_one_method_spec' for example
423
- * Got 'element' accessor working correctly (See soap/hash_spec.rb + 'blz_service' for example)
424
-
425
- Version 0.0.50
426
- * Enhancements
427
- * Able to use ERB in oauth parameters and extract oauth hash with 'oauth_response' method defined by 'oauth_file'
428
-
429
- Version 0.0.47
430
- * Bug Fix
431
- * Using 'Strip namespace' handle both namespace or not dependent if used
432
-
433
- Version 0.0.47
434
- * Enhancements
435
- * 'success scenarios' shared eg and 'retry_for_success' exchange method's status codes include 200..299, not just 200.
436
-
437
- Version 0.0.46
438
- * Enhancements
439
- * '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
440
-
441
- Version 0.0.45
442
- * Enhancements
443
- * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
444
-
445
- Version 0.0.44
446
- * Enhancements
447
- * Test Server log to logs/test_server.log
448
- * Simplify ExchangeHandler storing and retrieving values (see soap/hash_spec.rb)
449
- * Make setting SoapHandler operation and other params possible through object instantiation. Less code needed
450
-
451
- Version 0.0.43
452
- * Bug fix
453
- * Remove Environment namespace from 'soaspec-generate'
454
- * Enhancements
455
- * 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
456
-
457
- Version 0.0.42
458
- * Enhancements
459
- * Set Soaspec.api_handler work class is created. No need to call '.to_s' method
460
-
461
- Version 0.0.41
462
- * Bug fix
463
- * soaspec-generate not designed to work with virtual service. Rakefile not try to set that up
464
-
465
- Version 0.0.40
466
- * Enhancements
467
- * soaspec-generate now handle a wsdl without parameters in the operation and rather look up input element type
468
- * test_server virtual service now handle scenario where bank is not found and test made for that
469
-
470
- Version 0.0.39
471
- * Spec
472
- * Create task to use soaspec-init to create test structure and test it.
473
- * Enhancements
474
- * Take away need to use Environment namespace
475
- * Added response headers to REST response log
476
- * Now using virtual Web Service for SOAP
477
-
478
- Version 0.0.38
479
- * Bug fix
480
- * Fixed error in soaspec-generate. TODO: Test this in CI
481
-
482
- Version 0.0.37 / 2018-3-16
483
- * Enhancements
484
- * Made retry_for_success method to keep making request until 200 status code if set on exchange
485
- * If '$' not included for json_path, by default a '$..' is added for convenience
486
-
487
- Version 0.0.36 / 2018-3-15
488
- * Bug fix
489
- * Make test name log in correct place
490
- * Enhancements
491
- * Made accessor 'mandatory_json_values' to make it easier to share mandatory json path - value pairs
492
- * Created 'store' method for handler through which one can store a value and use it later on it in the same context
493
- * Deprecated
494
- * Removed old 'mandatory_elements', 'mandatory_xpath_values' overridden way of handling data for favor of new way of it setting 'expected_mandatory_elements'
495
-
496
- Version 0.0.35 / 2018-3-13
497
- * Enhancements
498
- * Handle array of JSON hashes starting with '['
499
- * Handle patch and put methods with data for REST
500
-
501
- Version 0.0.34 / 2018-3-12
502
- * Enhancements
503
- * Add oauth2 and oauth2_file methods to make it easy to load oauth2 parameters. Still a work in progress to handle all oauth2 variations
504
-
505
- Version 0.0.33 / 2018-3-9
506
- * Enhancements
507
- * Use 'jsonpath' instead of dig to check JSON responses. Much better for finding complex paths
508
-
509
- Version 0.0.32 / 2018-3-9
510
- * Enhancements
511
- * Made :body key in hash that can be used to use JSON.generate for a payload when using rest_handler exchanges
512
-
513
- Version 0.0.31 / 2018-3-8
514
- * Enhancements
515
- * Compacted unit tests for exchange handler
516
- * Implemented include_key? and find via xpath for REST handler. See specs
517
-
518
- Version 0.0.30 / 2018-3-6
519
- * Bug fix
520
- * Made generated class file name in soaspec-generate snakecase (was CamelCase)
521
-
522
- Version 0.0.29 / 2018-3-6
523
- * Refactorings
524
- * Base 'test' class from 'Tester' to 'ExhangeHandler'
525
- * Made default Soap Handler class 'SoapHandler' and making use of 'BasicSoapHandler' deprecated
526
-
527
- Version 0.0.28 / 2018-3-6
528
- * Enhancements
529
- * Added not_found matcher and used in spec example
530
- * Only call request upon first need of an Exchange response. This means test request is made as part of 'it' rather than in describe
531
-
532
- Version 0.0.27 / 2018-3-5
533
- * Bug fix
534
- * Fixed log file not present error
535
- * Updated exe binaries to use latest format
536
-
537
- Version 0.0.26 / 2018-3-5
538
- * Refactorings
539
- * Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
540
-
541
- Version 0.0.25 / 2018-2-25
542
- * Enhancements
543
- * Updated rest_handler to convert JSON and XML into Hash and use it in 'contain_value'. This still needs work.
544
- * Showed example of workflow using 'pet' url
545
-
546
- Version 0.0.24 / 2018-2-25
547
- * Enhancements
548
- * Added to soaspec-generate more types when creating YAML with data (int, boolean, double and custom enumeration).
549
- * Binaries use common module (exe-helper) to reduce repeatability
550
- * TODO: soaspec-generate read xsd's mentioned to import in WSDL schema
551
-
552
- Version 0.0.23 / 2018-2-23
553
- * Enhancements
554
- * Created RestHandler class (Very messy and ugly still) to handle REST requests using style used for SOAP using Rest Client resource
555
-
556
- Version 0.0.22 / 2018-2-15
557
- * Enhancements
558
- * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
559
-
560
- Version 0.0.21 / 2018-1-29
561
- * Enhancements
562
- * Added soaspec-generate - still in POC mode to generate files from a WSDL.
563
- * Added test_wsdl to start at validating xml according to WSDL. Still needs polishing
564
-
565
- Version 0.0.20 / 2018-1-26
566
- * Enhancements
567
- * Added ability to strip namespaces 'Soaspec::Environment.strip_namespaces = true'. See spec for example
568
- * Fixes
569
- * Made custom error and used it to make 'have_element_at_xpath' work when negated
570
-
571
- Version 0.0.19 / 2018-1-25
572
- * Enhancements
573
- * Added own shared examples to init script and to in built specs
574
-
575
- Version 0.0.18 / 2018-1-25
576
- * Fixes
577
- * Updated 'soaspec-init' so that it works again.
578
- * Enhancements
579
- * Added example showing representing data for request in YAML
580
-
581
- Version 0.0.17 / 2018-1-25
582
- * Fixes
583
- * Updated hash search so that it handles Array
584
-
585
- Version 0.0.16 / 2018-1-23
586
- * Fixes
587
- * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
588
-
589
- Version 0.0.15 / 2018-1-23
590
- * Fixes
591
- * Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
592
- the user doing the conversion themselves.
593
-
594
- Version 0.0.14 / 2018-1-23
595
- * Fixes
596
- * Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
597
- Now it's more like something you can read and pass into Savon request.
598
-
599
- Version 0.0.13 / 2018-1-23
600
- * Enhancements
601
- * Executable to create xml file from yaml
602
-
603
- Version 0.0.12 / 2018/1-22
604
- * Enhancements
605
- * Example name added to log file
606
-
607
- Version 0.0.10 / 2018-1-21
608
- * Enhancements
609
- * Added [] method to perform xpath assertion
610
- * Using Savon xpath. No need to explicitly provide namespace for xpath
611
-
612
- Version 0.0.9 / 2018-1-20
613
- * Refactoring
614
- * class_options -> savon_options - More specific
615
- * default_operation -> operation - Not default anymore so better not in name
616
- * Enhancements
617
- * Made mandatory_xpath_values method to add to 'success scenarios' shared example
618
-
619
- Version 0.0.8 / 2018-1-19
620
- * Enhancements
621
- * Added root_attributes method to add attribute to the root class
622
-
623
- Version 0.0.7 / 2018-1-19
624
- * Enhancements
625
- * Added contain_key matcher
1
+ Version 0.2.33
2
+ * Enhancement
3
+ * Ability to pass an array to 'suburl' which will be joined via '/' for
4
+ building a request via loops
5
+ * Matcher to record a baseline response for a set of parameters and
6
+ ensure it matches it in the future
7
+
8
+ Version 0.2.32
9
+ * Enhancement
10
+ * Added a cucumber generic step for a subpath
11
+
12
+ Version 0.2.31
13
+ * Bug fix
14
+ * `soaspec generate` was always creating basic auth even when not specified
15
+
16
+ Version 0.2.30
17
+ * Enhancement
18
+ * New method `retry_on_exceptions` on `exchange_handler` where one can specify
19
+ exceptions to retry on for all exchanges using that Handler
20
+ * 'exception' method on handler that stores exception of last exchange
21
+
22
+ Version 0.2.29
23
+ * Enhancement
24
+ * SpecLogger - change:
25
+ * Programe name
26
+ * Date and time format
27
+ * Accessor internal logger object
28
+ * Removed unnecessarily severity as it's always INFO
29
+ * For REST calls log Response under 1 log with headers and body indented on new lines
30
+
31
+ Version 0.2.28
32
+ * Enhancement
33
+ * Ability to change OAuth2 retry limit as retrying too many times can cause a lock out
34
+
35
+ Version 0.2.27
36
+ * Enhancement
37
+ * Enable ability to perform action right after response is retrieved. This could be used to
38
+ specify condition to fail straight away for a particular response
39
+
40
+ Version 0.2.26
41
+ * Enhancement
42
+ * Method `successful_status_code?` to return whether status code is 200..299
43
+ * Ability to turn off OAuth request message
44
+
45
+ Version 0.2.25
46
+ * Enhancement
47
+ * Started running yard-doctest to check yard examples are correct
48
+ * Make it easy to inherit urls for subclasses of handlers through 'parent_url'
49
+ * `soaspec generate`
50
+ * Run on random port as it only makes sense it context of where it runs
51
+ * Add support for basic_auth
52
+ * `soaspec cucumber` create initial Gemfile and support/env if not present for getting started quickly
53
+ * Bug Fix
54
+ * Fixed issue with turning off log part way through test suite not turning off RestClient's logs
55
+
56
+ Version 0.2.24
57
+ * Bug Fix
58
+ * Be explicit about where shared_examples_for is from (RSpec) as it can cause loading issues
59
+
60
+ Version 0.2.23
61
+ * Enhancement
62
+ * Interpreter handles XML Doc
63
+ * Get document_type_for complex element working. Hopefully should be able to handle WSDL with large response now
64
+
65
+ Version 0.2.22
66
+ * Bug Fix
67
+ * Allow negated version of 'be_successful' to work
68
+ * Fix `Exchange.retry_count` so that it retries after first try the correct number of times
69
+ * Enhancement
70
+ * Make 'value_from_path' and 'values_from_path' methods accessible from 'response' object
71
+ * Get extracting text via RegEx actually working
72
+
73
+ Version 0.2.21
74
+ * Enhancement
75
+ * Enable deprecation warnings to be removed so that they're not annoying with `Soaspec.log_warnings`
76
+
77
+ Version 0.2.20
78
+ * Enhancement
79
+ * 'soaspec pry' command to open pry, loading test API classes
80
+
81
+ Version 0.2.19
82
+ * Enhancement
83
+ * Create 'soaspec generate' (without wsdl) as a way to create an ExchangeHandler from a Web Page
84
+
85
+ Version 0.2.18
86
+ * Enhancement
87
+ * Hash of body returned via 'to_hash' can be accessed through Symbol or String
88
+
89
+ Version 0.2.17
90
+ * Bug Fix
91
+ * Correct Output where does not show the conversion happening by JSONPath and PascalCase conversion
92
+
93
+ Version 0.2.16
94
+ * Enhancement
95
+ * Move debug oauth into OAuth2 class
96
+
97
+ Version 0.2.14
98
+ * Bug Fix
99
+ * Remove default log file being created before it is changed to a custom location
100
+
101
+ Version 0.2.13
102
+ * Enhancements
103
+ * Allow terminal logging color to be changed through a `terminal_color` attribute
104
+
105
+ Version 0.2.12
106
+ * Enhancements
107
+ * Make it easier to set 'traffic_file' location with `Soaspec::SpecLogger.traffic_file = ''`
108
+
109
+ Version 0.2.11
110
+ * Bug Fix
111
+ * Cache 'Soaspec::OAuth2.instance_url' so Access token server not called everytime it's needed
112
+
113
+ Version 0.2.10
114
+ * Enhancements
115
+ * Added 'soaspec/demo' to be required to simplify demoing
116
+ * Bug Fix
117
+ * Logging wasn't handling Rest log properly
118
+
119
+ Version 0.2.9
120
+ * Enhancements
121
+ * More documentation in README.md
122
+ * Started breaking up massive RestHandler more
123
+ * Allow one output logs to STDOUT through Soaspec::SpecLogger.output_to_terminal = true
124
+
125
+ Version 0.2.8
126
+ * Bug Fix
127
+ * RSpec-its dependency produces a conflict. Remove specific version reference
128
+
129
+ Version 0.2.7
130
+ * Bug Fix
131
+ * Fix log issue that was failing in Windows
132
+
133
+ Version 0.2.6
134
+ * Enhancements
135
+ * New log file created with time stamp each time tests are run
136
+
137
+ Version 0.2.5
138
+ * Bug fix
139
+ * Error wasn't throw if checking for element with empty response
140
+ * Default hash set on Exchange without example overriding value not setting request body
141
+
142
+ Version 0.2.4
143
+ * Enhancements
144
+ * Enable block to be used when creating exchange with Handler.exchange
145
+
146
+ Version 0.2.3
147
+ * Enhancements
148
+ * Exchange.until itself method returns itself making it easier to reuse last result in assertions
149
+ * Added parameters to Exchange.until so that timeout, message and interval can be specified
150
+ * Soaspec cucumber exe to add generic steps to step_definitions folder
151
+
152
+ Version 0.2.2
153
+ * Enhancements
154
+ * Make accessing test_values from template using indifferent access
155
+
156
+ Version 0.2.1
157
+ * Enhancements
158
+ * Make method to access 'client_id' within a class after specifying 'oauth2_file' to remove unnecessarily loading file twice
159
+
160
+ Version 0.2.0
161
+ * Exception handling
162
+ * Raise meaningful exception if REST header value passed is null
163
+ * Enhancements
164
+ * `soaspec add` exe to create basic 'rest' or 'soap' service
165
+ * Add another matcher to check response is successful
166
+ * Default hash and template_name can now be defined within a class rather than just at an instance of it
167
+ * Stubs making it clearer what parameters are when looking at code from RubyMine
168
+ * Basic auth file method on RestHandler for clearer defining of basic auth
169
+ * Handle ERB in 'base_url' method
170
+
171
+ Version 0.1.18
172
+ * Enhancements
173
+ * Define 'exchange' method on response object so original exchange can be accessed
174
+ * Make simply approach for setting body of request with just a string passed `ExchangeHandler.post(message_body)` where message_body is not
175
+ a `Hash` but a `String`
176
+
177
+ Version 0.1.17
178
+ * Enhancements
179
+ * Added Wait class to easily wait for an expected condition to be true, either using global Soaspec::Wait or `exchange.until { true }`
180
+ See spec/unit/wait_spec for example
181
+ * Made shorter way to `get` a REST url with `RestHandler.get 'id'` setting the suburl to 'id' automatically
182
+
183
+ Version 0.1.16
184
+ * Bug fix
185
+ * Retry was not working for OAuth access_token
186
+
187
+ Version 0.1.15
188
+ * Enhancements
189
+ * Added more unit test coverage and a few more comments
190
+
191
+ Version 0.1.14
192
+ * Enhancements
193
+ * Got `rest` soaspec new working
194
+
195
+ Version 0.1.13
196
+ * Enhancements
197
+ * Cleaned up comments (mainly OAuth2 related)
198
+ * Cleaned up REST handler code, adding more comments on usage
199
+ * Added 'soaspec/cucumber/generic_steps' to simplify reusing code and also demonstrate how gem can be used
200
+
201
+ Version 0.1.12
202
+ * Enhancements
203
+ * Add 'refresh_token' attribute to Soaspec::OAuth2 class so that token can be retrieved once and then stored
204
+
205
+ Version 0.1.11
206
+ * Enhancements
207
+ * OAuth2 class can be initialized with strings as keys
208
+ * Global attribute, 'Soaspec::OAuth2.token_url' for setting common value
209
+
210
+ Version 0.1.10
211
+ * Enhancements
212
+ * Rename default template folder from to 'template' to 'templates'
213
+ * Use TemplateReader to simplify and add error handling to extracting templates
214
+ * Got convenience Rest Methods able to handle taking in template_name
215
+ * Started making a 'request' method to access request of API actually sent
216
+
217
+ Version 0.1.9
218
+ * Enhancements
219
+ * Finally move `soaspec-virtual-server` into same binary as `soaspec` utilising Thor
220
+
221
+ Version 0.1.8
222
+ * Bug fix
223
+ * Could not see OAuth parameters sent in logs when setting oauth debugging to true
224
+
225
+ Version 0.1.7
226
+ * Enhancements
227
+ * Include access token header automatically if 'authorization' is not set. Turn off with `Soaspec.auto_oauth = false`
228
+
229
+ Version 0.1.6
230
+ * Enhancements
231
+ * Bind localhost to 0.0.0.0 so service is accessible outside localhost
232
+
233
+ Version 0.1.5
234
+ * Enhancements
235
+ * Package spec changes status after a post is made. Help to illustrate scenario where status changes
236
+ * Record last exchange made for debugging purposes in 'last_exchange'
237
+
238
+ Version 0.1.4
239
+ * Enhancements
240
+ * create_file method create folders automatically if necessary
241
+ * Package spec to help learn testing for items in a list
242
+ * Added docs for soaspec-virtual-server
243
+
244
+ Version 0.1.3
245
+ * Enhancements
246
+ * Ability to set template folder
247
+ * Json Path handle multiple paths separated by commas
248
+
249
+ Version 0.1.1
250
+ * Enhancements
251
+ * Added ability to turn off logs (helpful if making a lot of API calls)
252
+
253
+ Version 0.1.0
254
+ * Enhancements
255
+ * Cleaned up unit tests for WSDL generator. Won't bother for SOAP ComplexType for now as I'm not needing this and it looks like Savon 3 will create example requests anyway
256
+ * Put SOAP Basic Auth in Example
257
+ * Added template handling for REST handler
258
+
259
+ Version 0.0.89
260
+ * Enhancements
261
+ * Move more functionality out of soaspec exe and into WsdlGenerator. Started unit tests for it
262
+
263
+ Version 0.0.88
264
+ * Bug Fix
265
+ * Corrected '_format' variable name that was breaking failing to find rest element
266
+
267
+ Version 0.0.87
268
+ * Bug Fix
269
+ * Fixed incorrect logging for when 'debug_oauth' is off
270
+
271
+ Version 0.0.86
272
+ * Enhancements
273
+ * 'debug_oauth' attribute used to toggle showing params used in retrieving access token
274
+
275
+ Version 0.0.85
276
+ * Enhancements
277
+ * Interpret XML and JSON better so that JSON with XML in it's tags is catered for
278
+
279
+ Version 0.0.84
280
+ * Enhancements
281
+ * 'strip_namespaces' defined in exchange handlers not globally which makes more sense
282
+ * Created 'to_hash' method for Exchange that returns a Hash of XML or JSON response (primarily for REST)
283
+
284
+ Version 0.0.83
285
+ * Enhancements
286
+ * Handle BOM or other characters that could be at start of xml of json response string
287
+
288
+ Version 0.0.82
289
+ * Enhancements
290
+ * Fixed namespace handling for REST
291
+
292
+ Version 0.0.81
293
+ * Enhancements
294
+ * SoapHandler - define exchange method for each SOAP operation. See `one_off_spec` for example
295
+
296
+ Version 0.0.80
297
+ * Enhancements
298
+ * `values_from_path` method on `RestHandler` to easily extract multiple values for an xpath or json path
299
+ * Bug fix
300
+ * Support response that has white space surrounding message
301
+
302
+ Version 0.0.79
303
+ * Enhancements
304
+ * `values_from_path` method on `SoapHandler` to easily extract multiple values for an xpath
305
+ * If `id` is specified on associated factory, FactoryBot will populate the primary factory with that id. See `rest/factory_spec` for eg
306
+
307
+ Version 0.0.78
308
+ * Enhancements
309
+ * Use 'thor' for `soaspec generate`, allowing less prompt and more options through command line. Added tests for it
310
+
311
+ Version 0.0.77
312
+ * Enhancements
313
+ * Use 'thor' for soaspec-init binary changing it to be `soaspec init`. Will update `soaspec-generate` in next version
314
+ * Put pause of 1/2 a second for each API retry. Often retry is too quick otherwise
315
+
316
+ Version 0.0.76
317
+ * Bug fix
318
+ * Fixed BLZService scenario on soaspec-virtual-server
319
+ * Fixed return value for retry_for_success failure
320
+ * Enhancements
321
+ * Added method to indicate a factory create should actually return a failure status
322
+
323
+ Version 0.0.75
324
+ * Enhancements
325
+ * For Factory created methods, set retry_for_success to true. Allow for this to be set at Exchange class level
326
+
327
+ Version 0.0.74
328
+ * Enhancements
329
+ * RestHandler, enable api username to be set upon initialisation
330
+
331
+ Version 0.0.73
332
+ * Enhancements
333
+ * Added 'default_handler' method with which define an exchange_handler to be created when an exchange is initialized
334
+ * Refactoring
335
+ * Use `@exchange_handler` instead of `@api_class` which is more consistent
336
+
337
+ Version 0.0.72
338
+ * Enhancements
339
+ * Add ability to convert XML response to lower case for simpler xpath searching
340
+
341
+ Version 0.0.71
342
+ * Bug fix
343
+ * Got exe 'soaspec-virtual-server' working
344
+
345
+ Version 0.0.70
346
+ * Enhancements
347
+ * Added api_username method to REST handler to change user for an API during runtime
348
+
349
+ Version 0.0.69
350
+ * Enhancements
351
+ * Calculate base_url ERB at time of handler's first request (Rather than when initialised).
352
+ - Important for where base url uses ERB and so does oauth whose user may change
353
+ * Demonstrate using oauth via spec
354
+ * Demonstrate using basic auth via spec
355
+
356
+ Version 0.0.68
357
+ * Enhancements
358
+ * Use ERB to calculate base_url for dynamic bases
359
+
360
+ Version 0.0.67
361
+ * Enhancements
362
+ * Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
363
+ - if first character of key is captial, PascalCase conversion is ignored
364
+
365
+ Version 0.0.66
366
+ * Enhancements
367
+ * Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
368
+ * This also converts paths obtaining elements to 'PascalCase' if they're simple and have no starting '//' or '$..'
369
+
370
+ Version 0.0.65
371
+ * Enhancements
372
+ * Added ability to set 'suburl' and 'method' in Exchange accessor. Will be used in FactoryBot later
373
+
374
+ Version 0.0.64
375
+ * Enhancements
376
+ * Got FactoryBot working for RestHandler. See specs for example
377
+ * Add element? method to exchange to make it easier to check element is at path
378
+ * Define 'element_name?' created when element is defined on ExchangeHandler
379
+
380
+ Version 0.0.63
381
+ * Enhancements
382
+ * Interpret ERB for oauth credentials within oauth response. Needed for when params like 'username' can change in runtime
383
+
384
+ Version 0.0.62
385
+ * Enhancements
386
+ * Use q parameter to simply to query parameters on REST requests
387
+
388
+ Version 0.0.61
389
+ * Enhancements
390
+ * Retrieving oauth response try 3 times (to bypass intermittent errors)
391
+
392
+ Version 0.0.60
393
+ * Enhancements
394
+ * Allow for factory_bot with automatic setting of missing setter methods
395
+
396
+ Version 0.0.59
397
+ * Enhancements
398
+ * Perform ERB in headers to make using access_token using 'headers' possible
399
+ * Try better way of testing `soaspec-init`.
400
+
401
+ Version 0.0.58
402
+ * Enhancements
403
+ * Add method to set parts of the request body through `exchange[key]= 'value'`
404
+ * Added example of Cucumber feature demonstrating this
405
+
406
+ Version 0.0.56
407
+ * Bug fix
408
+ * Handle creating of traffic.log file within lib properly
409
+
410
+ Version 0.0.55
411
+ * Enhancements
412
+ * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
413
+
414
+ Version 0.0.54
415
+ * Enhancements
416
+ * Make 'headers' accessor for setting headers on RestHandler easier
417
+
418
+ Version 0.0.53
419
+ * Enhancements
420
+ * Make attribute possible for REST methods as well (as they can use XML too)
421
+ * For non XML, non JSON responses, handle with regex or key for a Hash
422
+
423
+ Version 0.0.52
424
+ * Enhancements
425
+ * Now have 'attribute' accessor making it easy to access an attribute from a response
426
+
427
+ Version 0.0.51
428
+ * Enhancements
429
+ * Allow for 'default_hash=' method to be used in RestHandler. See 'many_calls_one_method_spec' for example
430
+ * Got 'element' accessor working correctly (See soap/hash_spec.rb + 'blz_service' for example)
431
+
432
+ Version 0.0.50
433
+ * Enhancements
434
+ * Able to use ERB in oauth parameters and extract oauth hash with 'oauth_response' method defined by 'oauth_file'
435
+
436
+ Version 0.0.47
437
+ * Bug Fix
438
+ * Using 'Strip namespace' handle both namespace or not dependent if used
439
+
440
+ Version 0.0.47
441
+ * Enhancements
442
+ * 'success scenarios' shared eg and 'retry_for_success' exchange method's status codes include 200..299, not just 200.
443
+
444
+ Version 0.0.46
445
+ * Enhancements
446
+ * '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
447
+
448
+ Version 0.0.45
449
+ * Enhancements
450
+ * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
451
+
452
+ Version 0.0.44
453
+ * Enhancements
454
+ * Test Server log to logs/test_server.log
455
+ * Simplify ExchangeHandler storing and retrieving values (see soap/hash_spec.rb)
456
+ * Make setting SoapHandler operation and other params possible through object instantiation. Less code needed
457
+
458
+ Version 0.0.43
459
+ * Bug fix
460
+ * Remove Environment namespace from 'soaspec-generate'
461
+ * Enhancements
462
+ * 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
463
+
464
+ Version 0.0.42
465
+ * Enhancements
466
+ * Set Soaspec.api_handler work class is created. No need to call '.to_s' method
467
+
468
+ Version 0.0.41
469
+ * Bug fix
470
+ * soaspec-generate not designed to work with virtual service. Rakefile not try to set that up
471
+
472
+ Version 0.0.40
473
+ * Enhancements
474
+ * soaspec-generate now handle a wsdl without parameters in the operation and rather look up input element type
475
+ * test_server virtual service now handle scenario where bank is not found and test made for that
476
+
477
+ Version 0.0.39
478
+ * Spec
479
+ * Create task to use soaspec-init to create test structure and test it.
480
+ * Enhancements
481
+ * Take away need to use Environment namespace
482
+ * Added response headers to REST response log
483
+ * Now using virtual Web Service for SOAP
484
+
485
+ Version 0.0.38
486
+ * Bug fix
487
+ * Fixed error in soaspec-generate. TODO: Test this in CI
488
+
489
+ Version 0.0.37 / 2018-3-16
490
+ * Enhancements
491
+ * Made retry_for_success method to keep making request until 200 status code if set on exchange
492
+ * If '$' not included for json_path, by default a '$..' is added for convenience
493
+
494
+ Version 0.0.36 / 2018-3-15
495
+ * Bug fix
496
+ * Make test name log in correct place
497
+ * Enhancements
498
+ * Made accessor 'mandatory_json_values' to make it easier to share mandatory json path - value pairs
499
+ * Created 'store' method for handler through which one can store a value and use it later on it in the same context
500
+ * Deprecated
501
+ * Removed old 'mandatory_elements', 'mandatory_xpath_values' overridden way of handling data for favor of new way of it setting 'expected_mandatory_elements'
502
+
503
+ Version 0.0.35 / 2018-3-13
504
+ * Enhancements
505
+ * Handle array of JSON hashes starting with '['
506
+ * Handle patch and put methods with data for REST
507
+
508
+ Version 0.0.34 / 2018-3-12
509
+ * Enhancements
510
+ * Add oauth2 and oauth2_file methods to make it easy to load oauth2 parameters. Still a work in progress to handle all oauth2 variations
511
+
512
+ Version 0.0.33 / 2018-3-9
513
+ * Enhancements
514
+ * Use 'jsonpath' instead of dig to check JSON responses. Much better for finding complex paths
515
+
516
+ Version 0.0.32 / 2018-3-9
517
+ * Enhancements
518
+ * Made :body key in hash that can be used to use JSON.generate for a payload when using rest_handler exchanges
519
+
520
+ Version 0.0.31 / 2018-3-8
521
+ * Enhancements
522
+ * Compacted unit tests for exchange handler
523
+ * Implemented include_key? and find via xpath for REST handler. See specs
524
+
525
+ Version 0.0.30 / 2018-3-6
526
+ * Bug fix
527
+ * Made generated class file name in soaspec-generate snakecase (was CamelCase)
528
+
529
+ Version 0.0.29 / 2018-3-6
530
+ * Refactorings
531
+ * Base 'test' class from 'Tester' to 'ExhangeHandler'
532
+ * Made default Soap Handler class 'SoapHandler' and making use of 'BasicSoapHandler' deprecated
533
+
534
+ Version 0.0.28 / 2018-3-6
535
+ * Enhancements
536
+ * Added not_found matcher and used in spec example
537
+ * Only call request upon first need of an Exchange response. This means test request is made as part of 'it' rather than in describe
538
+
539
+ Version 0.0.27 / 2018-3-5
540
+ * Bug fix
541
+ * Fixed log file not present error
542
+ * Updated exe binaries to use latest format
543
+
544
+ Version 0.0.26 / 2018-3-5
545
+ * Refactorings
546
+ * Using methods to define mandatory_elements, mandatory_xpath_values, root_attributes, base_url. Please see specs. This is shorter to type and clearer
547
+
548
+ Version 0.0.25 / 2018-2-25
549
+ * Enhancements
550
+ * Updated rest_handler to convert JSON and XML into Hash and use it in 'contain_value'. This still needs work.
551
+ * Showed example of workflow using 'pet' url
552
+
553
+ Version 0.0.24 / 2018-2-25
554
+ * Enhancements
555
+ * Added to soaspec-generate more types when creating YAML with data (int, boolean, double and custom enumeration).
556
+ * Binaries use common module (exe-helper) to reduce repeatability
557
+ * TODO: soaspec-generate read xsd's mentioned to import in WSDL schema
558
+
559
+ Version 0.0.23 / 2018-2-23
560
+ * Enhancements
561
+ * Created RestHandler class (Very messy and ugly still) to handle REST requests using style used for SOAP using Rest Client resource
562
+
563
+ Version 0.0.22 / 2018-2-15
564
+ * Enhancements
565
+ * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
566
+
567
+ Version 0.0.21 / 2018-1-29
568
+ * Enhancements
569
+ * Added soaspec-generate - still in POC mode to generate files from a WSDL.
570
+ * Added test_wsdl to start at validating xml according to WSDL. Still needs polishing
571
+
572
+ Version 0.0.20 / 2018-1-26
573
+ * Enhancements
574
+ * Added ability to strip namespaces 'Soaspec::Environment.strip_namespaces = true'. See spec for example
575
+ * Fixes
576
+ * Made custom error and used it to make 'have_element_at_xpath' work when negated
577
+
578
+ Version 0.0.19 / 2018-1-25
579
+ * Enhancements
580
+ * Added own shared examples to init script and to in built specs
581
+
582
+ Version 0.0.18 / 2018-1-25
583
+ * Fixes
584
+ * Updated 'soaspec-init' so that it works again.
585
+ * Enhancements
586
+ * Added example showing representing data for request in YAML
587
+
588
+ Version 0.0.17 / 2018-1-25
589
+ * Fixes
590
+ * Updated hash search so that it handles Array
591
+
592
+ Version 0.0.16 / 2018-1-23
593
+ * Fixes
594
+ * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
595
+
596
+ Version 0.0.15 / 2018-1-23
597
+ * Fixes
598
+ * Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
599
+ the user doing the conversion themselves.
600
+
601
+ Version 0.0.14 / 2018-1-23
602
+ * Fixes
603
+ * Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
604
+ Now it's more like something you can read and pass into Savon request.
605
+
606
+ Version 0.0.13 / 2018-1-23
607
+ * Enhancements
608
+ * Executable to create xml file from yaml
609
+
610
+ Version 0.0.12 / 2018/1-22
611
+ * Enhancements
612
+ * Example name added to log file
613
+
614
+ Version 0.0.10 / 2018-1-21
615
+ * Enhancements
616
+ * Added [] method to perform xpath assertion
617
+ * Using Savon xpath. No need to explicitly provide namespace for xpath
618
+
619
+ Version 0.0.9 / 2018-1-20
620
+ * Refactoring
621
+ * class_options -> savon_options - More specific
622
+ * default_operation -> operation - Not default anymore so better not in name
623
+ * Enhancements
624
+ * Made mandatory_xpath_values method to add to 'success scenarios' shared example
625
+
626
+ Version 0.0.8 / 2018-1-19
627
+ * Enhancements
628
+ * Added root_attributes method to add attribute to the root class
629
+
630
+ Version 0.0.7 / 2018-1-19
631
+ * Enhancements
632
+ * Added contain_key matcher
626
633
  * mandatory_elements method created for SoapHandler - can be used to add tests to success scenarios (see example get_weather_web_service class for details)