talon_one 6.0.0 → 7.0.0
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/.github/.example/.bundle/config +2 -0
- data/.github/.example/Gemfile +6 -0
- data/.github/.example/Gemfile.lock +47 -0
- data/.github/.example/example.rb +85 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/gem.build_complete +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/gem_make.out +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/json/ext/generator.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/json/ext/parser.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/mkmf.log +177 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/.github/workflows/ruby.yml +41 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/.gitignore +8 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/.rspec +3 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/Gemfile +43 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/Guardfile +10 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/LICENSE +20 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/README.md +118 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/Rakefile +40 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/ethon.gemspec +26 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curl.rb +90 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb +65 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb +122 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb +80 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb +37 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb +58 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb +151 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb +19 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb +503 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/callbacks.rb +149 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/debug_info.rb +47 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/features.rb +31 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/form.rb +107 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/header.rb +61 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb +157 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb +29 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/delete.rb +25 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb +26 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/postable.rb +32 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb +27 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb +25 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http.rb +68 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/informations.rb +116 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/mirror.rb +36 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/operations.rb +64 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/options.rb +50 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/params.rb +29 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/queryable.rb +154 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb +136 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/util.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy.rb +315 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/ethon_error.rb +9 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/global_init.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_option.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_value.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_add.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_fdset.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_remove.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_timeout.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/select.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors.rb +17 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/libc.rb +21 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/loggable.rb +59 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi/operations.rb +228 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi/options.rb +117 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi/stack.rb +49 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi.rb +126 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/version.rb +6 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon.rb +36 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/benchmarks.rb +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/memory_leaks.rb +114 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/perf_spec_helper.rb +37 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/support/memory_test_helpers.rb +76 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/support/os_memory_leak_tracker.rb +48 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/support/ruby_object_leak_tracker.rb +49 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/curl_spec.rb +38 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/callbacks_spec.rb +81 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/debug_info_spec.rb +54 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/features_spec.rb +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/form_spec.rb +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/header_spec.rb +79 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/custom_spec.rb +177 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/delete_spec.rb +21 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/get_spec.rb +126 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/head_spec.rb +80 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/options_spec.rb +51 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/patch_spec.rb +51 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/post_spec.rb +317 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/put_spec.rb +168 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http_spec.rb +64 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/informations_spec.rb +126 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/mirror_spec.rb +47 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/operations_spec.rb +271 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/options_spec.rb +193 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/queryable_spec.rb +235 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/response_callbacks_spec.rb +152 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/util_spec.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy_spec.rb +203 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/libc_spec.rb +14 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/loggable_spec.rb +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi/operations_spec.rb +298 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi/options_spec.rb +182 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi/stack_spec.rb +80 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi_spec.rb +152 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/spec_helper.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/support/localhost_server.rb +95 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/support/server.rb +115 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/CHANGELOG.md +456 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/COPYING +49 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/Gemfile +21 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/LICENSE +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/LICENSE.SPECS +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/README.md +137 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/Rakefile +206 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/ffi.gemspec +42 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/2.5/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/2.7/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.0/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.1/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.2/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.3/ffi_c.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/abstract_memory.rb +44 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/autopointer.rb +180 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/buffer.rb +4 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/callback.rb +4 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/compat.rb +43 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/data_converter.rb +67 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/dynamic_library.rb +118 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/enum.rb +302 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/errno.rb +43 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/ffi.rb +50 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/function.rb +71 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/io.rb +62 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/library.rb +576 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/library_path.rb +109 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/managedstruct.rb +84 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/memorypointer.rb +1 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-linux/types.conf +175 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-windows/types.conf +52 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/arm-freebsd/types.conf +152 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/arm-linux/types.conf +132 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-cygwin/types.conf +3 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-darwin/types.conf +100 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-freebsd/types.conf +152 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-gnu/types.conf +107 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-linux/types.conf +103 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-netbsd/types.conf +126 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-solaris/types.conf +122 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-windows/types.conf +52 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/ia64-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mips-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mips64-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsel-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-aix/types.conf +180 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-linux/types.conf +130 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/riscv64-linux/types.conf +104 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/s390-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/s390x-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparc-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparc-solaris/types.conf +128 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparcv9-linux/types.conf +102 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sw_64-linux/types.conf +141 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-darwin/types.conf +130 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-linux/types.conf +132 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-msys/types.conf +119 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-openbsd/types.conf +134 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-windows/types.conf +52 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform.rb +187 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/pointer.rb +167 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct.rb +317 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct_by_reference.rb +72 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct_layout.rb +96 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct_layout_builder.rb +227 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/const_generator.rb +232 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/generator.rb +105 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/generator_task.rb +32 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/struct_generator.rb +195 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/types_generator.rb +137 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/types.rb +222 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/union.rb +43 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/variadic.rb +80 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/version.rb +3 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb +27 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/rakelib/ffi_gem_helper.rb +65 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/getlogin.rb +8 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/getpid.rb +8 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/gettimeofday.rb +18 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/hello.rb +8 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/hello_ractor.rb +11 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/inotify.rb +60 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/pty.rb +75 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/qsort.rb +20 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/qsort_ractor.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/abstract_memory.rbs +165 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/auto_pointer.rbs +27 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/buffer.rbs +18 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/data_converter.rbs +10 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/dynamic_library.rbs +9 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/enum.rbs +38 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/function.rbs +39 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/library.rbs +42 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/native_type.rbs +86 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/pointer.rbs +42 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct.rbs +76 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_by_reference.rbs +11 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_by_value.rbs +7 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_layout.rbs +9 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_layout_builder.rbs +5 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/type.rbs +39 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi.rbs +26 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/BSDL +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/CHANGES.md +559 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/COPYING +56 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/LEGAL +60 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/README.md +195 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/fbuffer/fbuffer.h +184 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/generator/Makefile +270 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/generator/extconf.rb +10 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/generator/generator.c +1663 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/Makefile +270 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/extconf.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/parser.c +3238 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/parser.rl +1465 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/json.gemspec +64 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/bigdecimal.rb +58 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/complex.rb +51 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/core.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/date.rb +54 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/date_time.rb +67 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/exception.rb +49 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/ostruct.rb +54 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/range.rb +54 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/rational.rb +49 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/regexp.rb +48 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/set.rb +48 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/struct.rb +52 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/symbol.rb +47 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/time.rb +52 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/common.rb +876 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext/generator/state.rb +105 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext/generator.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext/parser.bundle +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext.rb +23 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/generic_object.rb +75 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/truffle_ruby/generator.rb +621 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/version.rb +5 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json.rb +587 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/ci.yml +30 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/experimental.yml +33 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.gitignore +8 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.rspec +4 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/CHANGELOG.md +410 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/CONTRIBUTING.md +20 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Gemfile +36 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Guardfile +9 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/LICENSE +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/README.md +588 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Rakefile +38 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/UPGRADE.md +55 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/rack/typhoeus/middleware/params_decoder/helper.rb +76 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/rack/typhoeus/middleware/params_decoder.rb +57 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/rack/typhoeus.rb +1 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/adapters/faraday.rb +180 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/cache/dalli.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/cache/rails.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/cache/redis.rb +35 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/config.rb +85 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/easy_factory.rb +206 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/errors/no_stub.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/errors/typhoeus_error.rb +8 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/errors.rb +9 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/expectation.rb +217 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/addable.rb +23 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/before.rb +31 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb +35 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/cacheable.rb +15 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/memoizable.rb +56 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/queueable.rb +83 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/runnable.rb +19 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/stubbable.rb +28 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra.rb +95 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/pool.rb +70 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/railtie.rb +12 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/actions.rb +125 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/before.rb +30 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/block_connection.rb +52 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/cacheable.rb +38 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/callbacks.rb +151 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/marshal.rb +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/memoizable.rb +38 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/operations.rb +40 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/responseable.rb +29 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/streamable.rb +34 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/stubbable.rb +30 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request.rb +223 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/cacheable.rb +14 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/header.rb +105 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/informations.rb +305 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/status.rb +106 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response.rb +68 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/version.rb +5 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus.rb +143 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/profile.rb +14 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/vs_nethttp.rb +64 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +156 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder_spec.rb +31 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/spec_helper.rb +29 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/localhost_server.rb +94 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/memory_cache.rb +15 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/server.rb +116 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/adapters/faraday_spec.rb +339 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/dalli_spec.rb +41 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/redis_spec.rb +41 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/config_spec.rb +15 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/easy_factory_spec.rb +143 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/errors/no_stub_spec.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/expectation_spec.rb +280 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/addable_spec.rb +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/before_spec.rb +98 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/block_connection_spec.rb +18 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/cacheable_spec.rb +88 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/memoizable_spec.rb +53 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/queueable_spec.rb +98 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/runnable_spec.rb +137 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/stubbable_spec.rb +48 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra_spec.rb +22 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/pool_spec.rb +137 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/actions_spec.rb +19 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/before_spec.rb +93 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/block_connection_spec.rb +75 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/cacheable_spec.rb +94 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/callbacks_spec.rb +91 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/marshal_spec.rb +60 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/memoizable_spec.rb +34 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/operations_spec.rb +101 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/responseable_spec.rb +13 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/stubbable_spec.rb +45 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request_spec.rb +256 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/header_spec.rb +147 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/informations_spec.rb +323 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/status_spec.rb +256 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response_spec.rb +100 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus_spec.rb +105 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/typhoeus.gemspec +25 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/ethon-0.16.0.gemspec +24 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/ffi-1.17.0-arm64-darwin.gemspec +31 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/json-2.8.2.gemspec +0 -0
- data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/typhoeus-1.4.1.gemspec +24 -0
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/test.yml +75 -0
- data/README.md +546 -562
- data/docker-compose.yml +47 -0
- data/docs/AccountAnalytics.md +1 -1
- data/docs/Achievement.md +8 -0
- data/docs/AdditionalCampaignProperties.md +1 -1
- data/docs/AnalyticsProduct.md +23 -0
- data/docs/AnalyticsProductSKU.md +21 -0
- data/docs/ApplicationCampaignStats.md +2 -0
- data/docs/ApplicationCustomer.md +8 -8
- data/docs/ApplicationSession.md +2 -2
- data/docs/AudienceCustomer.md +2 -2
- data/docs/BaseLoyaltyProgram.md +3 -1
- data/docs/BulkOperationOnCampaigns.md +3 -1
- data/docs/Campaign.md +3 -1
- data/docs/CampaignTemplate.md +3 -1
- data/docs/CampaignTemplateCouponReservationSettings.md +19 -0
- data/docs/CampaignVersions.md +3 -1
- data/docs/Change.md +1 -1
- data/docs/CouponDeletionFilters.md +1 -1
- data/docs/CreateAchievement.md +9 -1
- data/docs/CustomerProfile.md +2 -2
- data/docs/CustomerProfileAudienceRequestItem.md +1 -1
- data/docs/CustomerSession.md +1 -1
- data/docs/CustomerSessionV2.md +10 -8
- data/docs/FeatureFlag.md +1 -1
- data/docs/GenerateCampaignDescription.md +2 -2
- data/docs/GenerateCampaignTags.md +2 -2
- data/docs/GenerateLoyaltyCard.md +3 -1
- data/docs/InlineResponse20020.md +1 -1
- data/docs/InlineResponse20021.md +4 -2
- data/docs/InlineResponse20022.md +3 -3
- data/docs/InlineResponse20023.md +1 -1
- data/docs/InlineResponse20024.md +1 -3
- data/docs/InlineResponse20025.md +1 -1
- data/docs/InlineResponse20026.md +2 -2
- data/docs/InlineResponse20027.md +2 -2
- data/docs/InlineResponse20028.md +3 -3
- data/docs/InlineResponse20029.md +5 -3
- data/docs/InlineResponse20030.md +1 -3
- data/docs/InlineResponse20031.md +1 -1
- data/docs/InlineResponse20032.md +3 -1
- data/docs/InlineResponse20033.md +3 -5
- data/docs/InlineResponse20034.md +5 -3
- data/docs/InlineResponse20035.md +3 -5
- data/docs/InlineResponse20036.md +1 -1
- data/docs/InlineResponse20037.md +1 -1
- data/docs/InlineResponse20038.md +1 -1
- data/docs/InlineResponse20039.md +1 -1
- data/docs/InlineResponse20040.md +1 -1
- data/docs/InlineResponse20041.md +4 -2
- data/docs/InlineResponse20042.md +2 -4
- data/docs/InlineResponse20043.md +1 -1
- data/docs/InlineResponse20044.md +5 -3
- data/docs/InlineResponse20045.md +1 -3
- data/docs/InlineResponse20046.md +3 -3
- data/docs/IntegrationApi.md +8 -8
- data/docs/IntegrationCustomerSessionResponse.md +1 -1
- data/docs/LedgerInfo.md +2 -2
- data/docs/ListCampaignStoreBudgets.md +23 -0
- data/docs/ListCampaignStoreBudgetsStore.md +21 -0
- data/docs/LoyaltyCard.md +4 -0
- data/docs/LoyaltyCardBatch.md +3 -1
- data/docs/LoyaltyLedger.md +1 -1
- data/docs/LoyaltyMembership.md +1 -1
- data/docs/LoyaltyProgram.md +5 -3
- data/docs/LoyaltyProgramBalance.md +2 -2
- data/docs/LoyaltyProgramEntity.md +5 -1
- data/docs/LoyaltyTier.md +6 -2
- data/docs/ManagementApi.md +114 -188
- data/docs/MessageLogEntry.md +10 -2
- data/docs/NewCampaignStoreBudget.md +21 -0
- data/docs/NewCampaignStoreBudgetStoreLimit.md +19 -0
- data/docs/NewCampaignTemplate.md +2 -0
- data/docs/NewCustomerSessionV2.md +4 -4
- data/docs/NewLoyaltyProgram.md +2 -0
- data/docs/NewLoyaltyTier.md +2 -2
- data/docs/NewPicklist.md +1 -1
- data/docs/NewWebhook.md +1 -1
- data/docs/Picklist.md +1 -1
- data/docs/Product.md +1 -1
- data/docs/ProductSearchMatch.md +21 -0
- data/docs/ProductSkuUnitAnalytics.md +23 -0
- data/docs/ProductUnitAnalytics.md +25 -0
- data/docs/ScimNewUser.md +1 -1
- data/docs/ScimServiceProviderConfigResponse.md +3 -1
- data/docs/ScimServiceProviderConfigResponseSort.md +17 -0
- data/docs/ScimUser.md +1 -1
- data/docs/Store.md +2 -2
- data/docs/StrikethroughDebugResponse.md +19 -0
- data/docs/SummaryCampaignStoreBudget.md +21 -0
- data/docs/TemplateArgDef.md +2 -0
- data/docs/UpdateAchievement.md +9 -1
- data/docs/UpdateCampaignTemplate.md +2 -0
- data/docs/UpdateLoyaltyProgram.md +2 -0
- data/docs/UpdateLoyaltyProgramTier.md +21 -0
- data/docs/UpdatePicklist.md +1 -1
- data/docs/User.md +2 -2
- data/docs/ValueMap.md +23 -0
- data/docs/Webhook.md +1 -1
- data/docs/WebhookLogEntry.md +1 -1
- data/docs/WebhookWithOutgoingIntegrationDetails.md +1 -1
- data/lib/talon_one/api/integration_api.rb +13 -13
- data/lib/talon_one/api/management_api.rb +156 -245
- data/lib/talon_one/models/account.rb +0 -1
- data/lib/talon_one/models/account_additional_cost.rb +0 -1
- data/lib/talon_one/models/achievement.rb +87 -2
- data/lib/talon_one/models/add_loyalty_points_effect_props.rb +11 -0
- data/lib/talon_one/models/additional_campaign_properties.rb +3 -3
- data/lib/talon_one/models/analytics_product.rb +252 -0
- data/lib/talon_one/models/analytics_product_sku.rb +242 -0
- data/lib/talon_one/models/application.rb +0 -1
- data/lib/talon_one/models/application_api_key.rb +0 -1
- data/lib/talon_one/models/application_campaign_analytics.rb +2 -2
- data/lib/talon_one/models/application_campaign_stats.rb +16 -1
- data/lib/talon_one/models/application_cif.rb +0 -1
- data/lib/talon_one/models/application_cif_expression.rb +0 -1
- data/lib/talon_one/models/application_customer.rb +4 -5
- data/lib/talon_one/models/application_event.rb +0 -1
- data/lib/talon_one/models/application_referee.rb +0 -1
- data/lib/talon_one/models/application_session.rb +1 -2
- data/lib/talon_one/models/async_coupon_deletion_job_response.rb +0 -1
- data/lib/talon_one/models/attribute.rb +0 -1
- data/lib/talon_one/models/audience.rb +0 -1
- data/lib/talon_one/models/audience_customer.rb +1 -2
- data/lib/talon_one/models/base_loyalty_program.rb +26 -4
- data/lib/talon_one/models/base_notification.rb +0 -1
- data/lib/talon_one/models/base_notification_webhook.rb +0 -1
- data/lib/talon_one/models/bulk_operation_on_campaigns.rb +16 -6
- data/lib/talon_one/models/campaign.rb +26 -5
- data/lib/talon_one/models/campaign_analytics.rb +0 -1
- data/lib/talon_one/models/campaign_collection.rb +0 -1
- data/lib/talon_one/models/campaign_collection_without_payload.rb +0 -1
- data/lib/talon_one/models/campaign_evaluation_group.rb +0 -1
- data/lib/talon_one/models/campaign_group.rb +0 -1
- data/lib/talon_one/models/campaign_set.rb +0 -1
- data/lib/talon_one/models/campaign_store_budget.rb +0 -1
- data/lib/talon_one/models/campaign_template.rb +10 -2
- data/lib/talon_one/models/campaign_template_coupon_reservation_settings.rb +243 -0
- data/lib/talon_one/models/campaign_versions.rb +45 -1
- data/lib/talon_one/models/card_ledger_transaction_log_entry.rb +11 -0
- data/lib/talon_one/models/card_ledger_transaction_log_entry_integration_api.rb +11 -0
- data/lib/talon_one/models/catalog.rb +0 -1
- data/lib/talon_one/models/catalog_item.rb +0 -1
- data/lib/talon_one/models/change.rb +0 -1
- data/lib/talon_one/models/code_generator_settings.rb +11 -0
- data/lib/talon_one/models/collection.rb +0 -1
- data/lib/talon_one/models/collection_item.rb +0 -1
- data/lib/talon_one/models/collection_without_payload.rb +0 -1
- data/lib/talon_one/models/coupon.rb +0 -1
- data/lib/talon_one/models/coupon_creation_job.rb +0 -1
- data/lib/talon_one/models/coupon_deletion_filters.rb +0 -2
- data/lib/talon_one/models/coupon_deletion_job.rb +0 -1
- data/lib/talon_one/models/create_achievement.rb +90 -4
- data/lib/talon_one/models/custom_effect.rb +0 -1
- data/lib/talon_one/models/customer_profile.rb +1 -2
- data/lib/talon_one/models/customer_profile_audience_request_item.rb +1 -1
- data/lib/talon_one/models/customer_profile_integration_request_v2.rb +1 -1
- data/lib/talon_one/models/customer_session.rb +0 -1
- data/lib/talon_one/models/customer_session_v2.rb +20 -10
- data/lib/talon_one/models/deactivate_user_request.rb +0 -1
- data/lib/talon_one/models/deduct_loyalty_points_effect_props.rb +11 -0
- data/lib/talon_one/models/effect.rb +1 -1
- data/lib/talon_one/models/environment.rb +0 -1
- data/lib/talon_one/models/event.rb +0 -1
- data/lib/talon_one/models/event_type.rb +0 -1
- data/lib/talon_one/models/event_v2.rb +0 -1
- data/lib/talon_one/models/export.rb +0 -1
- data/lib/talon_one/models/features_feed.rb +0 -1
- data/lib/talon_one/models/generate_campaign_description.rb +11 -11
- data/lib/talon_one/models/generate_campaign_tags.rb +11 -11
- data/lib/talon_one/models/generate_loyalty_card.rb +40 -4
- data/lib/talon_one/models/giveaway.rb +0 -1
- data/lib/talon_one/models/import.rb +0 -1
- data/lib/talon_one/models/inline_response20020.rb +1 -1
- data/lib/talon_one/models/inline_response20021.rb +11 -7
- data/lib/talon_one/models/inline_response20022.rb +10 -10
- data/lib/talon_one/models/inline_response20023.rb +1 -1
- data/lib/talon_one/models/inline_response20024.rb +6 -10
- data/lib/talon_one/models/inline_response20025.rb +1 -1
- data/lib/talon_one/models/inline_response20026.rb +1 -6
- data/lib/talon_one/models/inline_response20027.rb +6 -1
- data/lib/talon_one/models/inline_response20028.rb +11 -11
- data/lib/talon_one/models/inline_response20029.rb +11 -7
- data/lib/talon_one/models/inline_response20030.rb +2 -11
- data/lib/talon_one/models/inline_response20031.rb +1 -1
- data/lib/talon_one/models/inline_response20032.rb +11 -2
- data/lib/talon_one/models/inline_response20033.rb +7 -11
- data/lib/talon_one/models/inline_response20034.rb +11 -7
- data/lib/talon_one/models/inline_response20035.rb +7 -11
- data/lib/talon_one/models/inline_response20036.rb +1 -1
- data/lib/talon_one/models/inline_response20037.rb +1 -1
- data/lib/talon_one/models/inline_response20038.rb +1 -1
- data/lib/talon_one/models/inline_response20039.rb +1 -1
- data/lib/talon_one/models/inline_response20040.rb +1 -1
- data/lib/talon_one/models/inline_response20041.rb +11 -7
- data/lib/talon_one/models/inline_response20042.rb +7 -11
- data/lib/talon_one/models/inline_response20043.rb +1 -1
- data/lib/talon_one/models/inline_response20044.rb +11 -7
- data/lib/talon_one/models/inline_response20045.rb +2 -11
- data/lib/talon_one/models/inline_response20046.rb +6 -1
- data/lib/talon_one/models/integration_coupon.rb +0 -1
- data/lib/talon_one/models/integration_customer_session_response.rb +1 -0
- data/lib/talon_one/models/integration_event.rb +0 -1
- data/lib/talon_one/models/integration_event_v2_request.rb +0 -1
- data/lib/talon_one/models/inventory_coupon.rb +0 -1
- data/lib/talon_one/models/inventory_referral.rb +0 -1
- data/lib/talon_one/models/item_attribute.rb +0 -1
- data/lib/talon_one/models/ledger_entry.rb +1 -1
- data/lib/talon_one/models/ledger_info.rb +3 -3
- data/lib/talon_one/models/library_attribute.rb +0 -1
- data/lib/talon_one/models/limit_counter.rb +0 -1
- data/lib/talon_one/models/list_campaign_store_budgets.rb +248 -0
- data/lib/talon_one/models/list_campaign_store_budgets_store.rb +239 -0
- data/lib/talon_one/models/login_params.rb +0 -1
- data/lib/talon_one/models/loyalty_balance_with_tier.rb +1 -1
- data/lib/talon_one/models/loyalty_card.rb +54 -2
- data/lib/talon_one/models/loyalty_card_balances.rb +1 -1
- data/lib/talon_one/models/loyalty_card_batch.rb +13 -5
- data/lib/talon_one/models/loyalty_program.rb +25 -3
- data/lib/talon_one/models/loyalty_program_balance.rb +2 -2
- data/lib/talon_one/models/loyalty_program_entity.rb +24 -4
- data/lib/talon_one/models/loyalty_program_transaction.rb +11 -0
- data/lib/talon_one/models/loyalty_tier.rb +24 -4
- data/lib/talon_one/models/management_key.rb +0 -1
- data/lib/talon_one/models/message_log_entry.rb +67 -7
- data/lib/talon_one/models/model_return.rb +0 -1
- data/lib/talon_one/models/multiple_audiences_item.rb +0 -1
- data/lib/talon_one/models/multiple_customer_profile_integration_request_item.rb +1 -1
- data/lib/talon_one/models/new_account_sign_up.rb +0 -1
- data/lib/talon_one/models/new_additional_cost.rb +0 -1
- data/lib/talon_one/models/new_application_api_key.rb +0 -1
- data/lib/talon_one/models/new_attribute.rb +0 -1
- data/lib/talon_one/models/new_audience.rb +0 -1
- data/lib/talon_one/models/new_base_notification.rb +0 -1
- data/lib/talon_one/models/new_campaign.rb +0 -1
- data/lib/talon_one/models/new_campaign_collection.rb +0 -1
- data/lib/talon_one/models/new_campaign_set.rb +0 -1
- data/lib/talon_one/models/new_campaign_store_budget.rb +283 -0
- data/lib/talon_one/models/new_campaign_store_budget_store_limit.rb +227 -0
- data/lib/talon_one/models/new_campaign_template.rb +10 -1
- data/lib/talon_one/models/new_catalog.rb +0 -1
- data/lib/talon_one/models/new_collection.rb +0 -1
- data/lib/talon_one/models/new_coupon_creation_job.rb +0 -1
- data/lib/talon_one/models/new_coupons.rb +0 -1
- data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +0 -1
- data/lib/talon_one/models/new_custom_effect.rb +0 -1
- data/lib/talon_one/models/new_customer_session.rb +0 -1
- data/lib/talon_one/models/new_customer_session_v2.rb +3 -3
- data/lib/talon_one/models/new_event.rb +0 -1
- data/lib/talon_one/models/new_event_type.rb +0 -1
- data/lib/talon_one/models/new_loyalty_program.rb +24 -2
- data/lib/talon_one/models/new_loyalty_tier.rb +2 -2
- data/lib/talon_one/models/new_management_key.rb +0 -1
- data/lib/talon_one/models/new_multiple_audiences_item.rb +0 -1
- data/lib/talon_one/models/new_referral.rb +0 -1
- data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +0 -1
- data/lib/talon_one/models/new_role.rb +0 -1
- data/lib/talon_one/models/new_role_v2.rb +0 -1
- data/lib/talon_one/models/new_saml_connection.rb +1 -1
- data/lib/talon_one/models/new_store.rb +0 -1
- data/lib/talon_one/models/new_user.rb +0 -1
- data/lib/talon_one/models/new_webhook.rb +1 -2
- data/lib/talon_one/models/outgoing_integration_template_with_configuration_details.rb +0 -1
- data/lib/talon_one/models/picklist.rb +0 -1
- data/lib/talon_one/models/product.rb +1 -1
- data/lib/talon_one/models/product_search_match.rb +237 -0
- data/lib/talon_one/models/product_sku_unit_analytics.rb +256 -0
- data/lib/talon_one/models/product_unit_analytics.rb +271 -0
- data/lib/talon_one/models/referral.rb +0 -1
- data/lib/talon_one/models/revision.rb +0 -1
- data/lib/talon_one/models/revision_version.rb +0 -1
- data/lib/talon_one/models/role.rb +0 -1
- data/lib/talon_one/models/role_assign.rb +0 -1
- data/lib/talon_one/models/role_v2.rb +0 -1
- data/lib/talon_one/models/rollback_added_loyalty_points_effect_props.rb +11 -0
- data/lib/talon_one/models/rollback_deducted_loyalty_points_effect_props.rb +11 -0
- data/lib/talon_one/models/ruleset.rb +0 -1
- data/lib/talon_one/models/saml_connection.rb +1 -1
- data/lib/talon_one/models/scim_new_user.rb +5 -0
- data/lib/talon_one/models/scim_service_provider_config_response.rb +13 -4
- data/lib/talon_one/models/scim_service_provider_config_response_sort.rb +208 -0
- data/lib/talon_one/models/scim_user.rb +5 -0
- data/lib/talon_one/models/store.rb +1 -2
- data/lib/talon_one/models/strikethrough_debug_response.rb +221 -0
- data/lib/talon_one/models/summary_campaign_store_budget.rb +280 -0
- data/lib/talon_one/models/talang_attribute.rb +0 -1
- data/lib/talon_one/models/template_arg_def.rb +11 -2
- data/lib/talon_one/models/template_def.rb +0 -1
- data/lib/talon_one/models/template_limit_config.rb +0 -1
- data/lib/talon_one/models/transfer_loyalty_card.rb +11 -0
- data/lib/talon_one/models/update_achievement.rb +90 -4
- data/lib/talon_one/models/update_campaign_evaluation_group.rb +0 -1
- data/lib/talon_one/models/update_campaign_group.rb +0 -1
- data/lib/talon_one/models/update_campaign_template.rb +10 -1
- data/lib/talon_one/models/update_coupon.rb +0 -1
- data/lib/talon_one/models/update_coupon_batch.rb +0 -1
- data/lib/talon_one/models/update_loyalty_program.rb +24 -2
- data/lib/talon_one/models/update_loyalty_program_tier.rb +257 -0
- data/lib/talon_one/models/update_picklist.rb +0 -1
- data/lib/talon_one/models/user.rb +0 -1
- data/lib/talon_one/models/value_map.rb +245 -0
- data/lib/talon_one/models/webhook.rb +1 -2
- data/lib/talon_one/models/webhook_log_entry.rb +1 -1
- data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +1 -2
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +15 -4
- data/spec/api/integration_api_spec.rb +5 -5
- data/spec/api/management_api_spec.rb +58 -76
- data/spec/models/achievement_spec.rb +32 -0
- data/spec/models/additional_campaign_properties_spec.rb +1 -1
- data/spec/models/analytics_product_sku_spec.rb +53 -0
- data/spec/models/analytics_product_spec.rb +59 -0
- data/spec/models/application_campaign_analytics_spec.rb +1 -1
- data/spec/models/application_campaign_stats_spec.rb +6 -0
- data/spec/models/base_loyalty_program_spec.rb +10 -0
- data/spec/models/bulk_operation_on_campaigns_spec.rb +7 -1
- data/spec/models/campaign_spec.rb +11 -1
- data/spec/models/campaign_template_coupon_reservation_settings_spec.rb +47 -0
- data/spec/models/campaign_template_spec.rb +6 -0
- data/spec/models/campaign_versions_spec.rb +10 -0
- data/spec/models/create_achievement_spec.rb +32 -0
- data/spec/models/customer_session_v2_spec.rb +6 -0
- data/spec/models/generate_campaign_description_spec.rb +1 -1
- data/spec/models/generate_campaign_tags_spec.rb +1 -1
- data/spec/models/generate_loyalty_card_spec.rb +6 -0
- data/spec/models/inline_response20021_spec.rb +6 -0
- data/spec/models/inline_response20022_spec.rb +2 -2
- data/spec/models/inline_response20024_spec.rb +0 -6
- data/spec/models/inline_response20028_spec.rb +1 -1
- data/spec/models/inline_response20029_spec.rb +6 -0
- data/spec/models/inline_response20030_spec.rb +0 -6
- data/spec/models/inline_response20032_spec.rb +6 -0
- data/spec/models/inline_response20033_spec.rb +0 -6
- data/spec/models/inline_response20034_spec.rb +6 -0
- data/spec/models/inline_response20035_spec.rb +0 -6
- data/spec/models/inline_response20041_spec.rb +6 -0
- data/spec/models/inline_response20042_spec.rb +0 -6
- data/spec/models/inline_response20044_spec.rb +6 -0
- data/spec/models/inline_response20045_spec.rb +0 -6
- data/spec/models/limit_config_spec.rb +1 -1
- data/spec/models/list_campaign_store_budgets_spec.rb +59 -0
- data/spec/models/list_campaign_store_budgets_store_spec.rb +53 -0
- data/spec/models/loyalty_card_batch_spec.rb +6 -0
- data/spec/models/loyalty_card_spec.rb +12 -0
- data/spec/models/loyalty_program_entity_spec.rb +12 -0
- data/spec/models/loyalty_program_spec.rb +10 -0
- data/spec/models/loyalty_tier_spec.rb +12 -0
- data/spec/models/message_log_entry_spec.rb +25 -1
- data/spec/models/new_campaign_store_budget_spec.rb +61 -0
- data/spec/models/new_campaign_store_budget_store_limit_spec.rb +47 -0
- data/spec/models/new_campaign_template_spec.rb +6 -0
- data/spec/models/new_loyalty_program_spec.rb +10 -0
- data/spec/models/product_search_match_spec.rb +53 -0
- data/spec/models/product_sku_unit_analytics_spec.rb +59 -0
- data/spec/models/product_unit_analytics_spec.rb +65 -0
- data/spec/models/scim_service_provider_config_response_sort_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_spec.rb +6 -0
- data/spec/models/strikethrough_debug_response_spec.rb +47 -0
- data/spec/models/summary_campaign_store_budget_spec.rb +61 -0
- data/spec/models/template_arg_def_spec.rb +6 -0
- data/spec/models/template_limit_config_spec.rb +1 -1
- data/spec/models/update_achievement_spec.rb +32 -0
- data/spec/models/update_campaign_template_spec.rb +6 -0
- data/spec/models/update_loyalty_program_spec.rb +10 -0
- data/spec/models/update_loyalty_program_tier_spec.rb +53 -0
- data/spec/models/value_map_spec.rb +59 -0
- metadata +447 -6
@@ -0,0 +1,876 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'json/version'
|
4
|
+
|
5
|
+
module JSON
|
6
|
+
autoload :GenericObject, 'json/generic_object'
|
7
|
+
|
8
|
+
NOT_SET = Object.new.freeze
|
9
|
+
private_constant :NOT_SET
|
10
|
+
|
11
|
+
class << self
|
12
|
+
# :call-seq:
|
13
|
+
# JSON[object] -> new_array or new_string
|
14
|
+
#
|
15
|
+
# If +object+ is a \String,
|
16
|
+
# calls JSON.parse with +object+ and +opts+ (see method #parse):
|
17
|
+
# json = '[0, 1, null]'
|
18
|
+
# JSON[json]# => [0, 1, nil]
|
19
|
+
#
|
20
|
+
# Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate):
|
21
|
+
# ruby = [0, 1, nil]
|
22
|
+
# JSON[ruby] # => '[0,1,null]'
|
23
|
+
def [](object, opts = {})
|
24
|
+
if object.is_a?(String)
|
25
|
+
return JSON.parse(object, opts)
|
26
|
+
elsif object.respond_to?(:to_str)
|
27
|
+
str = object.to_str
|
28
|
+
if str.is_a?(String)
|
29
|
+
return JSON.parse(str, opts)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
JSON.generate(object, opts)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns the JSON parser class that is used by JSON.
|
37
|
+
attr_reader :parser
|
38
|
+
|
39
|
+
# Set the JSON parser class _parser_ to be used by JSON.
|
40
|
+
def parser=(parser) # :nodoc:
|
41
|
+
@parser = parser
|
42
|
+
remove_const :Parser if const_defined?(:Parser, false)
|
43
|
+
const_set :Parser, parser
|
44
|
+
end
|
45
|
+
|
46
|
+
# Return the constant located at _path_. The format of _path_ has to be
|
47
|
+
# either ::A::B::C or A::B::C. In any case, A has to be located at the top
|
48
|
+
# level (absolute namespace path?). If there doesn't exist a constant at
|
49
|
+
# the given path, an ArgumentError is raised.
|
50
|
+
def deep_const_get(path) # :nodoc:
|
51
|
+
Object.const_get(path)
|
52
|
+
rescue NameError => e
|
53
|
+
raise ArgumentError, "can't get const #{path}: #{e}"
|
54
|
+
end
|
55
|
+
|
56
|
+
# Set the module _generator_ to be used by JSON.
|
57
|
+
def generator=(generator) # :nodoc:
|
58
|
+
old, $VERBOSE = $VERBOSE, nil
|
59
|
+
@generator = generator
|
60
|
+
generator_methods = generator::GeneratorMethods
|
61
|
+
for const in generator_methods.constants
|
62
|
+
klass = const_get(const)
|
63
|
+
modul = generator_methods.const_get(const)
|
64
|
+
klass.class_eval do
|
65
|
+
instance_methods(false).each do |m|
|
66
|
+
m.to_s == 'to_json' and remove_method m
|
67
|
+
end
|
68
|
+
include modul
|
69
|
+
end
|
70
|
+
end
|
71
|
+
self.state = generator::State
|
72
|
+
const_set :State, self.state
|
73
|
+
const_set :SAFE_STATE_PROTOTYPE, State.new # for JRuby
|
74
|
+
const_set :FAST_STATE_PROTOTYPE, create_fast_state
|
75
|
+
const_set :PRETTY_STATE_PROTOTYPE, create_pretty_state
|
76
|
+
ensure
|
77
|
+
$VERBOSE = old
|
78
|
+
end
|
79
|
+
|
80
|
+
def create_fast_state
|
81
|
+
State.new(
|
82
|
+
:indent => '',
|
83
|
+
:space => '',
|
84
|
+
:object_nl => "",
|
85
|
+
:array_nl => "",
|
86
|
+
:max_nesting => false
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
def create_pretty_state
|
91
|
+
State.new(
|
92
|
+
:indent => ' ',
|
93
|
+
:space => ' ',
|
94
|
+
:object_nl => "\n",
|
95
|
+
:array_nl => "\n"
|
96
|
+
)
|
97
|
+
end
|
98
|
+
|
99
|
+
# Returns the JSON generator module that is used by JSON.
|
100
|
+
attr_reader :generator
|
101
|
+
|
102
|
+
# Sets or Returns the JSON generator state class that is used by JSON.
|
103
|
+
attr_accessor :state
|
104
|
+
end
|
105
|
+
|
106
|
+
# Sets create identifier, which is used to decide if the _json_create_
|
107
|
+
# hook of a class should be called; initial value is +json_class+:
|
108
|
+
# JSON.create_id # => 'json_class'
|
109
|
+
def self.create_id=(new_value)
|
110
|
+
Thread.current[:"JSON.create_id"] = new_value.dup.freeze
|
111
|
+
end
|
112
|
+
|
113
|
+
# Returns the current create identifier.
|
114
|
+
# See also JSON.create_id=.
|
115
|
+
def self.create_id
|
116
|
+
Thread.current[:"JSON.create_id"] || 'json_class'
|
117
|
+
end
|
118
|
+
|
119
|
+
NaN = 0.0/0
|
120
|
+
|
121
|
+
Infinity = 1.0/0
|
122
|
+
|
123
|
+
MinusInfinity = -Infinity
|
124
|
+
|
125
|
+
# The base exception for JSON errors.
|
126
|
+
class JSONError < StandardError
|
127
|
+
def self.wrap(exception)
|
128
|
+
obj = new("Wrapped(#{exception.class}): #{exception.message.inspect}")
|
129
|
+
obj.set_backtrace exception.backtrace
|
130
|
+
obj
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# This exception is raised if a parser error occurs.
|
135
|
+
class ParserError < JSONError; end
|
136
|
+
|
137
|
+
# This exception is raised if the nesting of parsed data structures is too
|
138
|
+
# deep.
|
139
|
+
class NestingError < ParserError; end
|
140
|
+
|
141
|
+
# :stopdoc:
|
142
|
+
class CircularDatastructure < NestingError; end
|
143
|
+
# :startdoc:
|
144
|
+
|
145
|
+
# This exception is raised if a generator or unparser error occurs.
|
146
|
+
class GeneratorError < JSONError; end
|
147
|
+
# For backwards compatibility
|
148
|
+
UnparserError = GeneratorError # :nodoc:
|
149
|
+
|
150
|
+
# This exception is raised if the required unicode support is missing on the
|
151
|
+
# system. Usually this means that the iconv library is not installed.
|
152
|
+
class MissingUnicodeSupport < JSONError; end
|
153
|
+
|
154
|
+
module_function
|
155
|
+
|
156
|
+
# :call-seq:
|
157
|
+
# JSON.parse(source, opts) -> object
|
158
|
+
#
|
159
|
+
# Returns the Ruby objects created by parsing the given +source+.
|
160
|
+
#
|
161
|
+
# Argument +source+ contains the \String to be parsed.
|
162
|
+
#
|
163
|
+
# Argument +opts+, if given, contains a \Hash of options for the parsing.
|
164
|
+
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
165
|
+
#
|
166
|
+
# ---
|
167
|
+
#
|
168
|
+
# When +source+ is a \JSON array, returns a Ruby \Array:
|
169
|
+
# source = '["foo", 1.0, true, false, null]'
|
170
|
+
# ruby = JSON.parse(source)
|
171
|
+
# ruby # => ["foo", 1.0, true, false, nil]
|
172
|
+
# ruby.class # => Array
|
173
|
+
#
|
174
|
+
# When +source+ is a \JSON object, returns a Ruby \Hash:
|
175
|
+
# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}'
|
176
|
+
# ruby = JSON.parse(source)
|
177
|
+
# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil}
|
178
|
+
# ruby.class # => Hash
|
179
|
+
#
|
180
|
+
# For examples of parsing for all \JSON data types, see
|
181
|
+
# {Parsing \JSON}[#module-JSON-label-Parsing+JSON].
|
182
|
+
#
|
183
|
+
# Parses nested JSON objects:
|
184
|
+
# source = <<~JSON
|
185
|
+
# {
|
186
|
+
# "name": "Dave",
|
187
|
+
# "age" :40,
|
188
|
+
# "hats": [
|
189
|
+
# "Cattleman's",
|
190
|
+
# "Panama",
|
191
|
+
# "Tophat"
|
192
|
+
# ]
|
193
|
+
# }
|
194
|
+
# JSON
|
195
|
+
# ruby = JSON.parse(source)
|
196
|
+
# ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
197
|
+
#
|
198
|
+
# ---
|
199
|
+
#
|
200
|
+
# Raises an exception if +source+ is not valid JSON:
|
201
|
+
# # Raises JSON::ParserError (783: unexpected token at ''):
|
202
|
+
# JSON.parse('')
|
203
|
+
#
|
204
|
+
def parse(source, opts = nil)
|
205
|
+
Parser.parse(source, opts)
|
206
|
+
end
|
207
|
+
|
208
|
+
# :call-seq:
|
209
|
+
# JSON.parse!(source, opts) -> object
|
210
|
+
#
|
211
|
+
# Calls
|
212
|
+
# parse(source, opts)
|
213
|
+
# with +source+ and possibly modified +opts+.
|
214
|
+
#
|
215
|
+
# Differences from JSON.parse:
|
216
|
+
# - Option +max_nesting+, if not provided, defaults to +false+,
|
217
|
+
# which disables checking for nesting depth.
|
218
|
+
# - Option +allow_nan+, if not provided, defaults to +true+.
|
219
|
+
def parse!(source, opts = {})
|
220
|
+
opts = {
|
221
|
+
:max_nesting => false,
|
222
|
+
:allow_nan => true
|
223
|
+
}.merge(opts)
|
224
|
+
Parser.new(source, **(opts||{})).parse
|
225
|
+
end
|
226
|
+
|
227
|
+
# :call-seq:
|
228
|
+
# JSON.load_file(path, opts={}) -> object
|
229
|
+
#
|
230
|
+
# Calls:
|
231
|
+
# parse(File.read(path), opts)
|
232
|
+
#
|
233
|
+
# See method #parse.
|
234
|
+
def load_file(filespec, opts = nil)
|
235
|
+
parse(File.read(filespec, encoding: Encoding::UTF_8), opts)
|
236
|
+
end
|
237
|
+
|
238
|
+
# :call-seq:
|
239
|
+
# JSON.load_file!(path, opts = {})
|
240
|
+
#
|
241
|
+
# Calls:
|
242
|
+
# JSON.parse!(File.read(path, opts))
|
243
|
+
#
|
244
|
+
# See method #parse!
|
245
|
+
def load_file!(filespec, opts = {})
|
246
|
+
parse!(File.read(filespec, encoding: Encoding::UTF_8), opts)
|
247
|
+
end
|
248
|
+
|
249
|
+
# :call-seq:
|
250
|
+
# JSON.generate(obj, opts = nil) -> new_string
|
251
|
+
#
|
252
|
+
# Returns a \String containing the generated \JSON data.
|
253
|
+
#
|
254
|
+
# See also JSON.fast_generate, JSON.pretty_generate.
|
255
|
+
#
|
256
|
+
# Argument +obj+ is the Ruby object to be converted to \JSON.
|
257
|
+
#
|
258
|
+
# Argument +opts+, if given, contains a \Hash of options for the generation.
|
259
|
+
# See {Generating Options}[#module-JSON-label-Generating+Options].
|
260
|
+
#
|
261
|
+
# ---
|
262
|
+
#
|
263
|
+
# When +obj+ is an \Array, returns a \String containing a \JSON array:
|
264
|
+
# obj = ["foo", 1.0, true, false, nil]
|
265
|
+
# json = JSON.generate(obj)
|
266
|
+
# json # => '["foo",1.0,true,false,null]'
|
267
|
+
#
|
268
|
+
# When +obj+ is a \Hash, returns a \String containing a \JSON object:
|
269
|
+
# obj = {foo: 0, bar: 's', baz: :bat}
|
270
|
+
# json = JSON.generate(obj)
|
271
|
+
# json # => '{"foo":0,"bar":"s","baz":"bat"}'
|
272
|
+
#
|
273
|
+
# For examples of generating from other Ruby objects, see
|
274
|
+
# {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects].
|
275
|
+
#
|
276
|
+
# ---
|
277
|
+
#
|
278
|
+
# Raises an exception if any formatting option is not a \String.
|
279
|
+
#
|
280
|
+
# Raises an exception if +obj+ contains circular references:
|
281
|
+
# a = []; b = []; a.push(b); b.push(a)
|
282
|
+
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
283
|
+
# JSON.generate(a)
|
284
|
+
#
|
285
|
+
def generate(obj, opts = nil)
|
286
|
+
if State === opts
|
287
|
+
opts.generate(obj)
|
288
|
+
else
|
289
|
+
State.generate(obj, opts)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
# :stopdoc:
|
294
|
+
# I want to deprecate these later, so I'll first be silent about them, and
|
295
|
+
# later delete them.
|
296
|
+
alias unparse generate
|
297
|
+
module_function :unparse
|
298
|
+
# :startdoc:
|
299
|
+
|
300
|
+
# :call-seq:
|
301
|
+
# JSON.fast_generate(obj, opts) -> new_string
|
302
|
+
#
|
303
|
+
# Arguments +obj+ and +opts+ here are the same as
|
304
|
+
# arguments +obj+ and +opts+ in JSON.generate.
|
305
|
+
#
|
306
|
+
# By default, generates \JSON data without checking
|
307
|
+
# for circular references in +obj+ (option +max_nesting+ set to +false+, disabled).
|
308
|
+
#
|
309
|
+
# Raises an exception if +obj+ contains circular references:
|
310
|
+
# a = []; b = []; a.push(b); b.push(a)
|
311
|
+
# # Raises SystemStackError (stack level too deep):
|
312
|
+
# JSON.fast_generate(a)
|
313
|
+
def fast_generate(obj, opts = nil)
|
314
|
+
if State === opts
|
315
|
+
state = opts
|
316
|
+
else
|
317
|
+
state = JSON.create_fast_state.configure(opts)
|
318
|
+
end
|
319
|
+
state.generate(obj)
|
320
|
+
end
|
321
|
+
|
322
|
+
# :stopdoc:
|
323
|
+
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
324
|
+
alias fast_unparse fast_generate
|
325
|
+
module_function :fast_unparse
|
326
|
+
# :startdoc:
|
327
|
+
|
328
|
+
# :call-seq:
|
329
|
+
# JSON.pretty_generate(obj, opts = nil) -> new_string
|
330
|
+
#
|
331
|
+
# Arguments +obj+ and +opts+ here are the same as
|
332
|
+
# arguments +obj+ and +opts+ in JSON.generate.
|
333
|
+
#
|
334
|
+
# Default options are:
|
335
|
+
# {
|
336
|
+
# indent: ' ', # Two spaces
|
337
|
+
# space: ' ', # One space
|
338
|
+
# array_nl: "\n", # Newline
|
339
|
+
# object_nl: "\n" # Newline
|
340
|
+
# }
|
341
|
+
#
|
342
|
+
# Example:
|
343
|
+
# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}}
|
344
|
+
# json = JSON.pretty_generate(obj)
|
345
|
+
# puts json
|
346
|
+
# Output:
|
347
|
+
# {
|
348
|
+
# "foo": [
|
349
|
+
# "bar",
|
350
|
+
# "baz"
|
351
|
+
# ],
|
352
|
+
# "bat": {
|
353
|
+
# "bam": 0,
|
354
|
+
# "bad": 1
|
355
|
+
# }
|
356
|
+
# }
|
357
|
+
#
|
358
|
+
def pretty_generate(obj, opts = nil)
|
359
|
+
if State === opts
|
360
|
+
state, opts = opts, nil
|
361
|
+
else
|
362
|
+
state = JSON.create_pretty_state
|
363
|
+
end
|
364
|
+
if opts
|
365
|
+
if opts.respond_to? :to_hash
|
366
|
+
opts = opts.to_hash
|
367
|
+
elsif opts.respond_to? :to_h
|
368
|
+
opts = opts.to_h
|
369
|
+
else
|
370
|
+
raise TypeError, "can't convert #{opts.class} into Hash"
|
371
|
+
end
|
372
|
+
state.configure(opts)
|
373
|
+
end
|
374
|
+
state.generate(obj)
|
375
|
+
end
|
376
|
+
|
377
|
+
# :stopdoc:
|
378
|
+
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
379
|
+
alias pretty_unparse pretty_generate
|
380
|
+
module_function :pretty_unparse
|
381
|
+
# :startdoc:
|
382
|
+
|
383
|
+
class << self
|
384
|
+
# Sets or returns default options for the JSON.unsafe_load method.
|
385
|
+
# Initially:
|
386
|
+
# opts = JSON.load_default_options
|
387
|
+
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
388
|
+
attr_accessor :unsafe_load_default_options
|
389
|
+
end
|
390
|
+
self.unsafe_load_default_options = {
|
391
|
+
:max_nesting => false,
|
392
|
+
:allow_nan => true,
|
393
|
+
:allow_blank => true,
|
394
|
+
:create_additions => true,
|
395
|
+
}
|
396
|
+
|
397
|
+
class << self
|
398
|
+
# Sets or returns default options for the JSON.load method.
|
399
|
+
# Initially:
|
400
|
+
# opts = JSON.load_default_options
|
401
|
+
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
402
|
+
attr_accessor :load_default_options
|
403
|
+
end
|
404
|
+
self.load_default_options = {
|
405
|
+
:allow_nan => true,
|
406
|
+
:allow_blank => true,
|
407
|
+
:create_additions => nil,
|
408
|
+
}
|
409
|
+
# :call-seq:
|
410
|
+
# JSON.unsafe_load(source, proc = nil, options = {}) -> object
|
411
|
+
#
|
412
|
+
# Returns the Ruby objects created by parsing the given +source+.
|
413
|
+
#
|
414
|
+
# - Argument +source+ must be, or be convertible to, a \String:
|
415
|
+
# - If +source+ responds to instance method +to_str+,
|
416
|
+
# <tt>source.to_str</tt> becomes the source.
|
417
|
+
# - If +source+ responds to instance method +to_io+,
|
418
|
+
# <tt>source.to_io.read</tt> becomes the source.
|
419
|
+
# - If +source+ responds to instance method +read+,
|
420
|
+
# <tt>source.read</tt> becomes the source.
|
421
|
+
# - If both of the following are true, source becomes the \String <tt>'null'</tt>:
|
422
|
+
# - Option +allow_blank+ specifies a truthy value.
|
423
|
+
# - The source, as defined above, is +nil+ or the empty \String <tt>''</tt>.
|
424
|
+
# - Otherwise, +source+ remains the source.
|
425
|
+
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
426
|
+
# It will be called recursively with each result (depth-first order).
|
427
|
+
# See details below.
|
428
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
429
|
+
# like from your own database server or clients under your control, it could
|
430
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
431
|
+
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
432
|
+
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
433
|
+
# The default options can be changed via method JSON.unsafe_load_default_options=.
|
434
|
+
#
|
435
|
+
# ---
|
436
|
+
#
|
437
|
+
# When no +proc+ is given, modifies +source+ as above and returns the result of
|
438
|
+
# <tt>parse(source, opts)</tt>; see #parse.
|
439
|
+
#
|
440
|
+
# Source for following examples:
|
441
|
+
# source = <<~JSON
|
442
|
+
# {
|
443
|
+
# "name": "Dave",
|
444
|
+
# "age" :40,
|
445
|
+
# "hats": [
|
446
|
+
# "Cattleman's",
|
447
|
+
# "Panama",
|
448
|
+
# "Tophat"
|
449
|
+
# ]
|
450
|
+
# }
|
451
|
+
# JSON
|
452
|
+
#
|
453
|
+
# Load a \String:
|
454
|
+
# ruby = JSON.unsafe_load(source)
|
455
|
+
# ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
456
|
+
#
|
457
|
+
# Load an \IO object:
|
458
|
+
# require 'stringio'
|
459
|
+
# object = JSON.unsafe_load(StringIO.new(source))
|
460
|
+
# object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
461
|
+
#
|
462
|
+
# Load a \File object:
|
463
|
+
# path = 't.json'
|
464
|
+
# File.write(path, source)
|
465
|
+
# File.open(path) do |file|
|
466
|
+
# JSON.unsafe_load(file)
|
467
|
+
# end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
468
|
+
#
|
469
|
+
# ---
|
470
|
+
#
|
471
|
+
# When +proc+ is given:
|
472
|
+
# - Modifies +source+ as above.
|
473
|
+
# - Gets the +result+ from calling <tt>parse(source, opts)</tt>.
|
474
|
+
# - Recursively calls <tt>proc(result)</tt>.
|
475
|
+
# - Returns the final result.
|
476
|
+
#
|
477
|
+
# Example:
|
478
|
+
# require 'json'
|
479
|
+
#
|
480
|
+
# # Some classes for the example.
|
481
|
+
# class Base
|
482
|
+
# def initialize(attributes)
|
483
|
+
# @attributes = attributes
|
484
|
+
# end
|
485
|
+
# end
|
486
|
+
# class User < Base; end
|
487
|
+
# class Account < Base; end
|
488
|
+
# class Admin < Base; end
|
489
|
+
# # The JSON source.
|
490
|
+
# json = <<-EOF
|
491
|
+
# {
|
492
|
+
# "users": [
|
493
|
+
# {"type": "User", "username": "jane", "email": "jane@example.com"},
|
494
|
+
# {"type": "User", "username": "john", "email": "john@example.com"}
|
495
|
+
# ],
|
496
|
+
# "accounts": [
|
497
|
+
# {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
|
498
|
+
# {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
|
499
|
+
# ],
|
500
|
+
# "admins": {"type": "Admin", "password": "0wn3d"}
|
501
|
+
# }
|
502
|
+
# EOF
|
503
|
+
# # Deserializer method.
|
504
|
+
# def deserialize_obj(obj, safe_types = %w(User Account Admin))
|
505
|
+
# type = obj.is_a?(Hash) && obj["type"]
|
506
|
+
# safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
|
507
|
+
# end
|
508
|
+
# # Call to JSON.unsafe_load
|
509
|
+
# ruby = JSON.unsafe_load(json, proc {|obj|
|
510
|
+
# case obj
|
511
|
+
# when Hash
|
512
|
+
# obj.each {|k, v| obj[k] = deserialize_obj v }
|
513
|
+
# when Array
|
514
|
+
# obj.map! {|v| deserialize_obj v }
|
515
|
+
# end
|
516
|
+
# })
|
517
|
+
# pp ruby
|
518
|
+
# Output:
|
519
|
+
# {"users"=>
|
520
|
+
# [#<User:0x00000000064c4c98
|
521
|
+
# @attributes=
|
522
|
+
# {"type"=>"User", "username"=>"jane", "email"=>"jane@example.com"}>,
|
523
|
+
# #<User:0x00000000064c4bd0
|
524
|
+
# @attributes=
|
525
|
+
# {"type"=>"User", "username"=>"john", "email"=>"john@example.com"}>],
|
526
|
+
# "accounts"=>
|
527
|
+
# [{"account"=>
|
528
|
+
# #<Account:0x00000000064c4928
|
529
|
+
# @attributes={"type"=>"Account", "paid"=>true, "account_id"=>"1234"}>},
|
530
|
+
# {"account"=>
|
531
|
+
# #<Account:0x00000000064c4680
|
532
|
+
# @attributes={"type"=>"Account", "paid"=>false, "account_id"=>"1235"}>}],
|
533
|
+
# "admins"=>
|
534
|
+
# #<Admin:0x00000000064c41f8
|
535
|
+
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
536
|
+
#
|
537
|
+
def unsafe_load(source, proc = nil, options = nil)
|
538
|
+
opts = if options.nil?
|
539
|
+
unsafe_load_default_options
|
540
|
+
else
|
541
|
+
unsafe_load_default_options.merge(options)
|
542
|
+
end
|
543
|
+
|
544
|
+
unless source.is_a?(String)
|
545
|
+
if source.respond_to? :to_str
|
546
|
+
source = source.to_str
|
547
|
+
elsif source.respond_to? :to_io
|
548
|
+
source = source.to_io.read
|
549
|
+
elsif source.respond_to?(:read)
|
550
|
+
source = source.read
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
if opts[:allow_blank] && (source.nil? || source.empty?)
|
555
|
+
source = 'null'
|
556
|
+
end
|
557
|
+
result = parse(source, opts)
|
558
|
+
recurse_proc(result, &proc) if proc
|
559
|
+
result
|
560
|
+
end
|
561
|
+
|
562
|
+
# :call-seq:
|
563
|
+
# JSON.load(source, proc = nil, options = {}) -> object
|
564
|
+
#
|
565
|
+
# Returns the Ruby objects created by parsing the given +source+.
|
566
|
+
#
|
567
|
+
# - Argument +source+ must be, or be convertible to, a \String:
|
568
|
+
# - If +source+ responds to instance method +to_str+,
|
569
|
+
# <tt>source.to_str</tt> becomes the source.
|
570
|
+
# - If +source+ responds to instance method +to_io+,
|
571
|
+
# <tt>source.to_io.read</tt> becomes the source.
|
572
|
+
# - If +source+ responds to instance method +read+,
|
573
|
+
# <tt>source.read</tt> becomes the source.
|
574
|
+
# - If both of the following are true, source becomes the \String <tt>'null'</tt>:
|
575
|
+
# - Option +allow_blank+ specifies a truthy value.
|
576
|
+
# - The source, as defined above, is +nil+ or the empty \String <tt>''</tt>.
|
577
|
+
# - Otherwise, +source+ remains the source.
|
578
|
+
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
579
|
+
# It will be called recursively with each result (depth-first order).
|
580
|
+
# See details below.
|
581
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
582
|
+
# like from your own database server or clients under your control, it could
|
583
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
584
|
+
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
585
|
+
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
586
|
+
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
587
|
+
# The default options can be changed via method JSON.load_default_options=.
|
588
|
+
#
|
589
|
+
# ---
|
590
|
+
#
|
591
|
+
# When no +proc+ is given, modifies +source+ as above and returns the result of
|
592
|
+
# <tt>parse(source, opts)</tt>; see #parse.
|
593
|
+
#
|
594
|
+
# Source for following examples:
|
595
|
+
# source = <<~JSON
|
596
|
+
# {
|
597
|
+
# "name": "Dave",
|
598
|
+
# "age" :40,
|
599
|
+
# "hats": [
|
600
|
+
# "Cattleman's",
|
601
|
+
# "Panama",
|
602
|
+
# "Tophat"
|
603
|
+
# ]
|
604
|
+
# }
|
605
|
+
# JSON
|
606
|
+
#
|
607
|
+
# Load a \String:
|
608
|
+
# ruby = JSON.load(source)
|
609
|
+
# ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
610
|
+
#
|
611
|
+
# Load an \IO object:
|
612
|
+
# require 'stringio'
|
613
|
+
# object = JSON.load(StringIO.new(source))
|
614
|
+
# object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
615
|
+
#
|
616
|
+
# Load a \File object:
|
617
|
+
# path = 't.json'
|
618
|
+
# File.write(path, source)
|
619
|
+
# File.open(path) do |file|
|
620
|
+
# JSON.load(file)
|
621
|
+
# end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
|
622
|
+
#
|
623
|
+
# ---
|
624
|
+
#
|
625
|
+
# When +proc+ is given:
|
626
|
+
# - Modifies +source+ as above.
|
627
|
+
# - Gets the +result+ from calling <tt>parse(source, opts)</tt>.
|
628
|
+
# - Recursively calls <tt>proc(result)</tt>.
|
629
|
+
# - Returns the final result.
|
630
|
+
#
|
631
|
+
# Example:
|
632
|
+
# require 'json'
|
633
|
+
#
|
634
|
+
# # Some classes for the example.
|
635
|
+
# class Base
|
636
|
+
# def initialize(attributes)
|
637
|
+
# @attributes = attributes
|
638
|
+
# end
|
639
|
+
# end
|
640
|
+
# class User < Base; end
|
641
|
+
# class Account < Base; end
|
642
|
+
# class Admin < Base; end
|
643
|
+
# # The JSON source.
|
644
|
+
# json = <<-EOF
|
645
|
+
# {
|
646
|
+
# "users": [
|
647
|
+
# {"type": "User", "username": "jane", "email": "jane@example.com"},
|
648
|
+
# {"type": "User", "username": "john", "email": "john@example.com"}
|
649
|
+
# ],
|
650
|
+
# "accounts": [
|
651
|
+
# {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
|
652
|
+
# {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
|
653
|
+
# ],
|
654
|
+
# "admins": {"type": "Admin", "password": "0wn3d"}
|
655
|
+
# }
|
656
|
+
# EOF
|
657
|
+
# # Deserializer method.
|
658
|
+
# def deserialize_obj(obj, safe_types = %w(User Account Admin))
|
659
|
+
# type = obj.is_a?(Hash) && obj["type"]
|
660
|
+
# safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
|
661
|
+
# end
|
662
|
+
# # Call to JSON.load
|
663
|
+
# ruby = JSON.load(json, proc {|obj|
|
664
|
+
# case obj
|
665
|
+
# when Hash
|
666
|
+
# obj.each {|k, v| obj[k] = deserialize_obj v }
|
667
|
+
# when Array
|
668
|
+
# obj.map! {|v| deserialize_obj v }
|
669
|
+
# end
|
670
|
+
# })
|
671
|
+
# pp ruby
|
672
|
+
# Output:
|
673
|
+
# {"users"=>
|
674
|
+
# [#<User:0x00000000064c4c98
|
675
|
+
# @attributes=
|
676
|
+
# {"type"=>"User", "username"=>"jane", "email"=>"jane@example.com"}>,
|
677
|
+
# #<User:0x00000000064c4bd0
|
678
|
+
# @attributes=
|
679
|
+
# {"type"=>"User", "username"=>"john", "email"=>"john@example.com"}>],
|
680
|
+
# "accounts"=>
|
681
|
+
# [{"account"=>
|
682
|
+
# #<Account:0x00000000064c4928
|
683
|
+
# @attributes={"type"=>"Account", "paid"=>true, "account_id"=>"1234"}>},
|
684
|
+
# {"account"=>
|
685
|
+
# #<Account:0x00000000064c4680
|
686
|
+
# @attributes={"type"=>"Account", "paid"=>false, "account_id"=>"1235"}>}],
|
687
|
+
# "admins"=>
|
688
|
+
# #<Admin:0x00000000064c41f8
|
689
|
+
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
690
|
+
#
|
691
|
+
def load(source, proc = nil, options = nil)
|
692
|
+
opts = if options.nil?
|
693
|
+
load_default_options
|
694
|
+
else
|
695
|
+
load_default_options.merge(options)
|
696
|
+
end
|
697
|
+
|
698
|
+
unless source.is_a?(String)
|
699
|
+
if source.respond_to? :to_str
|
700
|
+
source = source.to_str
|
701
|
+
elsif source.respond_to? :to_io
|
702
|
+
source = source.to_io.read
|
703
|
+
elsif source.respond_to?(:read)
|
704
|
+
source = source.read
|
705
|
+
end
|
706
|
+
end
|
707
|
+
|
708
|
+
if opts[:allow_blank] && (source.nil? || source.empty?)
|
709
|
+
source = 'null'
|
710
|
+
end
|
711
|
+
result = parse(source, opts)
|
712
|
+
recurse_proc(result, &proc) if proc
|
713
|
+
result
|
714
|
+
end
|
715
|
+
|
716
|
+
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
717
|
+
def recurse_proc(result, &proc) # :nodoc:
|
718
|
+
case result
|
719
|
+
when Array
|
720
|
+
result.each { |x| recurse_proc x, &proc }
|
721
|
+
proc.call result
|
722
|
+
when Hash
|
723
|
+
result.each { |x, y| recurse_proc x, &proc; recurse_proc y, &proc }
|
724
|
+
proc.call result
|
725
|
+
else
|
726
|
+
proc.call result
|
727
|
+
end
|
728
|
+
end
|
729
|
+
|
730
|
+
alias restore load
|
731
|
+
module_function :restore
|
732
|
+
|
733
|
+
class << self
|
734
|
+
# Sets or returns the default options for the JSON.dump method.
|
735
|
+
# Initially:
|
736
|
+
# opts = JSON.dump_default_options
|
737
|
+
# opts # => {:max_nesting=>false, :allow_nan=>true}
|
738
|
+
attr_accessor :dump_default_options
|
739
|
+
end
|
740
|
+
self.dump_default_options = {
|
741
|
+
:max_nesting => false,
|
742
|
+
:allow_nan => true,
|
743
|
+
}
|
744
|
+
|
745
|
+
# :call-seq:
|
746
|
+
# JSON.dump(obj, io = nil, limit = nil)
|
747
|
+
#
|
748
|
+
# Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result.
|
749
|
+
#
|
750
|
+
# The default options can be changed via method JSON.dump_default_options.
|
751
|
+
#
|
752
|
+
# - Argument +io+, if given, should respond to method +write+;
|
753
|
+
# the \JSON \String is written to +io+, and +io+ is returned.
|
754
|
+
# If +io+ is not given, the \JSON \String is returned.
|
755
|
+
# - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+.
|
756
|
+
#
|
757
|
+
# ---
|
758
|
+
#
|
759
|
+
# When argument +io+ is not given, returns the \JSON \String generated from +obj+:
|
760
|
+
# obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad}
|
761
|
+
# json = JSON.dump(obj)
|
762
|
+
# json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}"
|
763
|
+
#
|
764
|
+
# When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+:
|
765
|
+
# path = 't.json'
|
766
|
+
# File.open(path, 'w') do |file|
|
767
|
+
# JSON.dump(obj, file)
|
768
|
+
# end # => #<File:t.json (closed)>
|
769
|
+
# puts File.read(path)
|
770
|
+
# Output:
|
771
|
+
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
772
|
+
def dump(obj, anIO = nil, limit = nil, kwargs = nil)
|
773
|
+
if kwargs.nil?
|
774
|
+
if limit.nil?
|
775
|
+
if anIO.is_a?(Hash)
|
776
|
+
kwargs = anIO
|
777
|
+
anIO = nil
|
778
|
+
end
|
779
|
+
elsif limit.is_a?(Hash)
|
780
|
+
kwargs = limit
|
781
|
+
limit = nil
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
unless anIO.nil?
|
786
|
+
if anIO.respond_to?(:to_io)
|
787
|
+
anIO = anIO.to_io
|
788
|
+
elsif limit.nil? && !anIO.respond_to?(:write)
|
789
|
+
anIO, limit = nil, anIO
|
790
|
+
end
|
791
|
+
end
|
792
|
+
|
793
|
+
opts = JSON.dump_default_options
|
794
|
+
opts = opts.merge(:max_nesting => limit) if limit
|
795
|
+
opts = merge_dump_options(opts, **kwargs) if kwargs
|
796
|
+
|
797
|
+
result = begin
|
798
|
+
generate(obj, opts)
|
799
|
+
rescue JSON::NestingError
|
800
|
+
raise ArgumentError, "exceed depth limit"
|
801
|
+
end
|
802
|
+
|
803
|
+
if anIO.nil?
|
804
|
+
result
|
805
|
+
else
|
806
|
+
anIO.write result
|
807
|
+
anIO
|
808
|
+
end
|
809
|
+
end
|
810
|
+
|
811
|
+
# Encodes string using String.encode.
|
812
|
+
def self.iconv(to, from, string)
|
813
|
+
string.encode(to, from)
|
814
|
+
end
|
815
|
+
|
816
|
+
def merge_dump_options(opts, strict: NOT_SET)
|
817
|
+
opts = opts.merge(strict: strict) if NOT_SET != strict
|
818
|
+
opts
|
819
|
+
end
|
820
|
+
|
821
|
+
class << self
|
822
|
+
private :merge_dump_options
|
823
|
+
end
|
824
|
+
end
|
825
|
+
|
826
|
+
module ::Kernel
|
827
|
+
private
|
828
|
+
|
829
|
+
# Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
|
830
|
+
# one line.
|
831
|
+
def j(*objs)
|
832
|
+
objs.each do |obj|
|
833
|
+
puts JSON::generate(obj, :allow_nan => true, :max_nesting => false)
|
834
|
+
end
|
835
|
+
nil
|
836
|
+
end
|
837
|
+
|
838
|
+
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
|
839
|
+
# indentation and over many lines.
|
840
|
+
def jj(*objs)
|
841
|
+
objs.each do |obj|
|
842
|
+
puts JSON::pretty_generate(obj, :allow_nan => true, :max_nesting => false)
|
843
|
+
end
|
844
|
+
nil
|
845
|
+
end
|
846
|
+
|
847
|
+
# If _object_ is string-like, parse the string and return the parsed result as
|
848
|
+
# a Ruby data structure. Otherwise, generate a JSON text from the Ruby data
|
849
|
+
# structure object and return it.
|
850
|
+
#
|
851
|
+
# The _opts_ argument is passed through to generate/parse respectively. See
|
852
|
+
# generate and parse for their documentation.
|
853
|
+
def JSON(object, *args)
|
854
|
+
if object.is_a?(String)
|
855
|
+
return JSON.parse(object, args.first)
|
856
|
+
elsif object.respond_to?(:to_str)
|
857
|
+
str = object.to_str
|
858
|
+
if str.is_a?(String)
|
859
|
+
return JSON.parse(object.to_str, args.first)
|
860
|
+
end
|
861
|
+
end
|
862
|
+
|
863
|
+
JSON.generate(object, args.first)
|
864
|
+
end
|
865
|
+
end
|
866
|
+
|
867
|
+
# Extends any Class to include _json_creatable?_ method.
|
868
|
+
class ::Class
|
869
|
+
# Returns true if this class can be used to create an instance
|
870
|
+
# from a serialised JSON string. The class has to implement a class
|
871
|
+
# method _json_create_ that expects a hash as first parameter. The hash
|
872
|
+
# should include the required data.
|
873
|
+
def json_creatable?
|
874
|
+
respond_to?(:json_create)
|
875
|
+
end
|
876
|
+
end
|