soaspec 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +7 -1
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -1
- data/exe/soaspec-generate +1 -1
- data/lib/soaspec/exchange_handlers/rest_handler.rb +18 -0
- data/lib/soaspec/exchange_handlers/soap_handler.rb +1 -0
- data/lib/soaspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb4b4d1bdf786fc03903155080a26907573ed1c
|
4
|
+
data.tar.gz: 538b49176bbfeac2aec37227049826f245930ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66ad518b6d17d50f0fe077d1c3f7c7565bbf82a786b22128733d8afc3370c2274dcac2a77a3404691adf1ee4d66da98507b388106ab3857cc7f6fbadbb35e4c4
|
7
|
+
data.tar.gz: bd8d6f729d674a31e461f16e9de088dac4221be95bb62a0d099900c86a5e30e01158da97d66238db416ec9828358848ce241b84bff99bfa61cf5f171c483e509
|
data/ChangeLog
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
Version 0.0.43
|
2
|
+
* Bug fix
|
3
|
+
* Remove Environment namespace from 'soaspec-generate'
|
4
|
+
* Enhancements
|
5
|
+
* 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
|
6
|
+
|
1
7
|
Version 0.0.42
|
2
8
|
* Enhancements
|
3
9
|
* Set Soaspec.api_handler work class is created. No need to call '.to_s' method
|
@@ -19,7 +25,7 @@ Version 0.0.39
|
|
19
25
|
* Added response headers to REST response log
|
20
26
|
* Now using virtual Web Service for SOAP
|
21
27
|
|
22
|
-
Version 0.0.38
|
28
|
+
Version 0.0.38
|
23
29
|
* Bug fix
|
24
30
|
* Fixed error in soaspec-generate. TODO: Test this in CI
|
25
31
|
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ ENV['folder'] ||= ''
|
|
6
6
|
ENV['test'] ||= ''
|
7
7
|
|
8
8
|
RSpec::Core::RakeTask.new(:run_spec) do |t|
|
9
|
-
t.pattern = "{spec/*/#{ENV['folder']}
|
9
|
+
t.pattern = "{spec/*/#{ENV['folder']}*/,tmp/*/spec/}#{ENV['test']}*_spec.rb"
|
10
10
|
end
|
11
11
|
|
12
12
|
desc 'Prepare log files'
|
data/exe/soaspec-generate
CHANGED
@@ -121,7 +121,7 @@ EOF
|
|
121
121
|
|
122
122
|
require 'spec_helper'
|
123
123
|
|
124
|
-
Soaspec
|
124
|
+
Soaspec.strip_namespaces = true # This allows namespace not to be used. Be careful with this
|
125
125
|
|
126
126
|
<%= operation %> = <%= @name %>.new(<%= @class_params %>)
|
127
127
|
<%= operation %>.operation = :<%= operation %>
|
@@ -238,5 +238,23 @@ module Soaspec
|
|
238
238
|
|
239
239
|
end
|
240
240
|
|
241
|
+
# Convenience methods for once off usage of a REST request
|
242
|
+
class << self
|
243
|
+
|
244
|
+
methods = %w[post patch put get delete]
|
245
|
+
|
246
|
+
methods.each do |rest_method|
|
247
|
+
# Make REST Exchange within this Handler context
|
248
|
+
# @param [Hash] params Exchange parameters
|
249
|
+
# @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body
|
250
|
+
define_method(rest_method) do |params|
|
251
|
+
params ||= {}
|
252
|
+
params[:name] ||= rest_method
|
253
|
+
new(params[:name])
|
254
|
+
Exchange.new(params[:name], method: rest_method.to_sym, **params)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
241
259
|
end
|
242
260
|
end
|
data/lib/soaspec/version.rb
CHANGED