cybrid_api_id_ruby 0.56.5 → 0.56.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +5 -5
  4. data/cybrid_api_id_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_id_ruby/api/bank_applications_idp_api.rb +1 -1
  6. data/lib/cybrid_api_id_ruby/api/customer_tokens_idp_api.rb +1 -1
  7. data/lib/cybrid_api_id_ruby/api/organization_applications_idp_api.rb +1 -1
  8. data/lib/cybrid_api_id_ruby/api_client.rb +1 -1
  9. data/lib/cybrid_api_id_ruby/api_error.rb +1 -1
  10. data/lib/cybrid_api_id_ruby/configuration.rb +1 -1
  11. data/lib/cybrid_api_id_ruby/models/application_idp_model.rb +1 -1
  12. data/lib/cybrid_api_id_ruby/models/application_list_idp_model.rb +1 -1
  13. data/lib/cybrid_api_id_ruby/models/application_with_secret_all_of_idp_model.rb +1 -1
  14. data/lib/cybrid_api_id_ruby/models/application_with_secret_idp_model.rb +1 -1
  15. data/lib/cybrid_api_id_ruby/models/customer_token_idp_model.rb +1 -1
  16. data/lib/cybrid_api_id_ruby/models/post_bank_application_idp_model.rb +1 -1
  17. data/lib/cybrid_api_id_ruby/models/post_customer_token_idp_model.rb +1 -1
  18. data/lib/cybrid_api_id_ruby/models/post_organization_application_idp_model.rb +1 -1
  19. data/lib/cybrid_api_id_ruby/version.rb +2 -2
  20. data/lib/cybrid_api_id_ruby.rb +1 -1
  21. data/spec/api/bank_applications_idp_api_spec.rb +1 -1
  22. data/spec/api/customer_tokens_idp_api_spec.rb +1 -1
  23. data/spec/api/organization_applications_idp_api_spec.rb +1 -1
  24. data/spec/api_client_spec.rb +1 -1
  25. data/spec/configuration_spec.rb +1 -1
  26. data/spec/models/application_idp_model_spec.rb +1 -1
  27. data/spec/models/application_list_idp_model_spec.rb +1 -1
  28. data/spec/models/application_with_secret_all_of_idp_model_spec.rb +1 -1
  29. data/spec/models/application_with_secret_idp_model_spec.rb +1 -1
  30. data/spec/models/customer_token_idp_model_spec.rb +1 -1
  31. data/spec/models/post_bank_application_idp_model_spec.rb +1 -1
  32. data/spec/models/post_customer_token_idp_model_spec.rb +1 -1
  33. data/spec/models/post_organization_application_idp_model_spec.rb +1 -1
  34. data/spec/spec_helper.rb +1 -1
  35. data/vendor/bundle/ruby/3.1.0/cache/psych-5.0.0.gem +0 -0
  36. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/byebug-11.1.3/gem_make.out +4 -4
  37. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/ffi-1.15.5/gem_make.out +4 -4
  38. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/jaro_winkler-1.5.4/gem_make.out +4 -4
  39. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/{psych-4.0.6 → psych-5.0.0}/gem.build_complete +0 -0
  40. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/psych-5.0.0/gem_make.out +30 -0
  41. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/{psych-4.0.6 → psych-5.0.0}/mkmf.log +31 -5
  42. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/psych-5.0.0/psych.so +0 -0
  43. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/stringio-3.0.2/gem_make.out +4 -4
  44. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/.gitignore +0 -0
  45. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/Gemfile +0 -0
  46. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/LICENSE +0 -0
  47. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/Mavenfile +0 -0
  48. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/README.md +0 -0
  49. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/Rakefile +0 -0
  50. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/bin/console +0 -0
  51. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/bin/setup +0 -0
  52. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/.sitearchdir.time +0 -0
  53. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/Makefile +22 -7
  54. data/vendor/bundle/ruby/3.1.0/gems/psych-5.0.0/ext/psych/depend +17 -0
  55. data/vendor/bundle/ruby/3.1.0/gems/psych-5.0.0/ext/psych/extconf.rb +53 -0
  56. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych.c +0 -0
  57. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych.h +0 -0
  58. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych.o +0 -0
  59. data/vendor/bundle/ruby/3.1.0/gems/psych-5.0.0/ext/psych/psych.so +0 -0
  60. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_emitter.c +0 -0
  61. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_emitter.h +0 -0
  62. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_emitter.o +0 -0
  63. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_parser.c +19 -33
  64. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_parser.h +0 -0
  65. data/vendor/bundle/ruby/3.1.0/gems/psych-5.0.0/ext/psych/psych_parser.o +0 -0
  66. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_to_ruby.c +0 -0
  67. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_to_ruby.h +0 -0
  68. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_to_ruby.o +0 -0
  69. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_yaml_tree.c +0 -0
  70. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_yaml_tree.h +0 -0
  71. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/ext/psych/psych_yaml_tree.o +0 -0
  72. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/class_loader.rb +0 -0
  73. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/coder.rb +0 -0
  74. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/core_ext.rb +0 -0
  75. data/vendor/bundle/ruby/3.1.0/gems/psych-5.0.0/lib/psych/exception.rb +28 -0
  76. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/handler.rb +0 -0
  77. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/handlers/document_stream.rb +0 -0
  78. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/handlers/recorder.rb +0 -0
  79. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/json/ruby_events.rb +0 -0
  80. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/json/stream.rb +0 -0
  81. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/json/tree_builder.rb +0 -0
  82. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/json/yaml_events.rb +0 -0
  83. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/alias.rb +0 -0
  84. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/document.rb +0 -0
  85. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/mapping.rb +0 -0
  86. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/node.rb +0 -0
  87. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/scalar.rb +0 -0
  88. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/sequence.rb +0 -0
  89. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes/stream.rb +0 -0
  90. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/nodes.rb +0 -0
  91. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/omap.rb +0 -0
  92. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/parser.rb +13 -0
  93. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/scalar_scanner.rb +0 -0
  94. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/set.rb +0 -0
  95. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/stream.rb +0 -0
  96. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/streaming.rb +0 -0
  97. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/syntax_error.rb +0 -0
  98. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/tree_builder.rb +0 -0
  99. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/versions.rb +1 -1
  100. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors/depth_first.rb +0 -0
  101. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors/emitter.rb +0 -0
  102. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors/json_tree.rb +0 -0
  103. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors/to_ruby.rb +2 -2
  104. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors/visitor.rb +0 -0
  105. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors/yaml_tree.rb +0 -0
  106. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/visitors.rb +0 -0
  107. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych/y.rb +0 -0
  108. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/lib/psych.rb +1 -1
  109. data/vendor/bundle/ruby/3.1.0/gems/psych-5.0.0/lib/psych.so +0 -0
  110. data/vendor/bundle/ruby/3.1.0/gems/{psych-4.0.6 → psych-5.0.0}/psych.gemspec +0 -3
  111. data/vendor/bundle/ruby/3.1.0/specifications/{psych-4.0.6.gemspec → psych-5.0.0.gemspec} +3 -3
  112. metadata +75 -87
  113. data/vendor/bundle/ruby/3.1.0/cache/psych-4.0.6.gem +0 -0
  114. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/psych-4.0.6/gem_make.out +0 -27
  115. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/psych-4.0.6/psych.so +0 -0
  116. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/depend +0 -5
  117. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/extconf.rb +0 -43
  118. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/psych.so +0 -0
  119. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/psych_parser.o +0 -0
  120. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/LICENSE +0 -19
  121. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/api.c +0 -1393
  122. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/config.h +0 -80
  123. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/dumper.c +0 -394
  124. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/emitter.c +0 -2358
  125. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/loader.c +0 -544
  126. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/parser.c +0 -1375
  127. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/reader.c +0 -469
  128. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/scanner.c +0 -3598
  129. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/writer.c +0 -141
  130. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/yaml.h +0 -1985
  131. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/ext/psych/yaml/yaml_private.h +0 -688
  132. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/lib/psych/exception.rb +0 -14
  133. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.6/lib/psych.so +0 -0
@@ -85,12 +85,12 @@ debugflags = -ggdb3
85
85
  warnflags = -Wall -Wextra -Wdeprecated-declarations -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
86
86
  cppflags =
87
87
  CCDLFLAGS = -fPIC
88
- CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
89
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
88
+ CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
89
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
90
90
  DEFS =
91
91
  CPPFLAGS = $(DEFS) $(cppflags)
92
- CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG)
93
- ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
92
+ CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG)
93
+ ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
94
94
  dldflags = -Wl,--compress-debug-sections=zlib
95
95
  ARCH_FLAG =
96
96
  DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
@@ -139,7 +139,7 @@ extout =
139
139
  extout_prefix =
140
140
  target_prefix =
141
141
  LOCAL_LIBS =
142
- LIBS = $(LIBRUBYARG_SHARED) -lyaml -lm -lc
142
+ LIBS = $(LIBRUBYARG_SHARED) -lyaml -lyaml -lm -lc
143
143
  ORIG_SRCS = psych.c psych_emitter.c psych_parser.c psych_to_ruby.c psych_yaml_tree.c
144
144
  SRCS = $(ORIG_SRCS)
145
145
  OBJS = psych.o psych_emitter.o psych_parser.o psych_to_ruby.o psych_yaml_tree.o
@@ -163,8 +163,11 @@ TARGET_SO_DIR =
163
163
  TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
164
164
  CLEANLIBS = $(TARGET_SO) false
165
165
  CLEANOBJS = *.o *.bak
166
- YAML_H =
166
+ LIBYAML =
167
167
 
168
+ LIBYAML_OBJDIR = libyaml/src
169
+ OBJEXT = o
170
+ RANLIB = gcc-ranlib
168
171
 
169
172
  all: $(DLLIB)
170
173
  static: $(STATIC_LIB)
@@ -268,7 +271,19 @@ $(TARGET_SO): $(OBJS) Makefile
268
271
 
269
272
 
270
273
  ###
271
- $(OBJS): $(YAML_H)
274
+ $(TARGET_SO): $(LIBYAML)
275
+
276
+ libyaml $(LIBYAML):
277
+ cd libyaml && $(MAKE)
278
+ $(AR) $(ARFLAGS) $(LIBYAML) $(LIBYAML_OBJDIR)/*.$(OBJEXT)
279
+ $(RANLIB) $(LIBYAML)
280
+
281
+ clean-so::
282
+ -cd libyaml && $(MAKE) clean
283
+
284
+ distclean-so::
285
+ -cd libyaml && $(MAKE) distclean
286
+ -$(Q)$(RMDIRS) libyaml/* libyaml
272
287
 
273
288
  $(OBJS): $(HDRS) $(ruby_headers) \
274
289
  $(hdrdir)/ruby/encoding.h \
@@ -0,0 +1,17 @@
1
+ $(TARGET_SO): $(LIBYAML)
2
+
3
+ libyaml $(LIBYAML):
4
+ cd libyaml && $(MAKE)
5
+ $(AR) $(ARFLAGS) $(LIBYAML) $(LIBYAML_OBJDIR)/*.$(OBJEXT)
6
+ $(RANLIB) $(LIBYAML)
7
+
8
+ clean-so::
9
+ -cd libyaml && $(MAKE) clean
10
+
11
+ distclean-so::
12
+ -cd libyaml && $(MAKE) distclean
13
+ -$(Q)$(RMDIRS) libyaml/* libyaml
14
+
15
+ $(OBJS): $(HDRS) $(ruby_headers) \
16
+ $(hdrdir)/ruby/encoding.h \
17
+ $(hdrdir)/ruby/oniguruma.h
@@ -0,0 +1,53 @@
1
+ # -*- coding: us-ascii -*-
2
+ # frozen_string_literal: true
3
+ require 'mkmf'
4
+
5
+ if $mswin or $mingw or $cygwin
6
+ $CPPFLAGS << " -DYAML_DECLARE_STATIC"
7
+ end
8
+
9
+ yaml_source = with_config("libyaml-source-dir")
10
+ if yaml_source
11
+ yaml_source = yaml_source.gsub(/\$\((\w+)\)|\$\{(\w+)\}/) {ENV[$1||$2]}
12
+ yaml_source = yaml_source.chomp("/")
13
+ yaml_configure = "#{File.expand_path(yaml_source)}/configure"
14
+ unless File.exist?(yaml_configure)
15
+ raise "Configure script not found in #{yaml_source.quote}"
16
+ end
17
+
18
+ puts("Configuring libyaml source in #{yaml_source.quote}")
19
+ yaml = "libyaml"
20
+ Dir.mkdir(yaml) unless File.directory?(yaml)
21
+ shared = $enable_shared || !$static
22
+ args = [
23
+ yaml_configure,
24
+ "--enable-#{shared ? 'shared' : 'static'}",
25
+ "--host=#{RbConfig::CONFIG['host'].sub(/-unknown-/, '-')}",
26
+ "CC=#{RbConfig::CONFIG['CC']}",
27
+ *(["CFLAGS=-w"] if RbConfig::CONFIG["GCC"] == "yes"),
28
+ ]
29
+ puts(args.quote.join(' '))
30
+ unless system(*args, chdir: yaml)
31
+ raise "failed to configure libyaml"
32
+ end
33
+ inc = yaml_source.start_with?("#$srcdir/") ? "$(srcdir)#{yaml_source[$srcdir.size..-1]}" : yaml_source
34
+ $INCFLAGS << " -I#{yaml}/include -I#{inc}/include"
35
+ puts("INCFLAGS=#$INCFLAGS")
36
+ libyaml = "libyaml.#$LIBEXT"
37
+ $cleanfiles << libyaml
38
+ $LOCAL_LIBS.prepend("$(LIBYAML) ")
39
+ else # default to pre-installed libyaml
40
+ pkg_config('yaml-0.1')
41
+ dir_config('libyaml')
42
+ find_header('yaml.h') or abort "yaml.h not found"
43
+ find_library('yaml', 'yaml_get_version') or abort "libyaml not found"
44
+ end
45
+
46
+ create_makefile 'psych' do |mk|
47
+ mk << "LIBYAML = #{libyaml}".strip << "\n"
48
+ mk << "LIBYAML_OBJDIR = libyaml/src#{shared ? '/.libs' : ''}\n"
49
+ mk << "OBJEXT = #$OBJEXT"
50
+ mk << "RANLIB = #{config_string('RANLIB') || config_string('NULLCMD')}\n"
51
+ end
52
+
53
+ # :startdoc:
@@ -79,21 +79,25 @@ static VALUE allocate(VALUE klass)
79
79
 
80
80
  static VALUE make_exception(yaml_parser_t * parser, VALUE path)
81
81
  {
82
- size_t line, column;
83
- VALUE ePsychSyntaxError;
82
+ if (parser->error == YAML_MEMORY_ERROR) {
83
+ return rb_eNoMemError;
84
+ } else {
85
+ size_t line, column;
86
+ VALUE ePsychSyntaxError;
84
87
 
85
- line = parser->context_mark.line + 1;
86
- column = parser->context_mark.column + 1;
88
+ line = parser->context_mark.line + 1;
89
+ column = parser->context_mark.column + 1;
87
90
 
88
- ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
91
+ ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
89
92
 
90
- return rb_funcall(ePsychSyntaxError, rb_intern("new"), 6,
91
- path,
92
- SIZET2NUM(line),
93
- SIZET2NUM(column),
94
- SIZET2NUM(parser->problem_offset),
95
- parser->problem ? rb_usascii_str_new2(parser->problem) : Qnil,
96
- parser->context ? rb_usascii_str_new2(parser->context) : Qnil);
93
+ return rb_funcall(ePsychSyntaxError, rb_intern("new"), 6,
94
+ path,
95
+ SIZET2NUM(line),
96
+ SIZET2NUM(column),
97
+ SIZET2NUM(parser->problem_offset),
98
+ parser->problem ? rb_usascii_str_new2(parser->problem) : Qnil,
99
+ parser->context ? rb_usascii_str_new2(parser->context) : Qnil);
100
+ }
97
101
  }
98
102
 
99
103
  static VALUE transcode_string(VALUE src, int * parser_encoding)
@@ -241,18 +245,8 @@ static VALUE protected_event_location(VALUE pointer)
241
245
  return rb_funcall3(args[0], id_event_location, 4, args + 1);
242
246
  }
243
247
 
244
- /*
245
- * call-seq:
246
- * parser.parse(yaml)
247
- *
248
- * Parse the YAML document contained in +yaml+. Events will be called on
249
- * the handler set on the parser instance.
250
- *
251
- * See Psych::Parser and Psych::Parser#handler
252
- */
253
- static VALUE parse(int argc, VALUE *argv, VALUE self)
248
+ static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
254
249
  {
255
- VALUE yaml, path;
256
250
  yaml_parser_t * parser;
257
251
  yaml_event_t event;
258
252
  int done = 0;
@@ -260,14 +254,6 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
260
254
  int parser_encoding = YAML_ANY_ENCODING;
261
255
  int encoding = rb_utf8_encindex();
262
256
  rb_encoding * internal_enc = rb_default_internal_encoding();
263
- VALUE handler = rb_iv_get(self, "@handler");
264
-
265
- if (rb_scan_args(argc, argv, "11", &yaml, &path) == 1) {
266
- if(rb_respond_to(yaml, id_path))
267
- path = rb_funcall(yaml, id_path, 0);
268
- else
269
- path = rb_str_new2("<unknown>");
270
- }
271
257
 
272
258
  TypedData_Get_Struct(self, yaml_parser_t, &psych_parser_type, parser);
273
259
 
@@ -293,7 +279,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
293
279
  VALUE event_args[5];
294
280
  VALUE start_line, start_column, end_line, end_column;
295
281
 
296
- if(!yaml_parser_parse(parser, &event)) {
282
+ if(parser->error || !yaml_parser_parse(parser, &event)) {
297
283
  VALUE exception;
298
284
 
299
285
  exception = make_exception(parser, path);
@@ -558,7 +544,7 @@ void Init_psych_parser(void)
558
544
 
559
545
  rb_require("psych/syntax_error");
560
546
 
561
- rb_define_method(cPsychParser, "parse", parse, -1);
547
+ rb_define_private_method(cPsychParser, "_native_parse", parse, 3);
562
548
  rb_define_method(cPsychParser, "mark", mark, 0);
563
549
 
564
550
  id_read = rb_intern("read");
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+ module Psych
3
+ class Exception < RuntimeError
4
+ end
5
+
6
+ class BadAlias < Exception
7
+ end
8
+
9
+ # Subclasses `BadAlias` for backwards compatibility
10
+ class AliasesNotEnabled < BadAlias
11
+ def initialize
12
+ super "Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`."
13
+ end
14
+ end
15
+
16
+ # Subclasses `BadAlias` for backwards compatibility
17
+ class AnchorNotDefined < BadAlias
18
+ def initialize anchor_name
19
+ super "An alias referenced an unknown anchor: #{anchor_name}"
20
+ end
21
+ end
22
+
23
+ class DisallowedClass < Exception
24
+ def initialize action, klass_name
25
+ super "Tried to #{action} unspecified class: #{klass_name}"
26
+ end
27
+ end
28
+ end
@@ -48,5 +48,18 @@ module Psych
48
48
  @handler = handler
49
49
  @external_encoding = ANY
50
50
  end
51
+
52
+ ###
53
+ # call-seq:
54
+ # parser.parse(yaml)
55
+ #
56
+ # Parse the YAML document contained in +yaml+. Events will be called on
57
+ # the handler set on the parser instance.
58
+ #
59
+ # See Psych::Parser and Psych::Parser#handler
60
+
61
+ def parse yaml, path = yaml.respond_to?(:path) ? yaml.path : "<unknown>"
62
+ _native_parse @handler, yaml, path
63
+ end
51
64
  end
52
65
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Psych
4
4
  # The version of Psych you are using
5
- VERSION = '4.0.6'
5
+ VERSION = '5.0.0'
6
6
 
7
7
  if RUBY_ENGINE == 'jruby'
8
8
  DEFAULT_SNAKEYAML_VERSION = '1.33'.freeze
@@ -325,7 +325,7 @@ module Psych
325
325
  end
326
326
 
327
327
  def visit_Psych_Nodes_Alias o
328
- @st.fetch(o.anchor) { raise BadAlias, "Unknown alias: #{o.anchor}" }
328
+ @st.fetch(o.anchor) { raise AnchorNotDefined, o.anchor }
329
329
  end
330
330
 
331
331
  private
@@ -429,7 +429,7 @@ module Psych
429
429
 
430
430
  class NoAliasRuby < ToRuby
431
431
  def visit_Psych_Nodes_Alias o
432
- raise BadAlias, "Unknown alias: #{o.anchor}"
432
+ raise AliasesNotEnabled
433
433
  end
434
434
  end
435
435
  end
@@ -307,7 +307,7 @@ module Psych
307
307
  # A Psych::DisallowedClass exception will be raised if the yaml contains a
308
308
  # class that isn't in the +permitted_classes+ list.
309
309
  #
310
- # A Psych::BadAlias exception will be raised if the yaml contains aliases
310
+ # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases
311
311
  # but the +aliases+ keyword argument is set to false.
312
312
  #
313
313
  # +filename+ will be used in the exception message if any exception is raised
@@ -27,9 +27,6 @@ DESCRIPTION
27
27
  "bin/setup", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h",
28
28
  "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h",
29
29
  "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h",
30
- "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c",
31
- "ext/psych/yaml/emitter.c", "ext/psych/yaml/loader.c", "ext/psych/yaml/parser.c", "ext/psych/yaml/reader.c",
32
- "ext/psych/yaml/scanner.c", "ext/psych/yaml/writer.c", "ext/psych/yaml/yaml.h", "ext/psych/yaml/yaml_private.h",
33
30
  "lib/psych.rb", "lib/psych/class_loader.rb", "lib/psych/coder.rb", "lib/psych/core_ext.rb", "lib/psych/exception.rb",
34
31
  "lib/psych/handler.rb", "lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb",
35
32
  "lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", "lib/psych/json/tree_builder.rb",
@@ -1,15 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: psych 4.0.6 ruby lib
2
+ # stub: psych 5.0.0 ruby lib
3
3
  # stub: ext/psych/extconf.rb
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "psych".freeze
7
- s.version = "4.0.6"
7
+ s.version = "5.0.0"
8
8
 
9
9
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["Aaron Patterson".freeze, "SHIBATA Hiroshi".freeze, "Charles Oliver Nutter".freeze]
12
- s.date = "2022-09-28"
12
+ s.date = "2022-12-05"
13
13
  s.description = "Psych is a YAML parser and emitter. Psych leverages libyaml[https://pyyaml.org/wiki/LibYAML]\nfor its YAML parsing and emitting capabilities. In addition to wrapping libyaml,\nPsych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format.\n".freeze
14
14
  s.email = ["aaron@tenderlovemaking.com".freeze, "hsbt@ruby-lang.org".freeze, "headius@headius.com".freeze]
15
15
  s.extensions = ["ext/psych/extconf.rb".freeze]