soaspec 0.3.6 → 0.3.7

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
  SHA256:
3
- metadata.gz: 6e3843bc70d12aba4f2d2d825ef0eb3f142cea08fe50c6042875bcbc8f08d770
4
- data.tar.gz: 6448d093a3a2df45fa7db32c2c230349fd892258ffcf8d863f01759b79913a67
3
+ metadata.gz: 39211649f19153d09e4ea32c5887f92bba320af679e107cc91e56818cabb4cba
4
+ data.tar.gz: 3829052653f93ab214d355215c99e75315d8341adeac12974e0e5a10214217db
5
5
  SHA512:
6
- metadata.gz: f81e8e90e494743cdd9fdd87d251194cb7c791631a53508c224f458787458417c1c12b0d8cae942e246f92b7ffe2bd76cede518ddf60f156ef85eb3d4874138e
7
- data.tar.gz: 43c1a37a03e64cacce5a478083d183b6e4422d1ab5db5edc94b81c812968a804326df97c3c9ba539101e10fee8c27981f41186e337517e115d221194f922f7ad
6
+ metadata.gz: 85b0c268b21bd3ffaa72312ac016986cb58fbabddbc4191ce53547499f95981dec43b848522063a794edb155551bdcbb0cb0a0a109e60f4f50a03a246c3d98bb
7
+ data.tar.gz: a9bf65cab2d0fa0358f1dd4b18e6f38d27b08ad2b6367fdd63807dfa5127ed093d231f8e88d0f490f4cbfb3d12f91bbfc54fb359e1a63b8b70d1e8a2bbcdd794
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.3.7
2
+ * Bug fix
3
+ * RestHandler - Fixed adding an extra slash between base_url and path if slash present in either of them
4
+
1
5
  Version 0.3.6
2
6
  * Enhancement
3
7
  * Build up Rest request using `RestClient::Request` rather than use resource to allow
@@ -32,7 +32,7 @@ module Soaspec
32
32
  # @return [String] Base url plus sub url
33
33
  def full_url
34
34
  url = rest_handler.base_url_value
35
- url += "/#{suburl}" if suburl
35
+ url = concat_urls(url, suburl) if suburl
36
36
  @full_url = ERB.new(url).result(binding)
37
37
  end
38
38
 
@@ -142,5 +142,18 @@ module Soaspec
142
142
 
143
143
  nil
144
144
  end
145
+
146
+ private
147
+
148
+ # Join two urls, removing double slashes if they're on end and beginning of path
149
+ def concat_urls(url, suburl)
150
+ url = url.to_s
151
+ suburl = suburl.to_s
152
+ if url.slice(-1, 1) == '/' or suburl.slice(0, 1) == '/'
153
+ url + suburl
154
+ else
155
+ "#{url}/#{suburl}"
156
+ end
157
+ end
145
158
  end
146
159
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Soaspec
4
4
  # @return [String] Version of the gem
5
- VERSION = '0.3.6'
5
+ VERSION = '0.3.7'
6
6
  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.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA