safrano 0.8.6 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/odata/entity.rb +1 -1
- data/lib/safrano/service.rb +10 -8
- data/lib/safrano/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2eed096c2669da58d766a50abb6361f96003f8489367bcd4ab784e7a7306410
|
|
4
|
+
data.tar.gz: 991dbed63c5ceeda823024f9af0ea796a0aad5145c8549ad7cd114222b5ec973
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7722469a7e2a9cbfda56d955c3cd2efb97e07d881ac4738e61971b522a642ed8aae9bb387fcc8e625b19e8317cbd4fa57d073c01e2dfe93c88667e23b8a4c914
|
|
7
|
+
data.tar.gz: '06795fce287398b3f1087d5331427bd95db54359b84ca454304033285e6e8e73f289ac704364f4eb43c1f1f6cdb536e1378a58f14847eebd02a892dcb128bb7f'
|
data/lib/odata/entity.rb
CHANGED
data/lib/safrano/service.rb
CHANGED
|
@@ -153,7 +153,7 @@ module Safrano
|
|
|
153
153
|
attr_reader :function_import_keys
|
|
154
154
|
attr_reader :type_mappings
|
|
155
155
|
attr_reader :final_template_func
|
|
156
|
-
attr_reader :
|
|
156
|
+
attr_reader :xresponse_format_options # added x to differentiate from DSL function
|
|
157
157
|
|
|
158
158
|
# Instance attributes for specialized Version specific Instances
|
|
159
159
|
attr_reader :v1
|
|
@@ -180,7 +180,7 @@ module Safrano
|
|
|
180
180
|
@function_import_keys = []
|
|
181
181
|
@cmap = {}
|
|
182
182
|
@type_mappings = {}
|
|
183
|
-
@
|
|
183
|
+
@xresponse_format_options = []
|
|
184
184
|
@final_template_func = FINAL_TEMPLATE_FUNC_DEFAULT
|
|
185
185
|
# enabled per default starting from 0.6
|
|
186
186
|
@xbugfix_create_response = true
|
|
@@ -203,7 +203,7 @@ module Safrano
|
|
|
203
203
|
@function_import_keys = template_instance.function_import_keys.dup
|
|
204
204
|
@cmap = template_instance.cmap.dup
|
|
205
205
|
@type_mappings = template_instance.type_mappings.dup
|
|
206
|
-
@
|
|
206
|
+
@xresponse_format_options = template_instance.xresponse_format_options.dup
|
|
207
207
|
@final_template_func = template_instance.final_template_func.dup
|
|
208
208
|
@xbugfix_create_response = template_instance.xbugfix_create_response.dup
|
|
209
209
|
@xpath_prefix = template_instance.xpath_prefix.dup
|
|
@@ -293,6 +293,8 @@ module Safrano
|
|
|
293
293
|
|
|
294
294
|
VALID_RESP_FORMAT_OPTS = [:skip_deferred, :skip_metadata]
|
|
295
295
|
def valid_resp_format_options(*args)
|
|
296
|
+
raise API::InvalidRespFormatOption.new(args) unless args
|
|
297
|
+
|
|
296
298
|
args.map!(&:to_sym)
|
|
297
299
|
args.each { |arg|
|
|
298
300
|
raise API::InvalidRespFormatOption.new(arg) unless VALID_RESP_FORMAT_OPTS.include?(arg)
|
|
@@ -302,7 +304,7 @@ module Safrano
|
|
|
302
304
|
|
|
303
305
|
def response_format_options(*args)
|
|
304
306
|
valid_resp_format_options(*args) do |vargs|
|
|
305
|
-
@
|
|
307
|
+
@xresponse_format_options = vargs.dup
|
|
306
308
|
process_response_format_options
|
|
307
309
|
@v1.response_format_options(*vargs) if @v1
|
|
308
310
|
@v2.response_format_options(*vargs) if @v2
|
|
@@ -317,12 +319,12 @@ module Safrano
|
|
|
317
319
|
|
|
318
320
|
# end public API
|
|
319
321
|
def process_response_format_options
|
|
320
|
-
@final_template_func = if (@
|
|
321
|
-
@
|
|
322
|
+
@final_template_func = if (@xresponse_format_options.include?(:skip_metadata) &&
|
|
323
|
+
@xresponse_format_options.include?(:skip_deferred))
|
|
322
324
|
FINAL_TEMPLATE_FUNC_SKIP_META_DEFERR
|
|
323
|
-
elsif @
|
|
325
|
+
elsif @xresponse_format_options.include?(:skip_metadata)
|
|
324
326
|
FINAL_TEMPLATE_FUNC_SKIP_META
|
|
325
|
-
elsif @
|
|
327
|
+
elsif @xresponse_format_options.include?(:skip_deferred)
|
|
326
328
|
FINAL_TEMPLATE_FUNC_SKIP_DEFERR
|
|
327
329
|
else
|
|
328
330
|
FINAL_TEMPLATE_FUNC_DEFAULT
|
data/lib/safrano/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: safrano
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- oz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|