From b41479c91e6685511c1f8ba8586106b322073b62 Mon Sep 17 00:00:00 2001 From: Ben Sanders Date: Sun, 2 Aug 2026 09:49:25 -0400 Subject: added statscounter code --- .../gems/json-2.21.1/lib/json/ext/generator.bundle | Bin 0 -> 98464 bytes .../json-2.21.1/lib/json/ext/generator/state.rb | 104 +++++++++++++++++++++ .../gems/json-2.21.1/lib/json/ext/parser.bundle | Bin 0 -> 100048 bytes 3 files changed, 104 insertions(+) create mode 100755 vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator.bundle create mode 100644 vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator/state.rb create mode 100755 vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/parser.bundle (limited to 'vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext') diff --git a/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator.bundle b/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator.bundle new file mode 100755 index 0000000..96b7040 Binary files /dev/null and b/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator.bundle differ diff --git a/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator/state.rb b/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator/state.rb new file mode 100644 index 0000000..3c1d2fb --- /dev/null +++ b/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/generator/state.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +module JSON + module Ext + module Generator + class State + # call-seq: new(opts = {}) + # + # Instantiates a new State object, configured by _opts_. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[rdoc-ref:JSON@Generating+Options]. + def initialize(opts = nil) + if opts && !opts.empty? + configure(opts) + end + end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + def configure(opts) + unless opts.is_a?(Hash) + if opts.respond_to?(:to_hash) + opts = opts.to_hash + elsif opts.respond_to?(:to_h) + opts = opts.to_h + else + raise TypeError, "can't convert #{opts.class} into Hash" + end + end + _configure(opts) + end + + alias_method :merge, :configure + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + def to_h + result = { + indent: indent, + space: space, + space_before: space_before, + object_nl: object_nl, + array_nl: array_nl, + as_json: as_json, + allow_nan: allow_nan?, + ascii_only: ascii_only?, + max_nesting: max_nesting, + script_safe: script_safe?, + strict: strict?, + depth: depth, + buffer_initial_length: buffer_initial_length, + sort_keys: sort_keys + } + + allow_duplicate_key = allow_duplicate_key? + unless allow_duplicate_key.nil? + result[:allow_duplicate_key] = allow_duplicate_key + end + + instance_variables.each do |iv| + iv = iv.to_s[1..-1] + result[iv.to_sym] = self[iv] + end + + result + end + + alias_method :to_hash, :to_h + + # call-seq: [](name) + # + # Returns the value returned by method +name+. + def [](name) + ::JSON.deprecation_warning("JSON::State#[] is deprecated and will be removed in json 3.0.0") + + if respond_to?(name) + __send__(name) + else + instance_variable_get("@#{name}") if + instance_variables.include?("@#{name}".to_sym) # avoid warning + end + end + + # call-seq: []=(name, value) + # + # Sets the attribute name to value. + def []=(name, value) + ::JSON.deprecation_warning("JSON::State#[]= is deprecated and will be removed in json 3.0.0") + + if respond_to?(name_writer = "#{name}=") + __send__ name_writer, value + else + instance_variable_set "@#{name}", value + end + end + end + end + end +end diff --git a/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/parser.bundle b/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/parser.bundle new file mode 100755 index 0000000..432f107 Binary files /dev/null and b/vendor/bundle/ruby/3.4.0/gems/json-2.21.1/lib/json/ext/parser.bundle differ -- cgit v1.2.3