teptris 0.2.53-aarch64-linux → 0.2.55-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 168a5dbc5e797d21c3d6798cd78b90d4b8a704b1f9423413904c71b2559c31fb
4
- data.tar.gz: 2e6f06fcfc14d22db8c821402462d428a09dd30c4c63e4ac5d071173415084a8
3
+ metadata.gz: a2400a09ae1ced1e09d349bdb20851b189f13e466c2bf4d9006008c517c0bf83
4
+ data.tar.gz: 8ab7d95aa9e1bb795d589e0963e6ebda41b419f914e857802e8014cd273dc357
5
5
  SHA512:
6
- metadata.gz: 050ed9059cefb4cc60b37194b353e9a385335aa22e99395ed993833967efa7d466e0e3c0de2d9764ee08b528f56cf6e7e622aa6f3d0f0c5503931a395746ea55
7
- data.tar.gz: 4c24b94cbe121c7413367f42afd48413e2acce70dd47328614d9f7da94735d91b74cfdbc30d44404e8b46f89519fa75a2e7ad64fd30f501c07d3798e10a5fd32
6
+ metadata.gz: fe7a41af3f3e7727d6d377df95a8b326acf58375acac85c8fa1a8ca11e9e07809fc189cace8c7a07206206fc151330e94e457625cf51b60c5b5faa0013c760e0
7
+ data.tar.gz: 1cdc4dee00304a83e731054485934bf055ac5a11b5722628d03c78dfc7378ee65612aca9cabf9a1ae50c8749f49c8010dbd52deeaf15cd06f69af8c624bb11f0
data/Steepfile ADDED
@@ -0,0 +1,10 @@
1
+ target :lib do
2
+ signature "sig"
3
+ library "date"
4
+
5
+ check "lib"
6
+
7
+ configure_code_diagnostics do |hash|
8
+ # keep the lane green while signatures evolve
9
+ end
10
+ end
@@ -32,7 +32,9 @@ class Teptris::Descriptor
32
32
  # siblings that follow a :nested child into the sub-plan's range —
33
33
  # the 0.2.29 bug (every array-of-tables element grew stray nil
34
34
  # rows).
35
+ # @type var plans: Array[Hash[Symbol, untyped]]
35
36
  plans = []
37
+ # @type var index_of: Hash[Integer, Integer]
36
38
  index_of = {}
37
39
  collect = lambda do |t|
38
40
  unless index_of.key?(t.object_id)
data/lib/teptris/toml.rb CHANGED
@@ -25,6 +25,7 @@ module Teptris
25
25
  unless %i[native string].include?(datetime_policy)
26
26
  raise ArgumentError, "datetime_policy must be :native or :string"
27
27
  end
28
+ # @type var opts: Hash[Symbol, untyped]
28
29
  opts = {}
29
30
  opts[:string_datetimes] = true if datetime_policy == :string
30
31
  if permitted_classes && datetime_policy == :native
@@ -69,6 +70,7 @@ module Teptris
69
70
  # Repeated objects are dup'd once each HERE: a repeat landing in
70
71
  # two slices would double-lock across threads (the slice-level
71
72
  # guard cannot see across slices); frozen dup'ing is C-side.
73
+ # @type var seen: Hash[Integer, bool]
72
74
  seen = {}
73
75
  tomls = tomls.map do |s|
74
76
  next s.dup if seen[s.object_id]
@@ -77,6 +79,7 @@ module Teptris
77
79
  end
78
80
  per = (n.to_f / threads).ceil
79
81
  results = Array.new(n)
82
+ # @type var first_error: [Integer, untyped]?
80
83
  first_error = nil
81
84
  mutex = Mutex.new
82
85
  threads.times.map do |ti|
@@ -157,6 +160,7 @@ module Teptris
157
160
  end
158
161
 
159
162
  def _safe_load_opts(safe_load, datetime_policy)
163
+ # @type var opts: Hash[Symbol, untyped]
160
164
  opts = {}
161
165
  opts[:string_datetimes] = true if datetime_policy == :string
162
166
  if safe_load && datetime_policy == :native
@@ -1,3 +1,3 @@
1
1
  module Teptris
2
- VERSION = "0.2.53"
2
+ VERSION = "0.2.55"
3
3
  end
data/sig/teptris.rbs ADDED
@@ -0,0 +1,131 @@
1
+ module Teptris
2
+ VERSION: String
3
+
4
+ # mirrored from the engine's teptris_status (lib/teptris.rb)
5
+ TEPTRIS_OK: Integer
6
+
7
+ class Error < StandardError
8
+ end
9
+
10
+ class ParseError < Error
11
+ attr_reader line: Integer
12
+ attr_reader column: Integer
13
+
14
+ def initialize: (String message, ?Integer line, ?Integer column) -> void
15
+ end
16
+
17
+ module TOML
18
+ VERSION: String
19
+
20
+ # Eager load: String -> Hash with String keys. Datetime contract
21
+ # (the tomlib shape): Time with zone for offset datetimes, local
22
+ # Time for local datetimes, Date for dates, "HH:MM:SS" String for
23
+ # local times.
24
+ def self.load: (String toml) -> Hash[String, untyped]
25
+
26
+ def self.load_file: (String path) -> Hash[String, untyped]
27
+
28
+ def self.safe_load: (String toml, ?permitted_classes: Array[Class]?,
29
+ ?datetime_policy: :native | :string)
30
+ -> Hash[String, untyped]
31
+
32
+ # One parse; host objects materialize only along accessed paths.
33
+ def self.load_lazy: (String toml) -> TeptrisExt::LazyValue
34
+
35
+ def self.load_batch: (Array[String] tomls, ?safe_load: Array[Class]?,
36
+ ?datetime_policy: :native | :string,
37
+ ?threads: Integer)
38
+ -> Array[Hash[String, untyped]]
39
+
40
+ def self.load_lazy_batch: (Array[String] tomls)
41
+ -> Array[TeptrisExt::LazyValue]
42
+
43
+ def self.load_files: (Array[String] paths, ?safe_load: Array[Class]?,
44
+ ?datetime_policy: :native | :string)
45
+ -> Array[Hash[String, untyped]]
46
+
47
+ def self.load_schema: (String toml, Descriptor descriptor)
48
+ -> Hash[String, untyped]
49
+
50
+ def self.dump: (untyped obj) -> String
51
+
52
+ def self.engine_version: () -> String
53
+
54
+ def self._validate_batch!: (untyped input, untyped safe_load,
55
+ :native | :string datetime_policy,
56
+ ?kind: Symbol) -> void
57
+
58
+ def self._safe_load_opts: (untyped safe_load,
59
+ :native | :string datetime_policy)
60
+ -> Hash[Symbol, untyped]?
61
+ end
62
+
63
+ # Tree-shaped schema descriptor: compile once with .build, then
64
+ # materialize documents against it with #walk — unplanned keys are
65
+ # never materialized (the py twin is teptris.Descriptor).
66
+ class Descriptor
67
+ KINDS: Hash[Symbol, Integer]
68
+
69
+ def self.build: (Hash[Symbol, untyped] tree) -> Descriptor
70
+
71
+ attr_reader rows: Array[[String, Integer, Integer]]
72
+ attr_reader first_row: Array[Integer]
73
+
74
+ def walk: (String toml) -> Hash[String, untyped]
75
+ end
76
+ end
77
+
78
+ # The C extension's surface (defined in ext/teptris_ext). The gem's
79
+ # public API is Teptris::TOML; these module functions are the binding
80
+ # layer underneath it.
81
+ module TeptrisExt
82
+ # Lazy wrapper: one parse, scalars materialize on access, to_h/to_a
83
+ # flatten to the eager shapes.
84
+ class LazyValue
85
+ def []: (String key) -> (LazyValue | untyped)
86
+ | (Integer index) -> (LazyValue | untyped)
87
+
88
+ def at: (Integer index) -> (LazyValue | untyped)
89
+
90
+ def dig: (*String keys) -> (LazyValue | untyped)
91
+
92
+ def kind: () -> String
93
+
94
+ def size: () -> Integer
95
+
96
+ def each: () { (LazyValue | untyped) -> void } -> LazyValue
97
+ | () -> Enumerator[LazyValue | untyped, LazyValue]
98
+
99
+ def value: () -> untyped
100
+
101
+ def to_h: () -> Hash[String, untyped]
102
+
103
+ def to_a: () -> Array[untyped]
104
+
105
+ def ==: (untyped other) -> bool
106
+
107
+ include Enumerable[LazyValue | untyped]
108
+ end
109
+
110
+ def self.load: (String toml, ?Hash[Symbol, untyped]? opts)
111
+ -> Hash[String, untyped]
112
+
113
+ def self.load_lazy: (String toml) -> LazyValue
114
+
115
+ def self.load_batch: (Array[String] tomls, Hash[Symbol, untyped]? opts)
116
+ -> Array[Hash[String, untyped]]
117
+
118
+ def self.load_slice: (Array[String] tomls, Hash[Symbol, untyped]? opts)
119
+ -> Array[Hash[String, untyped]]
120
+
121
+ def self.load_lazy_batch: (Array[String] tomls) -> Array[LazyValue]
122
+
123
+ def self.dump: (untyped obj) -> String
124
+
125
+ def self.engine_version: () -> String
126
+
127
+ def self.plan_build: (Array[[String, Integer, Integer]] rows,
128
+ Array[Integer] first_row) -> untyped
129
+
130
+ def self.plan_emit: (untyped handle, String toml) -> Hash[String, untyped]
131
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.53
4
+ version: 0.2.55
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - teptris contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-01 00:00:00.000000000 Z
11
+ date: 2026-10-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A native C extension over libteptris, a C99 TOML 1.1 parser/emitter.
14
14
  API shape mirrors the tomlib gem.
@@ -17,6 +17,7 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - Steepfile
20
21
  - ext/teptris_ext/engine/LICENSE.md
21
22
  - ext/teptris_ext/engine/README.md
22
23
  - ext/teptris_ext/engine/src/include/teptris/plan.h
@@ -58,10 +59,16 @@ files:
58
59
  - lib/teptris/error.rb
59
60
  - lib/teptris/toml.rb
60
61
  - lib/teptris/version.rb
62
+ - sig/teptris.rbs
61
63
  homepage: https://github.com/leptris/teptris-ruby
62
64
  licenses:
63
65
  - MIT
64
- metadata: {}
66
+ metadata:
67
+ bug_tracker_uri: https://github.com/leptris/teptris-ruby/issues
68
+ changelog_uri: https://github.com/leptris/teptris-ruby/releases
69
+ documentation_uri: https://leptris.github.io/docs/teptris-ruby
70
+ rubygems_mfa_required: 'true'
71
+ source_code_uri: https://github.com/leptris/teptris-ruby
65
72
  post_install_message:
66
73
  rdoc_options: []
67
74
  require_paths: