flexirest 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/flexirest/request.rb +4 -2
- data/lib/flexirest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1349ef4e54b96017ed3331777f11f097eb99cbe2
|
4
|
+
data.tar.gz: ba0508dcb49233db86db40ef9e402783a1f179b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f96c0a219835043e7700c3bfcc609ae5baa228604654eb45154637f094dde3bb0c0d57003de77e3392d8476f27bef13f5610e6168eb8e48636bdaf18fc6da3
|
7
|
+
data.tar.gz: dc72d7334cee925179db652ffcce8b5d16d51a7b3c8feaaa4623649fc065bf38d0b4bf86ddbededb8d9e7a616847a31d7f0c37285456ca4ce734b178dae64506
|
data/CHANGELOG.md
CHANGED
data/lib/flexirest/request.rb
CHANGED
@@ -314,8 +314,10 @@ module Flexirest
|
|
314
314
|
token = token.first[1,999]
|
315
315
|
# pull URL path variables out of @get_params/@post_params
|
316
316
|
target = @get_params.delete(token.to_sym) || @post_params.delete(token.to_sym) || @get_params.delete(token.to_s) || @post_params.delete(token.to_s) || ""
|
317
|
-
|
318
|
-
|
317
|
+
unless object_is_class?
|
318
|
+
# it's possible the URL path variable may not be part of the request, in that case, try to resolve it from the object attributes
|
319
|
+
target = @object._attributes[token.to_sym] || "" if target == ""
|
320
|
+
end
|
319
321
|
@url.gsub!(":#{token}", URI.escape(target.to_s).gsub("/", "%2F").gsub("+", "%2B"))
|
320
322
|
end
|
321
323
|
end
|
data/lib/flexirest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexirest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|