webspicy 0.7.0 → 0.8.0

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: 603535b73b0506ae55a8a95b0c49b8e8425a6933
4
- data.tar.gz: 3dec5b346b624477b3c855a9695be2b7ec02ccf3
3
+ metadata.gz: 211c2a0ad0fc6bee6c027998d8e451fb05e8d349
4
+ data.tar.gz: b8c16d8c288941522f2199205cd3c8458deae5bf
5
5
  SHA512:
6
- metadata.gz: 7d4ced8f4e2dcb5b4da5195a99f5c1ea00a17857e65fc526d3d2aa160e96df0bfef50931bd49c69b6ae599c15ca78dce6d13605bfdd5f2a925415cd4f21f0eaa
7
- data.tar.gz: 8b54e09ce718db103a7b2252faa5c436221342331619c6dc1313342ba6c91352f6dbc5c47d70009aa480437385147b58cce203c843ddfc18d8b8a9490cc1af54
6
+ metadata.gz: b8804d9a1c260ad2f1eabae7b7961d3ec1fb9f46ee73a7c628ccdcc1285f3f5bc9404d80155efa6708b87d15af3a234bd29055ea9d1971576a0c0a39ad5617bb
7
+ data.tar.gz: a282af947643716046367b2ba0d198ee1e128d09a807f6573b90387bb7137491072584b398ebe9f6431fc0a57c455e3700354d392ae2743e634e4e9a3cdef5f7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- webspicy (0.5.0)
4
+ webspicy (0.8.0)
5
5
  finitio (~> 0.5.2)
6
6
  http (~> 2)
7
7
  path (~> 1.3)
@@ -18,7 +18,7 @@ module Webspicy
18
18
  url, params = resource.instantiate_url(params)
19
19
 
20
20
  # Globalize the URL if required
21
- url = scope.to_real_url(url)
21
+ url = scope.to_real_url(url, to_real_url)
22
22
 
23
23
  # Invoke the service now
24
24
  api.public_send(service.method.to_s.downcase.to_sym, url, params, headers, test_case.body)
@@ -21,7 +21,7 @@ module Webspicy
21
21
 
22
22
  # Instantiate the url and strip parameters
23
23
  url, params = resource.instantiate_url(params)
24
- url = scope.to_real_url(url){ url }
24
+ url = scope.to_real_url(url, test_case){|u,_| u }
25
25
 
26
26
  # Invoke the service now
27
27
  api.public_send(service.method.to_s.downcase.to_sym, url, params, headers, body)
@@ -98,10 +98,10 @@ module Webspicy
98
98
  # When no host resolved on the configuration and the url is not
99
99
  # already an absolute URL, yields the block if given, or raise
100
100
  # an exception.
101
- def to_real_url(url, &bl)
101
+ def to_real_url(url, test_case = nil, &bl)
102
102
  case config.host
103
103
  when Proc
104
- config.host.call(url)
104
+ config.host.call(url, test_case)
105
105
  when String
106
106
  url =~ /^http/ ? url : "#{config.host}#{url}"
107
107
  else
@@ -1,7 +1,7 @@
1
1
  module Webspicy
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 7
4
+ MINOR = 8
5
5
  TINY = 0
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
@@ -56,7 +56,7 @@ module Webspicy
56
56
 
57
57
  let(:configuration) {
58
58
  Configuration.new do |c|
59
- c.host = ->(url) {
59
+ c.host = ->(url, tc) {
60
60
  "http://127.0.0.1:4568#{url}"
61
61
  }
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webspicy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 2.6.11
197
+ rubygems_version: 2.5.1
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: Webspicy helps testing web services as software operation black boxes!