soaspec 0.3.7 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39211649f19153d09e4ea32c5887f92bba320af679e107cc91e56818cabb4cba
4
- data.tar.gz: 3829052653f93ab214d355215c99e75315d8341adeac12974e0e5a10214217db
3
+ metadata.gz: 25c76a735c83804a77a35c7bcbd85a3e1c837d5ffd801189f0601100ebd21d35
4
+ data.tar.gz: 8caeba76b839c267b1abb73700046e623f53a6c5f71e891607a5460a8a449d11
5
5
  SHA512:
6
- metadata.gz: 85b0c268b21bd3ffaa72312ac016986cb58fbabddbc4191ce53547499f95981dec43b848522063a794edb155551bdcbb0cb0a0a109e60f4f50a03a246c3d98bb
7
- data.tar.gz: a9bf65cab2d0fa0358f1dd4b18e6f38d27b08ad2b6367fdd63807dfa5127ed093d231f8e88d0f490f4cbfb3d12f91bbfc54fb359e1a63b8b70d1e8a2bbcdd794
6
+ metadata.gz: d999196f69ccdd587b05ede48ba7bf276b2b8d04afe8fa68e56302041a93bde41a1bb802729ce614232121626b9ae31e65a41c34f657e637e8575eefb2a1a0ca
7
+ data.tar.gz: ba87bbdcad28c84b19542b5a8d156a4d1922ce303f5b7b640e9ed6d91dd75cc68fe7a5df374c516235cb624d3e1913d2432df98acd477a551fb67418625e6772
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.3.8
2
+ * Bug fix
3
+ * Assigning default handler without overriding params was failing due to invalid default value
4
+
1
5
  Version 0.3.7
2
6
  * Bug fix
3
7
  * RestHandler - Fixed adding an extra slash between base_url and path if slash present in either of them
@@ -5,11 +5,24 @@ module Soaspec
5
5
  # Will be used when creating a subclass of Exchange
6
6
  module ExchangeProperties
7
7
  # Set default exchange handler for this exchange
8
+ #
9
+ # @example Custom Exchange sub class always using particular exchange handler
10
+ # class CustomExchange < Exchange
11
+ # default_handler EchoService
12
+ # end
13
+ # CustomExchange.exchange_handler.class # => EchoService
14
+ #
15
+ # @example Custom Exchange that has handler with particular properties
16
+ # class PreExchange < Exchange
17
+ # default_handler BLZService, 'Pre Exchange', operation: :get_bank
18
+ # end
19
+ # PreExchange.new.request_parameters.operation # => :get_bank
20
+ #
8
21
  # This is helpful for when you need a new exchange handler created for each exchange
9
22
  # @param [< ExchangeHandler] handler_class Class of ExchangeHandler to set Exchange to use
10
23
  # @param [String] name Name to call handler when it's instantiated (Defaults to class name)
11
24
  # @param [Hash] params Hash of parameters to set for instance of ExchangeHandler
12
- def default_handler(handler_class, name = handler_class.to_s, params = '')
25
+ def default_handler(handler_class, name = handler_class.to_s, params = {})
13
26
  define_method('default_handler_used') do
14
27
  params_used = Hash[params.map do |k, param|
15
28
  [k, param.is_a?(String) ? ERB.new(param).result(binding) : param]
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Soaspec
4
4
  # @return [String] Version of the gem
5
- VERSION = '0.3.7'
5
+ VERSION = '0.3.8'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-14 00:00:00.000000000 Z
11
+ date: 2019-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler