soaspec 0.0.44 → 0.0.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f697fff509cf16e29c1e5aebb5a22aa76fa54a21
4
- data.tar.gz: c625f8572cb5f6bda2dd71f241a9422a43407aba
3
+ metadata.gz: 5c4fe1e31ed200c99604632c3cedf641b493f72f
4
+ data.tar.gz: c48fc1bf2c281a6fadc6bd64752c6c86222d6bd1
5
5
  SHA512:
6
- metadata.gz: a82d977adcc9b8b903ed5180d7de79f021562110fde80f8d2a729b6b423299788f4e4ae22e857237f39832fdce563a59a4772587dc28064fde4f9c2627ea0f6b
7
- data.tar.gz: 73daca5174aec68f34f64b4101289d9ebb68a5fb753ce148ebfd56b527ae4860641525525d51b1d7e0c775cf7e9802ebcc4b4f121558de76f303b580366ba84f
6
+ metadata.gz: cddc01b446e5cafab7caab1e33130ec3d57fc3d42b685fd57db2216b59e25750e09952f4777815e23cce726ebbeaf9340c0918984ff76ac925eea5776c54262d
7
+ data.tar.gz: 91e7826c080dd542f9363dd06d89ffdc4bff5ffa612f37a4febc7602d8d8dafdff89d75b0c8791271d6fab558d142cba74766322cbbda8811a0aa333852dcefe
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.0.45
2
+ * Enhancements
3
+ * No need to use 'name' when creating SoapHandler and RestHandler. Default is ClassName
4
+
1
5
  Version 0.0.44
2
6
  * Enhancements
3
7
  * Test Server log to logs/test_server.log
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- soaspec (0.0.44)
4
+ soaspec (0.0.45)
5
5
  jsonpath
6
6
  rest-client (>= 2.0)
7
7
  rspec (~> 3.0)
@@ -10,7 +10,7 @@ module Soaspec
10
10
  # Set instance variable name
11
11
  # @param [String, Symbol] name Name used when describing API test
12
12
  # @param [Hash] options Parameters defining handler. Used in descendants
13
- def initialize(name, options = {})
13
+ def initialize(name = self.class.to_s, options = {})
14
14
  use
15
15
  @name = name
16
16
  end
@@ -91,11 +91,15 @@ module Soaspec
91
91
 
92
92
  # Setup object to handle communicating with a particular SOAP WSDL
93
93
  # @param [Hash] specific_options Options defining SOAP request. WSDL, authentication
94
- def initialize(name, specific_options = {})
94
+ def initialize(name = self.class.to_s, options = {})
95
95
  raise "Base URL not set! Please set in class with 'base_url' method" unless base_url_value
96
- options = rest_resource_options
97
- options.merge!(specific_options)
98
- @resource = RestClient::Resource.new(base_url_value, options) # @resource[url_extension].get
96
+ if name.is_a?(Hash) && options == {} # If name is not set
97
+ options = name
98
+ name = self.class.to_s
99
+ end
100
+ merged_options = rest_resource_options
101
+ merged_options.merge!(options)
102
+ @resource = RestClient::Resource.new(base_url_value, merged_options) # @resource[url_extension].get
99
103
  super
100
104
  end
101
105
 
@@ -69,18 +69,22 @@ module Soaspec
69
69
  end
70
70
 
71
71
  # Setup object to handle communicating with a particular SOAP WSDL
72
- # @param [Hash] specific_options Options defining SOAP request. WSDL, authentication, see http://savonrb.com/version2/globals.html for list of options
73
- def initialize(name, specific_options = {})
72
+ # @param [Hash] options Options defining SOAP request. WSDL, authentication, see http://savonrb.com/version2/globals.html for list of options
73
+ def initialize(name = self.class.to_s, options = {})
74
74
  @default_hash = {}
75
75
  @request_option = :hash
76
- set_remove_key(specific_options, :operation)
77
- set_remove_key(specific_options, :default_hash)
78
- set_remove_key(specific_options, :template_name)
79
- options = default_options.merge logging_options
80
- options.merge! savon_options
81
- options.merge!(specific_options)
82
- @client = Savon.client(options)
76
+ if name.is_a?(Hash) && options == {} # If name is not set
77
+ options = name
78
+ name = self.class.to_s
79
+ end
83
80
  super
81
+ set_remove_key(options, :operation)
82
+ set_remove_key(options, :default_hash)
83
+ set_remove_key(options, :template_name)
84
+ merged_options = default_options.merge logging_options
85
+ merged_options.merge! savon_options
86
+ merged_options.merge!(options)
87
+ @client = Savon.client(merged_options)
84
88
  end
85
89
 
86
90
  # Used in together with Exchange request that passes such override parameters
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.44'
3
- end
2
+ VERSION = '0.0.45'
3
+ 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.0.44
4
+ version: 0.0.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-09 00:00:00.000000000 Z
11
+ date: 2018-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler