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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e85c415626794edcaa1b13f12026dc04e619359
4
- data.tar.gz: 1bafaf7d28a044e41cfd284d94ee5210c19a3d98
3
+ metadata.gz: ad22851bbf5ce8c7725927c3e73eb8b079e49625
4
+ data.tar.gz: 8c7ad3ee71c7ca0ee664408b4e0e5660a6e9489d
5
5
  SHA512:
6
- metadata.gz: c4062eae6480b45730bd44a8f94a2f564ba9a95f33c2e82cc5cb35de5a6d496d61e5f4cb41854c805e167c7d14d0758bb4bb2099f219f3fe3b9e6255b00091cd
7
- data.tar.gz: aa7e71f4c08aa808fc381eb1199ee5027b4ee56bd5b03a41cc5ecbd4cd7692763f17ff9f642cf2d5f73de016427293f7ec5271e6625d46fb69873c8a2c7a3fbb
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
@@ -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
- # @return Whether to convert each key in the request to PascalCase
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
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.66'.freeze
2
+ VERSION = '0.0.67'.freeze
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.66
4
+ version: 0.0.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA