soaspec 0.0.42 → 0.0.43

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: 9ddb0eda9d752b59276956004c66015963908802
4
- data.tar.gz: d2c27c83af359df6abc3ff500c68978691de6d7a
3
+ metadata.gz: adb4b4d1bdf786fc03903155080a26907573ed1c
4
+ data.tar.gz: 538b49176bbfeac2aec37227049826f245930ac1
5
5
  SHA512:
6
- metadata.gz: 25eef262b5bd7e23c9c6f638bb8854abf2c3047bd65b4a4a697fc6e88ff541c4b894b6f9800b44de215b759d6a9f23c3efa7c416ebb2bff87365632dc88828ae
7
- data.tar.gz: a71d53563e3f39659532bbd438c47d112591bb87d3e8874c8a9e058cfc93f215d79fa18c25be419d20c2869d2d8d0ac8eb41682073aed6bc647879228e3ca9f1
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 / 2018-3-15
28
+ Version 0.0.38
23
29
  * Bug fix
24
30
  * Fixed error in soaspec-generate. TODO: Test this in CI
25
31
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- soaspec (0.0.42)
4
+ soaspec (0.0.43)
5
5
  jsonpath
6
6
  rest-client (>= 2.0)
7
7
  rspec (~> 3.0)
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']}*/#{ENV['test']},tmp/*/spec/}*_spec.rb"
9
+ t.pattern = "{spec/*/#{ENV['folder']}*/,tmp/*/spec/}#{ENV['test']}*_spec.rb"
10
10
  end
11
11
 
12
12
  desc 'Prepare log files'
@@ -121,7 +121,7 @@ EOF
121
121
 
122
122
  require 'spec_helper'
123
123
 
124
- Soaspec::Environment.strip_namespaces = true # This allows namespace not to be used. Be careful with this
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
@@ -15,6 +15,7 @@ module Soaspec
15
15
  attributes
16
16
  end
17
17
  end
18
+
18
19
  end
19
20
 
20
21
  # Wraps around Savon client defining default values dependent on the soap request
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.42'
2
+ VERSION = '0.0.43'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.42
4
+ version: 0.0.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA