piko-lite-mod 0.0.1

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.

Potentially problematic release.


This version of piko-lite-mod might be problematic. Click here for more details.

Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/json-2.21.1/BSDL +22 -0
  3. data/json-2.21.1/CHANGES.md +810 -0
  4. data/json-2.21.1/COPYING +56 -0
  5. data/json-2.21.1/LEGAL +20 -0
  6. data/json-2.21.1/README.md +308 -0
  7. data/json-2.21.1/ext/json/ext/fbuffer/fbuffer.h +259 -0
  8. data/json-2.21.1/ext/json/ext/generator/extconf.rb +19 -0
  9. data/json-2.21.1/ext/json/ext/generator/generator.c +2066 -0
  10. data/json-2.21.1/ext/json/ext/json.h +183 -0
  11. data/json-2.21.1/ext/json/ext/parser/extconf.rb +37 -0
  12. data/json-2.21.1/ext/json/ext/parser/parser.c +2917 -0
  13. data/json-2.21.1/ext/json/ext/simd/conf.rb +24 -0
  14. data/json-2.21.1/ext/json/ext/simd/simd.h +208 -0
  15. data/json-2.21.1/ext/json/ext/vendor/fast_float_parser.h +814 -0
  16. data/json-2.21.1/ext/json/ext/vendor/fpconv.c +480 -0
  17. data/json-2.21.1/ext/json/ext/vendor/jeaiii-ltoa.h +267 -0
  18. data/json-2.21.1/json.gemspec +62 -0
  19. data/json-2.21.1/lib/json/add/bigdecimal.rb +58 -0
  20. data/json-2.21.1/lib/json/add/complex.rb +51 -0
  21. data/json-2.21.1/lib/json/add/core.rb +13 -0
  22. data/json-2.21.1/lib/json/add/date.rb +54 -0
  23. data/json-2.21.1/lib/json/add/date_time.rb +67 -0
  24. data/json-2.21.1/lib/json/add/exception.rb +49 -0
  25. data/json-2.21.1/lib/json/add/ostruct.rb +54 -0
  26. data/json-2.21.1/lib/json/add/range.rb +54 -0
  27. data/json-2.21.1/lib/json/add/rational.rb +49 -0
  28. data/json-2.21.1/lib/json/add/regexp.rb +48 -0
  29. data/json-2.21.1/lib/json/add/set.rb +48 -0
  30. data/json-2.21.1/lib/json/add/string.rb +35 -0
  31. data/json-2.21.1/lib/json/add/struct.rb +52 -0
  32. data/json-2.21.1/lib/json/add/symbol.rb +52 -0
  33. data/json-2.21.1/lib/json/add/time.rb +52 -0
  34. data/json-2.21.1/lib/json/common.rb +1182 -0
  35. data/json-2.21.1/lib/json/ext/generator/state.rb +104 -0
  36. data/json-2.21.1/lib/json/ext.rb +71 -0
  37. data/json-2.21.1/lib/json/generic_object.rb +67 -0
  38. data/json-2.21.1/lib/json/truffle_ruby/generator.rb +790 -0
  39. data/json-2.21.1/lib/json/version.rb +5 -0
  40. data/json-2.21.1/lib/json.rb +841 -0
  41. data/piko-lite-mod.gemspec +11 -0
  42. metadata +80 -0
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module JSON
4
+ module Ext
5
+ module Generator
6
+ class State
7
+ # call-seq: new(opts = {})
8
+ #
9
+ # Instantiates a new State object, configured by _opts_.
10
+ #
11
+ # Argument +opts+, if given, contains a \Hash of options for the generation.
12
+ # See {Generating Options}[rdoc-ref:JSON@Generating+Options].
13
+ def initialize(opts = nil)
14
+ if opts && !opts.empty?
15
+ configure(opts)
16
+ end
17
+ end
18
+
19
+ # call-seq: configure(opts)
20
+ #
21
+ # Configure this State instance with the Hash _opts_, and return
22
+ # itself.
23
+ def configure(opts)
24
+ unless opts.is_a?(Hash)
25
+ if opts.respond_to?(:to_hash)
26
+ opts = opts.to_hash
27
+ elsif opts.respond_to?(:to_h)
28
+ opts = opts.to_h
29
+ else
30
+ raise TypeError, "can't convert #{opts.class} into Hash"
31
+ end
32
+ end
33
+ _configure(opts)
34
+ end
35
+
36
+ alias_method :merge, :configure
37
+
38
+ # call-seq: to_h
39
+ #
40
+ # Returns the configuration instance variables as a hash, that can be
41
+ # passed to the configure method.
42
+ def to_h
43
+ result = {
44
+ indent: indent,
45
+ space: space,
46
+ space_before: space_before,
47
+ object_nl: object_nl,
48
+ array_nl: array_nl,
49
+ as_json: as_json,
50
+ allow_nan: allow_nan?,
51
+ ascii_only: ascii_only?,
52
+ max_nesting: max_nesting,
53
+ script_safe: script_safe?,
54
+ strict: strict?,
55
+ depth: depth,
56
+ buffer_initial_length: buffer_initial_length,
57
+ sort_keys: sort_keys
58
+ }
59
+
60
+ allow_duplicate_key = allow_duplicate_key?
61
+ unless allow_duplicate_key.nil?
62
+ result[:allow_duplicate_key] = allow_duplicate_key
63
+ end
64
+
65
+ instance_variables.each do |iv|
66
+ iv = iv.to_s[1..-1]
67
+ result[iv.to_sym] = self[iv]
68
+ end
69
+
70
+ result
71
+ end
72
+
73
+ alias_method :to_hash, :to_h
74
+
75
+ # call-seq: [](name)
76
+ #
77
+ # Returns the value returned by method +name+.
78
+ def [](name)
79
+ ::JSON.deprecation_warning("JSON::State#[] is deprecated and will be removed in json 3.0.0")
80
+
81
+ if respond_to?(name)
82
+ __send__(name)
83
+ else
84
+ instance_variable_get("@#{name}") if
85
+ instance_variables.include?("@#{name}".to_sym) # avoid warning
86
+ end
87
+ end
88
+
89
+ # call-seq: []=(name, value)
90
+ #
91
+ # Sets the attribute name to value.
92
+ def []=(name, value)
93
+ ::JSON.deprecation_warning("JSON::State#[]= is deprecated and will be removed in json 3.0.0")
94
+
95
+ if respond_to?(name_writer = "#{name}=")
96
+ __send__ name_writer, value
97
+ else
98
+ instance_variable_set "@#{name}", value
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json/common'
4
+
5
+ module JSON
6
+ # This module holds all the modules/classes that implement JSON's
7
+ # functionality as C extensions.
8
+ module Ext
9
+ class Parser
10
+ class << self
11
+ def parse(...)
12
+ new(...).parse
13
+ end
14
+ alias_method :parse, :parse # Allow redefinition by extensions
15
+ end
16
+
17
+ def initialize(source, opts = nil)
18
+ @source = source
19
+ @config = Config.new(opts)
20
+ end
21
+
22
+ def source
23
+ @source.dup
24
+ end
25
+
26
+ def parse
27
+ @config.parse(@source)
28
+ end
29
+ end
30
+
31
+ require 'json/ext/parser'
32
+ Ext::Parser::Config = Ext::ParserConfig
33
+ JSON.parser = Ext::Parser
34
+
35
+ if RUBY_ENGINE == 'truffleruby'
36
+ require 'json/truffle_ruby/generator'
37
+ JSON.generator = JSON::TruffleRuby::Generator
38
+ else
39
+ require 'json/ext/generator'
40
+ JSON.generator = Generator
41
+ end
42
+ end
43
+
44
+ if defined?(ResumableParser) # Not yet available on JRuby
45
+ class ResumableParser
46
+ # Returns whether the parser is entirely done: no unconsumed bytes in
47
+ # the buffer, no document under construction and no parsed value
48
+ # awaiting retrieval.
49
+ #
50
+ # The main use case is detecting a truncated stream once the input is
51
+ # exhausted:
52
+ #
53
+ # loop do
54
+ # begin
55
+ # parser << socket.readpartial(4096)
56
+ # rescue EOFError
57
+ # break
58
+ # end
59
+ # while parser.parse
60
+ # process(parser.value)
61
+ # end
62
+ # end
63
+ # warn "stream was truncated" unless parser.empty?
64
+ def empty?
65
+ eos? && !partial_value? && !value?
66
+ end
67
+ end
68
+ end
69
+
70
+ JSON_LOADED = true unless defined?(JSON::JSON_LOADED)
71
+ end
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+ begin
3
+ require 'ostruct'
4
+ rescue LoadError
5
+ warn "JSON::GenericObject requires 'ostruct'. Please install it with `gem install ostruct`."
6
+ end
7
+
8
+ module JSON
9
+ class GenericObject < OpenStruct
10
+ class << self
11
+ alias [] new
12
+
13
+ def json_creatable?
14
+ @json_creatable
15
+ end
16
+
17
+ attr_writer :json_creatable
18
+
19
+ def json_create(data)
20
+ data = data.dup
21
+ data.delete JSON.create_id
22
+ self[data]
23
+ end
24
+
25
+ def from_hash(object)
26
+ case
27
+ when object.respond_to?(:to_hash)
28
+ result = new
29
+ object.to_hash.each do |key, value|
30
+ result[key] = from_hash(value)
31
+ end
32
+ result
33
+ when object.respond_to?(:to_ary)
34
+ object.to_ary.map { |a| from_hash(a) }
35
+ else
36
+ object
37
+ end
38
+ end
39
+
40
+ def load(source, proc = nil, opts = {})
41
+ result = ::JSON.load(source, proc, opts.merge(:object_class => self))
42
+ result.nil? ? new : result
43
+ end
44
+
45
+ def dump(obj, *args)
46
+ ::JSON.dump(obj, *args)
47
+ end
48
+ end
49
+ self.json_creatable = false
50
+
51
+ def to_hash
52
+ table
53
+ end
54
+
55
+ def |(other)
56
+ self.class[other.to_hash.merge(to_hash)]
57
+ end
58
+
59
+ def as_json(*)
60
+ { JSON.create_id => self.class.name }.merge to_hash
61
+ end
62
+
63
+ def to_json(*a)
64
+ as_json.to_json(*a)
65
+ end
66
+ end if defined?(::OpenStruct)
67
+ end