pingram 1.0.24 → 1.0.25
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/Gemfile.lock +2 -2
- data/lib/pingram/api/email_api.rb +5 -5
- data/lib/pingram/api/registrations_api.rb +209 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +10 -0
- data/lib/pingram/models/account_get_response.rb +26 -4
- data/lib/pingram/models/billing_post_response_body.rb +23 -1
- data/lib/pingram/models/logs_get_response_logs_inner.rb +10 -10
- data/lib/pingram/models/ten_dlc_brand_admin_update_request.rb +378 -0
- data/lib/pingram/models/ten_dlc_brand_create_request.rb +41 -10
- data/lib/pingram/models/ten_dlc_brand_registration_details.rb +1 -0
- data/lib/pingram/models/ten_dlc_brand_update_request.rb +24 -38
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +2 -1
- data/vendor/bundle/ruby/3.2.0/cache/psych-5.5.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem_make.out +10 -10
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/README.md +53 -0
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/extconf.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych/psych.c +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych.h +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.c +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.c +79 -18
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/class_loader.rb +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/parser.rb +40 -1
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/scalar_scanner.rb +15 -3
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/versions.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/to_ruby.rb +20 -9
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/yaml_tree.rb +0 -3
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.4.0.gemspec → psych-5.5.0.gemspec} +2 -2
- metadata +64 -63
- data/lib/pingram/models/delete_email_suppressions_response.rb +0 -192
- data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/ext/psych/psych.c +0 -36
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/lib/psych.so +0 -0
- /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem.build_complete +0 -0
- /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/mkmf.log +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/CONTRIBUTING.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/Makefile +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/depend +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/coder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/core_ext.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/exception.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handler.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/document_stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/recorder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/ruby_events.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/tree_builder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/yaml_events.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/alias.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/document.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/mapping.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/node.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/scalar.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/sequence.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/omap.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/set.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/streaming.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/syntax_error.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/tree_builder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/depth_first.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/emitter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/json_tree.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/visitor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/y.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych.rb +0 -0
|
@@ -6,10 +6,10 @@ checking for altzone in time.h with -Werror... no
|
|
|
6
6
|
creating Makefile
|
|
7
7
|
|
|
8
8
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
9
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
9
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-of1ye5 sitelibdir\=./.gem.20260825-2473-of1ye5 clean
|
|
10
10
|
|
|
11
11
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
12
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
12
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-of1ye5 sitelibdir\=./.gem.20260825-2473-of1ye5
|
|
13
13
|
compiling date_core.c
|
|
14
14
|
compiling date_parse.c
|
|
15
15
|
compiling date_strftime.c
|
|
@@ -17,8 +17,8 @@ compiling date_strptime.c
|
|
|
17
17
|
linking shared-object date_core.so
|
|
18
18
|
|
|
19
19
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
20
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
21
|
-
/usr/bin/install -c -m 0755 date_core.so ./.gem.
|
|
20
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-of1ye5 sitelibdir\=./.gem.20260825-2473-of1ye5 install
|
|
21
|
+
/usr/bin/install -c -m 0755 date_core.so ./.gem.20260825-2473-of1ye5
|
|
22
22
|
|
|
23
23
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
24
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
24
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-of1ye5 sitelibdir\=./.gem.20260825-2473-of1ye5 clean
|
|
@@ -17,16 +17,16 @@ checking for rb_prepend_module()... yes
|
|
|
17
17
|
creating Makefile
|
|
18
18
|
|
|
19
19
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console
|
|
20
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
20
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-907j85 sitelibdir\=./.gem.20260825-2473-907j85 clean
|
|
21
21
|
|
|
22
22
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console
|
|
23
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
23
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-907j85 sitelibdir\=./.gem.20260825-2473-907j85
|
|
24
24
|
compiling console.c
|
|
25
25
|
linking shared-object io/console.so
|
|
26
26
|
|
|
27
27
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console
|
|
28
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
29
|
-
/usr/bin/install -c -m 0755 console.so ./.gem.
|
|
28
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-907j85 sitelibdir\=./.gem.20260825-2473-907j85 install
|
|
29
|
+
/usr/bin/install -c -m 0755 console.so ./.gem.20260825-2473-907j85/io
|
|
30
30
|
|
|
31
31
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console
|
|
32
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
32
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-907j85 sitelibdir\=./.gem.20260825-2473-907j85 clean
|
|
@@ -143,7 +143,7 @@ checked program was:
|
|
|
143
143
|
/* end */
|
|
144
144
|
|
|
145
145
|
LD_LIBRARY_PATH=.:/opt/hostedtoolcache/Ruby/3.2.11/x64/lib "gcc -o conftest -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/x86_64-linux -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/ruby/backward -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0 -I. -DENABLE_PATH_CHECK=0 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -Wl,-rpath,/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -L/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -lruby -lm -lpthread -lc"
|
|
146
|
-
/usr/bin/ld: /tmp/
|
|
146
|
+
/usr/bin/ld: /tmp/ccRYil6r.o: in function `t':
|
|
147
147
|
/home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console/conftest.c:17:(.text+0xb): undefined reference to `rb_io_path'
|
|
148
148
|
collect2: error: ld returned 1 exit status
|
|
149
149
|
checked program was:
|
|
@@ -203,7 +203,7 @@ checked program was:
|
|
|
203
203
|
/* end */
|
|
204
204
|
|
|
205
205
|
LD_LIBRARY_PATH=.:/opt/hostedtoolcache/Ruby/3.2.11/x64/lib "gcc -o conftest -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/x86_64-linux -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/ruby/backward -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0 -I. -DENABLE_PATH_CHECK=0 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -Wl,-rpath,/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -L/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -lruby -lm -lpthread -lc"
|
|
206
|
-
/usr/bin/ld: /tmp/
|
|
206
|
+
/usr/bin/ld: /tmp/ccx87Ki8.o: in function `t':
|
|
207
207
|
/home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console/conftest.c:17:(.text+0xb): undefined reference to `rb_io_closed_p'
|
|
208
208
|
collect2: error: ld returned 1 exit status
|
|
209
209
|
checked program was:
|
|
@@ -263,7 +263,7 @@ checked program was:
|
|
|
263
263
|
/* end */
|
|
264
264
|
|
|
265
265
|
LD_LIBRARY_PATH=.:/opt/hostedtoolcache/Ruby/3.2.11/x64/lib "gcc -o conftest -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/x86_64-linux -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/ruby/backward -I/opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0 -I. -DENABLE_PATH_CHECK=0 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -Wl,-rpath,/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -L/opt/hostedtoolcache/Ruby/3.2.11/x64/lib -lruby -lm -lpthread -lc"
|
|
266
|
-
/usr/bin/ld: /tmp/
|
|
266
|
+
/usr/bin/ld: /tmp/ccIad0LP.o: in function `t':
|
|
267
267
|
/home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/ext/io/console/conftest.c:17:(.text+0xb): undefined reference to `rb_io_open_descriptor'
|
|
268
268
|
collect2: error: ld returned 1 exit status
|
|
269
269
|
checked program was:
|
|
@@ -3,10 +3,10 @@ current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/v
|
|
|
3
3
|
creating Makefile
|
|
4
4
|
|
|
5
5
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
|
|
6
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
6
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-vtxg1y sitelibdir\=./.gem.20260825-2473-vtxg1y clean
|
|
7
7
|
|
|
8
8
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
|
|
9
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
9
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-vtxg1y sitelibdir\=./.gem.20260825-2473-vtxg1y
|
|
10
10
|
compiling adj_matrix.c
|
|
11
11
|
adj_matrix.c: In function ‘adj_matrix_default’:
|
|
12
12
|
adj_matrix.c:82:12: warning: old-style function definition [-Wold-style-definition]
|
|
@@ -22,8 +22,8 @@ compiling jaro_winkler.c
|
|
|
22
22
|
linking shared-object jaro_winkler/jaro_winkler_ext.so
|
|
23
23
|
|
|
24
24
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
|
|
25
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
26
|
-
/usr/bin/install -c -m 0755 jaro_winkler_ext.so ./.gem.
|
|
25
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-vtxg1y sitelibdir\=./.gem.20260825-2473-vtxg1y install
|
|
26
|
+
/usr/bin/install -c -m 0755 jaro_winkler_ext.so ./.gem.20260825-2473-vtxg1y/jaro_winkler
|
|
27
27
|
|
|
28
28
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler
|
|
29
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
29
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-vtxg1y sitelibdir\=./.gem.20260825-2473-vtxg1y clean
|
data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem_make.out
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.
|
|
1
|
+
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
|
|
2
2
|
/opt/hostedtoolcache/Ruby/3.2.11/x64/bin/ruby extconf.rb
|
|
3
3
|
creating Makefile
|
|
4
4
|
|
|
5
|
-
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.
|
|
6
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
5
|
+
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
|
|
6
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-dfceur sitelibdir\=./.gem.20260825-2473-dfceur clean
|
|
7
7
|
cd libyaml && make clean
|
|
8
8
|
/bin/sh: 1: cd: can't cd to libyaml
|
|
9
9
|
make: [Makefile:283: clean-so] Error 2 (ignored)
|
|
10
10
|
|
|
11
|
-
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.
|
|
12
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
11
|
+
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
|
|
12
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-dfceur sitelibdir\=./.gem.20260825-2473-dfceur
|
|
13
13
|
compiling psych.c
|
|
14
14
|
compiling psych_emitter.c
|
|
15
15
|
compiling psych_parser.c
|
|
@@ -17,12 +17,12 @@ compiling psych_to_ruby.c
|
|
|
17
17
|
compiling psych_yaml_tree.c
|
|
18
18
|
linking shared-object psych.so
|
|
19
19
|
|
|
20
|
-
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.
|
|
21
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
22
|
-
/usr/bin/install -c -m 0755 psych.so ./.gem.
|
|
20
|
+
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
|
|
21
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-dfceur sitelibdir\=./.gem.20260825-2473-dfceur install
|
|
22
|
+
/usr/bin/install -c -m 0755 psych.so ./.gem.20260825-2473-dfceur
|
|
23
23
|
|
|
24
|
-
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.
|
|
25
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
24
|
+
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
|
|
25
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-dfceur sitelibdir\=./.gem.20260825-2473-dfceur clean
|
|
26
26
|
cd libyaml && make clean
|
|
27
27
|
/bin/sh: 1: cd: can't cd to libyaml
|
|
28
28
|
make: [Makefile:283: clean-so] Error 2 (ignored)
|
|
@@ -3,16 +3,16 @@ current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/v
|
|
|
3
3
|
creating Makefile
|
|
4
4
|
|
|
5
5
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse
|
|
6
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
6
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-w8fa8z sitelibdir\=./.gem.20260825-2473-w8fa8z clean
|
|
7
7
|
|
|
8
8
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse
|
|
9
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
9
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-w8fa8z sitelibdir\=./.gem.20260825-2473-w8fa8z
|
|
10
10
|
compiling cparse.c
|
|
11
11
|
linking shared-object racc/cparse.so
|
|
12
12
|
|
|
13
13
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse
|
|
14
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
15
|
-
/usr/bin/install -c -m 0755 cparse.so ./.gem.
|
|
14
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-w8fa8z sitelibdir\=./.gem.20260825-2473-w8fa8z install
|
|
15
|
+
/usr/bin/install -c -m 0755 cparse.so ./.gem.20260825-2473-w8fa8z/racc
|
|
16
16
|
|
|
17
17
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse
|
|
18
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
18
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-w8fa8z sitelibdir\=./.gem.20260825-2473-w8fa8z clean
|
|
@@ -4,16 +4,16 @@ checking for rb_io_mode_t in ruby/io.h... no
|
|
|
4
4
|
creating Makefile
|
|
5
5
|
|
|
6
6
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio
|
|
7
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
7
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-e9ajgf sitelibdir\=./.gem.20260825-2473-e9ajgf clean
|
|
8
8
|
|
|
9
9
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio
|
|
10
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
10
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-e9ajgf sitelibdir\=./.gem.20260825-2473-e9ajgf
|
|
11
11
|
compiling stringio.c
|
|
12
12
|
linking shared-object stringio.so
|
|
13
13
|
|
|
14
14
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio
|
|
15
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
16
|
-
/usr/bin/install -c -m 0755 stringio.so ./.gem.
|
|
15
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-e9ajgf sitelibdir\=./.gem.20260825-2473-e9ajgf install
|
|
16
|
+
/usr/bin/install -c -m 0755 stringio.so ./.gem.20260825-2473-e9ajgf
|
|
17
17
|
|
|
18
18
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio
|
|
19
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
19
|
+
make DESTDIR\= sitearchdir\=./.gem.20260825-2473-e9ajgf sitelibdir\=./.gem.20260825-2473-e9ajgf clean
|
|
@@ -23,6 +23,7 @@ Psych.dump("foo") # => "--- foo\n...\n"
|
|
|
23
23
|
## Dependencies
|
|
24
24
|
|
|
25
25
|
* libyaml
|
|
26
|
+
* libfyaml (optional, only for the experimental `--enable-libfyaml` backend)
|
|
26
27
|
|
|
27
28
|
## Installation
|
|
28
29
|
|
|
@@ -57,6 +58,58 @@ gem 'psych'
|
|
|
57
58
|
|
|
58
59
|
JRuby ships with a pure Java implementation of Psych.
|
|
59
60
|
|
|
61
|
+
## Experimental libfyaml backend
|
|
62
|
+
|
|
63
|
+
Psych ships an experimental, opt-in backend built on
|
|
64
|
+
[libfyaml](https://github.com/pantoniou/libfyaml), a fully YAML 1.2 compliant
|
|
65
|
+
parser and emitter. It is compiled only when you explicitly pass
|
|
66
|
+
`--enable-libfyaml` at build time. Without the flag the default libyaml
|
|
67
|
+
backend is used and nothing changes.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# libfyaml and pkg-config must be installed first, for example:
|
|
71
|
+
# apt-get install libfyaml-dev # Debian/Ubuntu
|
|
72
|
+
# brew install libfyaml # macOS
|
|
73
|
+
gem install psych -- --enable-libfyaml
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This backend is not supported on Windows.
|
|
77
|
+
|
|
78
|
+
Because libfyaml follows YAML 1.2, the YAML 1.1 booleans `yes`, `no`, `on`, and
|
|
79
|
+
`off` load as plain strings instead of `true`/`false` (only `true`/`false` are
|
|
80
|
+
booleans). This resolves the so-called "Norway problem", where the country
|
|
81
|
+
code `no` was parsed as `false`:
|
|
82
|
+
|
|
83
|
+
```ruby
|
|
84
|
+
Psych.load("country: no") # => {"country" => "no"}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
You can check which backend is active:
|
|
88
|
+
|
|
89
|
+
```ruby
|
|
90
|
+
Psych::BACKEND # => "libfyaml" (or "libyaml")
|
|
91
|
+
Psych.libfyaml_version # => "0.9.6"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The backend is experimental. Its output is valid YAML but is formatted
|
|
95
|
+
differently from libyaml in places, and a few emitter edge cases are not yet
|
|
96
|
+
matched. The default libyaml backend remains the supported choice.
|
|
97
|
+
|
|
98
|
+
Two more differences are worth knowing. Scalars emitted with the default
|
|
99
|
+
(`ANY`) style may be quoted or laid out differently from libyaml, so
|
|
100
|
+
byte-for-byte output is not guaranteed to match. On a parse error,
|
|
101
|
+
`Psych::SyntaxError#problem` carries libfyaml's full diagnostic message and
|
|
102
|
+
`Psych::SyntaxError#context` is always `nil`, whereas libyaml splits the
|
|
103
|
+
description across `#problem` and `#context`.
|
|
104
|
+
|
|
105
|
+
This backend targets YAML 1.2 compliance, not speed. In a rough
|
|
106
|
+
single-machine benchmark that loads and dumps in-memory documents, parsing
|
|
107
|
+
was roughly on par with libyaml (sometimes faster on string-heavy input),
|
|
108
|
+
while emitting was about 1.7x to 1.9x slower. Your numbers will vary, but the
|
|
109
|
+
shape holds: libfyaml is competitive at parsing and slower at emitting. Use
|
|
110
|
+
this backend when you need YAML 1.2 semantics. If throughput is your priority,
|
|
111
|
+
keep using the default libyaml backend.
|
|
112
|
+
|
|
60
113
|
## Release
|
|
61
114
|
|
|
62
115
|
We used the trusted publisher and [rubygems/release-gem](https://github.com/rubygems/release-gem) workflow.
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
require 'mkmf'
|
|
4
4
|
|
|
5
|
+
# Experimental, opt-in libfyaml backend. Only used when psych is built with
|
|
6
|
+
# --enable-libfyaml. Without the flag nothing below changes and the default
|
|
7
|
+
# libyaml backend is built exactly as before.
|
|
8
|
+
if enable_config("libfyaml", false)
|
|
9
|
+
if $mswin or $mingw or $cygwin
|
|
10
|
+
abort "The libfyaml backend (--enable-libfyaml) is not supported on Windows"
|
|
11
|
+
end
|
|
12
|
+
unless pkg_config('libfyaml')
|
|
13
|
+
abort "libfyaml was requested with --enable-libfyaml but was not found via pkg-config"
|
|
14
|
+
end
|
|
15
|
+
# libfyaml 0.8 and earlier crash psych's emitter, so require a known-good
|
|
16
|
+
# version rather than building something that segfaults at runtime.
|
|
17
|
+
pkgconfig = ENV["PKG_CONFIG"] || "pkg-config"
|
|
18
|
+
unless system(pkgconfig, "--atleast-version=0.9", "libfyaml")
|
|
19
|
+
abort "The libfyaml backend requires libfyaml 0.9 or newer"
|
|
20
|
+
end
|
|
21
|
+
$defs << "-DPSYCH_USE_LIBFYAML"
|
|
22
|
+
|
|
23
|
+
create_makefile 'psych'
|
|
24
|
+
return
|
|
25
|
+
end
|
|
26
|
+
|
|
5
27
|
if $mswin or $mingw or $cygwin
|
|
6
28
|
$CPPFLAGS << " -DYAML_DECLARE_STATIC"
|
|
7
29
|
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#include <psych.h>
|
|
2
|
+
|
|
3
|
+
/* call-seq: Psych.libyaml_version
|
|
4
|
+
*
|
|
5
|
+
* Returns the version of the underlying YAML library as a three-element
|
|
6
|
+
* array. This is libyaml by default. On the experimental libfyaml backend,
|
|
7
|
+
* where libyaml is not linked, it reports the libfyaml version instead.
|
|
8
|
+
*/
|
|
9
|
+
static VALUE libyaml_version(VALUE module)
|
|
10
|
+
{
|
|
11
|
+
int major, minor, patch;
|
|
12
|
+
VALUE list[3];
|
|
13
|
+
|
|
14
|
+
#ifdef PSYCH_USE_LIBFYAML
|
|
15
|
+
/* Experimental libfyaml backend: there is no libyaml linked in. Report
|
|
16
|
+
* the libfyaml version so callers still receive a 3-element version. */
|
|
17
|
+
const struct fy_version *v = fy_version_default();
|
|
18
|
+
major = v ? v->major : 0;
|
|
19
|
+
minor = v ? v->minor : 0;
|
|
20
|
+
patch = 0;
|
|
21
|
+
#else
|
|
22
|
+
yaml_get_version(&major, &minor, &patch);
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
list[0] = INT2NUM(major);
|
|
26
|
+
list[1] = INT2NUM(minor);
|
|
27
|
+
list[2] = INT2NUM(patch);
|
|
28
|
+
|
|
29
|
+
return rb_ary_new4((long)3, list);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#ifdef PSYCH_USE_LIBFYAML
|
|
33
|
+
/* call-seq: Psych.libfyaml_version
|
|
34
|
+
*
|
|
35
|
+
* Returns the libfyaml version string. This method is only defined when
|
|
36
|
+
* psych was built with the experimental libfyaml backend
|
|
37
|
+
* (+--enable-libfyaml+).
|
|
38
|
+
*/
|
|
39
|
+
static VALUE libfyaml_version(VALUE module)
|
|
40
|
+
{
|
|
41
|
+
const char *v = fy_library_version();
|
|
42
|
+
return v ? rb_usascii_str_new2(v) : Qnil;
|
|
43
|
+
}
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
VALUE mPsych;
|
|
47
|
+
|
|
48
|
+
void Init_psych(void)
|
|
49
|
+
{
|
|
50
|
+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
|
51
|
+
RB_EXT_RACTOR_SAFE(true);
|
|
52
|
+
#endif
|
|
53
|
+
mPsych = rb_define_module("Psych");
|
|
54
|
+
|
|
55
|
+
rb_define_singleton_method(mPsych, "libyaml_version", libyaml_version, 0);
|
|
56
|
+
|
|
57
|
+
#ifdef PSYCH_USE_LIBFYAML
|
|
58
|
+
rb_define_singleton_method(mPsych, "libfyaml_version", libfyaml_version, 0);
|
|
59
|
+
rb_define_const(mPsych, "BACKEND", rb_usascii_str_new2("libfyaml"));
|
|
60
|
+
#else
|
|
61
|
+
rb_define_const(mPsych, "BACKEND", rb_usascii_str_new2("libyaml"));
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
Init_psych_parser();
|
|
65
|
+
Init_psych_emitter();
|
|
66
|
+
Init_psych_to_ruby();
|
|
67
|
+
Init_psych_yaml_tree();
|
|
68
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#include <psych.h>
|
|
2
2
|
|
|
3
|
+
#ifndef PSYCH_USE_LIBFYAML
|
|
4
|
+
|
|
3
5
|
#if !defined(RARRAY_CONST_PTR)
|
|
4
6
|
#define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
|
|
5
7
|
#endif
|
|
@@ -587,3 +589,5 @@ void Init_psych_emitter(void)
|
|
|
587
589
|
id_indentation = rb_intern("indentation");
|
|
588
590
|
id_canonical = rb_intern("canonical");
|
|
589
591
|
}
|
|
592
|
+
|
|
593
|
+
#endif /* PSYCH_USE_LIBFYAML */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#include <psych.h>
|
|
2
2
|
|
|
3
|
+
#ifndef PSYCH_USE_LIBFYAML
|
|
4
|
+
|
|
3
5
|
VALUE cPsychParser;
|
|
4
6
|
|
|
5
7
|
static ID id_read;
|
|
6
|
-
static ID id_path;
|
|
7
8
|
static ID id_empty;
|
|
8
9
|
static ID id_start_stream;
|
|
9
10
|
static ID id_end_stream;
|
|
@@ -51,19 +52,28 @@ static int io_reader(void * data, unsigned char *buf, size_t size, size_t *read)
|
|
|
51
52
|
return 1;
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
/* The parser calls back into Ruby for every event, so a handler can call
|
|
56
|
+
* Psych::Parser#parse again on the same object. parse() reinitialises the
|
|
57
|
+
* parser it is handed, which would pull the input out from under the loop
|
|
58
|
+
* still driving it, so keep a flag to reject a reentrant call. */
|
|
59
|
+
typedef struct {
|
|
60
|
+
yaml_parser_t yaml_parser;
|
|
61
|
+
int parsing;
|
|
62
|
+
} psych_parser_t;
|
|
63
|
+
|
|
54
64
|
static void dealloc(void * ptr)
|
|
55
65
|
{
|
|
56
|
-
|
|
66
|
+
psych_parser_t * parser;
|
|
57
67
|
|
|
58
|
-
parser = (
|
|
59
|
-
yaml_parser_delete(parser);
|
|
68
|
+
parser = (psych_parser_t *)ptr;
|
|
69
|
+
yaml_parser_delete(&parser->yaml_parser);
|
|
60
70
|
xfree(parser);
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
#if 0
|
|
64
74
|
static size_t memsize(const void *ptr)
|
|
65
75
|
{
|
|
66
|
-
const
|
|
76
|
+
const psych_parser_t *parser = ptr;
|
|
67
77
|
/* TODO: calculate parser's size */
|
|
68
78
|
return 0;
|
|
69
79
|
}
|
|
@@ -80,10 +90,10 @@ static const rb_data_type_t psych_parser_type = {
|
|
|
80
90
|
|
|
81
91
|
static VALUE allocate(VALUE klass)
|
|
82
92
|
{
|
|
83
|
-
|
|
84
|
-
VALUE obj = TypedData_Make_Struct(klass,
|
|
93
|
+
psych_parser_t * parser;
|
|
94
|
+
VALUE obj = TypedData_Make_Struct(klass, psych_parser_t, &psych_parser_type, parser);
|
|
85
95
|
|
|
86
|
-
yaml_parser_initialize(parser);
|
|
96
|
+
yaml_parser_initialize(&parser->yaml_parser);
|
|
87
97
|
|
|
88
98
|
return obj;
|
|
89
99
|
}
|
|
@@ -256,9 +266,22 @@ static VALUE protected_event_location(VALUE pointer)
|
|
|
256
266
|
return rb_funcall3(args[0], id_event_location, 4, args + 1);
|
|
257
267
|
}
|
|
258
268
|
|
|
259
|
-
|
|
269
|
+
struct parse_args {
|
|
270
|
+
psych_parser_t * psych_parser;
|
|
271
|
+
VALUE self;
|
|
272
|
+
VALUE handler;
|
|
273
|
+
VALUE yaml;
|
|
274
|
+
VALUE path;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
static VALUE parse_body(VALUE ptr)
|
|
260
278
|
{
|
|
261
|
-
|
|
279
|
+
struct parse_args * pargs = (struct parse_args *)ptr;
|
|
280
|
+
yaml_parser_t * parser = &pargs->psych_parser->yaml_parser;
|
|
281
|
+
VALUE self = pargs->self;
|
|
282
|
+
VALUE handler = pargs->handler;
|
|
283
|
+
VALUE yaml = pargs->yaml;
|
|
284
|
+
VALUE path = pargs->path;
|
|
262
285
|
yaml_event_t event;
|
|
263
286
|
int done = 0;
|
|
264
287
|
int state = 0;
|
|
@@ -266,8 +289,6 @@ static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
|
|
|
266
289
|
int encoding = rb_utf8_encindex();
|
|
267
290
|
rb_encoding * internal_enc = rb_default_internal_encoding();
|
|
268
291
|
|
|
269
|
-
TypedData_Get_Struct(self, yaml_parser_t, &psych_parser_type, parser);
|
|
270
|
-
|
|
271
292
|
yaml_parser_delete(parser);
|
|
272
293
|
yaml_parser_initialize(parser);
|
|
273
294
|
|
|
@@ -311,6 +332,10 @@ static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
|
|
|
311
332
|
event_args[3] = end_line;
|
|
312
333
|
event_args[4] = end_column;
|
|
313
334
|
rb_protect(protected_event_location, (VALUE)event_args, &state);
|
|
335
|
+
if (state) {
|
|
336
|
+
yaml_event_delete(&event);
|
|
337
|
+
rb_jump_tag(state);
|
|
338
|
+
}
|
|
314
339
|
|
|
315
340
|
switch(event.type) {
|
|
316
341
|
case YAML_STREAM_START_EVENT:
|
|
@@ -495,7 +520,11 @@ static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
|
|
|
495
520
|
rb_protect(protected_end_mapping, handler, &state);
|
|
496
521
|
break;
|
|
497
522
|
case YAML_NO_EVENT:
|
|
523
|
+
/* Once libyaml has produced the stream end, every later call
|
|
524
|
+
* succeeds with a zeroed event and YAML_STREAM_END_EVENT can no
|
|
525
|
+
* longer be reached. Stop rather than loop forever. */
|
|
498
526
|
rb_protect(protected_empty, handler, &state);
|
|
527
|
+
done = 1;
|
|
499
528
|
break;
|
|
500
529
|
case YAML_STREAM_END_EVENT:
|
|
501
530
|
rb_protect(protected_end_stream, handler, &state);
|
|
@@ -509,6 +538,37 @@ static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
|
|
|
509
538
|
return self;
|
|
510
539
|
}
|
|
511
540
|
|
|
541
|
+
static VALUE parse_ensure(VALUE ptr)
|
|
542
|
+
{
|
|
543
|
+
psych_parser_t * parser = (psych_parser_t *)ptr;
|
|
544
|
+
|
|
545
|
+
parser->parsing = 0;
|
|
546
|
+
|
|
547
|
+
return Qnil;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
|
|
551
|
+
{
|
|
552
|
+
psych_parser_t * parser;
|
|
553
|
+
struct parse_args pargs;
|
|
554
|
+
|
|
555
|
+
TypedData_Get_Struct(self, psych_parser_t, &psych_parser_type, parser);
|
|
556
|
+
|
|
557
|
+
if (parser->parsing) {
|
|
558
|
+
rb_raise(rb_const_get(mPsych, rb_intern("Exception")),
|
|
559
|
+
"parser is already parsing, it cannot be reused from a handler callback");
|
|
560
|
+
}
|
|
561
|
+
parser->parsing = 1;
|
|
562
|
+
|
|
563
|
+
pargs.psych_parser = parser;
|
|
564
|
+
pargs.self = self;
|
|
565
|
+
pargs.handler = handler;
|
|
566
|
+
pargs.yaml = yaml;
|
|
567
|
+
pargs.path = path;
|
|
568
|
+
|
|
569
|
+
return rb_ensure(parse_body, (VALUE)&pargs, parse_ensure, (VALUE)parser);
|
|
570
|
+
}
|
|
571
|
+
|
|
512
572
|
/*
|
|
513
573
|
* call-seq:
|
|
514
574
|
* parser.mark # => #<Psych::Parser::Mark>
|
|
@@ -520,13 +580,13 @@ static VALUE mark(VALUE self)
|
|
|
520
580
|
{
|
|
521
581
|
VALUE mark_klass;
|
|
522
582
|
VALUE args[3];
|
|
523
|
-
|
|
583
|
+
psych_parser_t * parser;
|
|
524
584
|
|
|
525
|
-
TypedData_Get_Struct(self,
|
|
585
|
+
TypedData_Get_Struct(self, psych_parser_t, &psych_parser_type, parser);
|
|
526
586
|
mark_klass = rb_const_get_at(cPsychParser, rb_intern("Mark"));
|
|
527
|
-
args[0] = SIZET2NUM(parser->mark.index);
|
|
528
|
-
args[1] = SIZET2NUM(parser->mark.line);
|
|
529
|
-
args[2] = SIZET2NUM(parser->mark.column);
|
|
587
|
+
args[0] = SIZET2NUM(parser->yaml_parser.mark.index);
|
|
588
|
+
args[1] = SIZET2NUM(parser->yaml_parser.mark.line);
|
|
589
|
+
args[2] = SIZET2NUM(parser->yaml_parser.mark.column);
|
|
530
590
|
|
|
531
591
|
return rb_class_new_instance(3, args, mark_klass);
|
|
532
592
|
}
|
|
@@ -559,7 +619,6 @@ void Init_psych_parser(void)
|
|
|
559
619
|
rb_define_method(cPsychParser, "mark", mark, 0);
|
|
560
620
|
|
|
561
621
|
id_read = rb_intern("read");
|
|
562
|
-
id_path = rb_intern("path");
|
|
563
622
|
id_empty = rb_intern("empty");
|
|
564
623
|
id_start_stream = rb_intern("start_stream");
|
|
565
624
|
id_end_stream = rb_intern("end_stream");
|
|
@@ -573,3 +632,5 @@ void Init_psych_parser(void)
|
|
|
573
632
|
id_end_mapping = rb_intern("end_mapping");
|
|
574
633
|
id_event_location = rb_intern("event_location");
|
|
575
634
|
}
|
|
635
|
+
|
|
636
|
+
#endif /* PSYCH_USE_LIBFYAML */
|
|
@@ -59,7 +59,46 @@ module Psych
|
|
|
59
59
|
# See Psych::Parser and Psych::Parser#handler
|
|
60
60
|
|
|
61
61
|
def parse yaml, path = yaml.respond_to?(:path) ? yaml.path : "<unknown>"
|
|
62
|
-
_native_parse @handler, yaml, path
|
|
62
|
+
_native_parse @handler, strip_bom(yaml), path
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
private
|
|
66
|
+
|
|
67
|
+
BOM = {
|
|
68
|
+
Encoding::UTF_8 => "\u{FEFF}".freeze,
|
|
69
|
+
Encoding::UTF_16LE => "\u{FEFF}".encode(Encoding::UTF_16LE).freeze,
|
|
70
|
+
Encoding::UTF_16BE => "\u{FEFF}".encode(Encoding::UTF_16BE).freeze,
|
|
71
|
+
Encoding::UTF_32LE => "\u{FEFF}".encode(Encoding::UTF_32LE).freeze,
|
|
72
|
+
Encoding::UTF_32BE => "\u{FEFF}".encode(Encoding::UTF_32BE).freeze,
|
|
73
|
+
}.freeze
|
|
74
|
+
private_constant :BOM
|
|
75
|
+
|
|
76
|
+
# libyaml only skips a leading byte order mark when it detects the stream
|
|
77
|
+
# encoding by itself. Psych passes the encoding explicitly whenever it is
|
|
78
|
+
# known, and on that path libyaml counts the BOM as a first-line character,
|
|
79
|
+
# which shifts the column of every token on the first line and silently
|
|
80
|
+
# terminates a block mapping at the second line [Bug #13615].
|
|
81
|
+
def strip_bom yaml
|
|
82
|
+
if String === yaml
|
|
83
|
+
bom = BOM[yaml.encoding]
|
|
84
|
+
# delete_prefix copies even when there is no prefix, so keep the guard.
|
|
85
|
+
return yaml.delete_prefix(bom) if bom && yaml.start_with?(bom)
|
|
86
|
+
elsif yaml.respond_to?(:read) && yaml.respond_to?(:external_encoding) &&
|
|
87
|
+
yaml.respond_to?(:pos) && yaml.respond_to?(:seek)
|
|
88
|
+
bom = BOM[yaml.external_encoding]
|
|
89
|
+
skip_io_bom yaml, bom.b if bom
|
|
90
|
+
end
|
|
91
|
+
yaml
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def skip_io_bom io, bom
|
|
95
|
+
begin
|
|
96
|
+
pos = io.pos
|
|
97
|
+
rescue SystemCallError, IOError
|
|
98
|
+
return # Not seekable; nothing has been consumed yet.
|
|
99
|
+
end
|
|
100
|
+
head = io.read(bom.bytesize)
|
|
101
|
+
io.seek(pos, IO::SEEK_SET) if head && head.b != bom
|
|
63
102
|
end
|
|
64
103
|
end
|
|
65
104
|
end
|