soaspec 0.0.66 → 0.0.67
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/exe/soaspec-virtual-server +1 -0
- data/lib/soaspec/exchange_handlers/rest_handler.rb +4 -1
- data/lib/soaspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad22851bbf5ce8c7725927c3e73eb8b079e49625
|
4
|
+
data.tar.gz: 8c7ad3ee71c7ca0ee664408b4e0e5660a6e9489d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5269ba0197b5ec5b5b96faa246c9dad55785ada65bb78a4adc91b40fe636b431957f60ee4e54f2ffdabe9526ab2dd7aaf7641f9c68ebc12eebb10b4f07216f36
|
7
|
+
data.tar.gz: e00205fe4bfc59092650eaada3917c0bf220f00b885b8cdf3ee351f0fbef3c7885c0eb8a6296abc3df1c8e01fe6dc87fc876e23c898dbfc031a99c5adc3886ed
|
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
Version 0.0.67
|
2
|
+
* Enhancements
|
3
|
+
* Handle scenario where Request key is unconventional and not PascalCase key snakecase convert would break it
|
4
|
+
- if first character of key is captial, PascalCase conversion is ignored
|
5
|
+
|
1
6
|
Version 0.0.66
|
2
7
|
* Enhancements
|
3
8
|
* Added method to convert REST request keys to 'PascalCase' if 'pascal_keys' is set to true
|
data/exe/soaspec-virtual-server
CHANGED
@@ -36,6 +36,7 @@ post '/test/name' do
|
|
36
36
|
request_hash = JSON.parse(request.body.string)
|
37
37
|
id = Soaspec::TestServer::PuppyService.new_id
|
38
38
|
Soaspec::TestServer::PuppyService.data[id][:Name] = request_hash['Name']
|
39
|
+
Soaspec::TestServer::PuppyService.data[id][:Failure_Type__c] = request_hash['Failure_Type__c'] if request_hash['Failure_Type__c']
|
39
40
|
response_hash = { result: { Status: 'success', Data: Soaspec::TestServer::PuppyService.data[id] } }
|
40
41
|
JSON.generate response_hash
|
41
42
|
end
|
@@ -145,12 +145,15 @@ module Soaspec
|
|
145
145
|
@resource = RestClient::Resource.new(base_url_value, merged_options) # @resource[url_extension].get
|
146
146
|
end
|
147
147
|
|
148
|
+
# Convert snakecase to PascalCase
|
148
149
|
def convert_to_pascal_case(key)
|
150
|
+
return key if /[[:upper:]]/ =~ key[0] # If first character already capital, don't do conversion
|
149
151
|
key.split('_').map(&:capitalize).join
|
150
152
|
end
|
151
153
|
|
152
|
-
#
|
154
|
+
# Whether to convert each key in the request to PascalCase
|
153
155
|
# It will also auto convert simple XPath, JSONPath where '//' or '..' not specified
|
156
|
+
# @return Whether to convert to PascalCase
|
154
157
|
def pascal_keys?
|
155
158
|
false
|
156
159
|
end
|
data/lib/soaspec/version.rb
CHANGED