kdl 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7fd58e017395f4ce4c67e04d8c4324c27bfe816926a41ebf0a813231cbe3eaf
4
- data.tar.gz: 5ad57dac159e4fabe083f209cf0d0bb07735ed533859da539b0c0796b2d3dc70
3
+ metadata.gz: 9d3070a54498a965985d61d8dea528ed71b8f096b5ff35f173ca1fe95e61c1fa
4
+ data.tar.gz: 31ff09d83e0f814e023724975f6136b048f01f54b03415d89594b3972bfb6193
5
5
  SHA512:
6
- metadata.gz: 5c84ac4702188843e47041424d50e35ed19dcacbc8c9ce334a4036e6a8f2201f6d3dc420c9fbd6a5262fd42e1e387090c4ffe1575b4a7d92081a5776844e5492
7
- data.tar.gz: 4b02a0867a5ae9cc0e698df0308d91f9fa8b41a96e14ad5efd8b51e95659e3e20196a2d1c197e9dc6e0f96710f632e0d9295342e18e069b6313eac49a5841c72
6
+ metadata.gz: 75803a3b0adaf8e216c401e18a0d5eab7da745728503d133a45b4377e5f34b83313f11d5e0c5f5e2ee337c275b188e0d826af057a01015574897baaa264c4586
7
+ data.tar.gz: 00aaf994ee907ac85acdba91c525556fa47e71bf650238aa5165b2bf2284a1c86b8b63aa6ea7af000aeff274026ef002396655994977714291268ef657375644
@@ -17,7 +17,7 @@ jobs:
17
17
  test:
18
18
  strategy:
19
19
  matrix:
20
- ruby: [2.4, 2.5, 2.6, 2.7, 3.0, head]
20
+ ruby: [2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, head]
21
21
 
22
22
  runs-on: ubuntu-latest
23
23
 
data/kdl.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.description = %q{Ruby implementation of the KDL Document Language Spec}
11
11
  spec.homepage = "https://kdl.dev"
12
12
  spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
14
14
 
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
16
  spec.metadata["source_code_uri"] = "https://github.com/danini-the-panini/kdl-rb"
@@ -26,4 +26,6 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_development_dependency 'racc', '~> 1.5'
28
28
  spec.add_dependency 'simpleidn', '~> 0.2.1'
29
+ spec.add_dependency 'bigdecimal', '~> 3.1.6'
30
+ spec.add_dependency 'base64', '~> 0.2.0'
29
31
  end
data/lib/kdl/kdl.tab.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.6.0
4
- # from Racc grammar file "".
3
+ # This file is automatically generated by Racc 1.7.3
4
+ # from Racc grammar file "kdl.yy".
5
5
  #
6
6
 
7
7
  require 'racc/parser.rb'
@@ -213,6 +213,7 @@ Racc_arg = [
213
213
  racc_shift_n,
214
214
  racc_reduce_n,
215
215
  racc_use_result_var ]
216
+ Ractor.make_shareable(Racc_arg) if defined?(Ractor)
216
217
 
217
218
  Racc_token_to_s_table = [
218
219
  "$end",
@@ -258,6 +259,7 @@ Racc_token_to_s_table = [
258
259
  "untyped_value",
259
260
  "boolean",
260
261
  "linespace" ]
262
+ Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
261
263
 
262
264
  Racc_debug_parser = false
263
265
 
data/lib/kdl/tokenizer.rb CHANGED
@@ -113,15 +113,15 @@ module KDL
113
113
  if c == '0' && n =~ /[box]/
114
114
  traverse(2)
115
115
  @buffer = ''
116
- self.context = case n
117
- when 'b' then :binary
118
- when 'o' then :octal
119
- when 'x' then :hexadecimal
120
- end
116
+ self.context = integer_context(n)
117
+ elsif c == '-' && n == '0' && (n2 = @str[@index + 2]) =~ /[box]/
118
+ traverse(3)
119
+ @buffer = '-'
120
+ self.context = integer_context(n2)
121
121
  else
122
122
  self.context = :decimal
123
- traverse(1)
124
123
  @buffer = c
124
+ traverse(1)
125
125
  end
126
126
  when '\\'
127
127
  t = Tokenizer.new(@str, @index + 1)
@@ -341,6 +341,20 @@ module KDL
341
341
  return parse_float(s) if s =~ /[.E]/i
342
342
 
343
343
  token(:INTEGER, Integer(munch_underscores(s), 10), format: '%d')
344
+ rescue
345
+ if s[0] =~ INITIAL_IDENTIFIER_CHARS && s[1..-1].each_char.all? { |c| c =~ IDENTIFIER_CHARS }
346
+ token(:IDENT, s)
347
+ else
348
+ raise
349
+ end
350
+ end
351
+
352
+ def integer_context(n)
353
+ case n
354
+ when 'b' then :binary
355
+ when 'o' then :octal
356
+ when 'x' then :hexadecimal
357
+ end
344
358
  end
345
359
 
346
360
  def parse_float(s)
@@ -1,3 +1,5 @@
1
+ require 'uri'
2
+
1
3
  module KDL
2
4
  module Types
3
5
  class URLTemplate < Value
data/lib/kdl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module KDL
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kdl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danielle Smith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-16 00:00:00.000000000 Z
11
+ date: 2024-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: racc
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.2.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: bigdecimal
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.1.6
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.1.6
55
+ - !ruby/object:Gem::Dependency
56
+ name: base64
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.2.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.2.0
41
69
  description: Ruby implementation of the KDL Document Language Spec
42
70
  email:
43
71
  - danini@hey.com
@@ -97,7 +125,7 @@ metadata:
97
125
  homepage_uri: https://kdl.dev
98
126
  source_code_uri: https://github.com/danini-the-panini/kdl-rb
99
127
  changelog_uri: https://github.com/danini-the-panini/kdl-rb/releases
100
- post_install_message:
128
+ post_install_message:
101
129
  rdoc_options: []
102
130
  require_paths:
103
131
  - lib
@@ -105,15 +133,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
133
  requirements:
106
134
  - - ">="
107
135
  - !ruby/object:Gem::Version
108
- version: 2.4.0
136
+ version: 2.5.0
109
137
  required_rubygems_version: !ruby/object:Gem::Requirement
110
138
  requirements:
111
139
  - - ">="
112
140
  - !ruby/object:Gem::Version
113
141
  version: '0'
114
142
  requirements: []
115
- rubygems_version: 3.2.32
116
- signing_key:
143
+ rubygems_version: 3.5.3
144
+ signing_key:
117
145
  specification_version: 4
118
146
  summary: KDL Document Language
119
147
  test_files: []