aam-ruby 2.3.0 → 2.5.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.
- checksums.yaml +4 -4
- data/CREDITS.html +1 -1
- data/lib/aam_rb.rb +50 -0
- data/lib/aam_ruby.so +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 638ed591e1ae9ae727709626c36ce4ef7897c0b53b09634d1c35cf01d4a1b1ff
|
|
4
|
+
data.tar.gz: 8beeb4321a72f52b09be1fe694b86f4dbb2a09f8d91bd454c9a2d2c32cb9ea72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9a3842abafa064650e605b5769c6931c3be9732d96fadfdac145f0197a88213683a1ab6b89bf924831c07a240770f347eb52a86a2486ddbf943ca99993297ff
|
|
7
|
+
data.tar.gz: 90ac9c945610b68f7d192baa9c2ec6a6f53f0b54a6a667b11ff9eb20a612428f29bb1524c5bed516647aecdd4910d57d83a43e19c4142dcc84bdcf84578af97c
|
data/CREDITS.html
CHANGED
|
@@ -487,7 +487,7 @@ SOFTWARE.
|
|
|
487
487
|
<h3 id="MIT">MIT License</h3>
|
|
488
488
|
<h4>Used by:</h4>
|
|
489
489
|
<ul class="license-used-by">
|
|
490
|
-
<li><a href=" https://github.com/INiNiDS/aam-rs/ ">aam-rs 2.
|
|
490
|
+
<li><a href=" https://github.com/INiNiDS/aam-rs/ ">aam-rs 2.5.1</a>
|
|
491
491
|
</li>
|
|
492
492
|
</ul>
|
|
493
493
|
<pre class="license-text">MIT License
|
data/lib/aam_rb.rb
CHANGED
|
@@ -10,3 +10,53 @@ rescue LoadError
|
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
module AamRb
|
|
14
|
+
module_function
|
|
15
|
+
|
|
16
|
+
def split_aam(content)
|
|
17
|
+
result = {}
|
|
18
|
+
current_name = nil
|
|
19
|
+
current_builder = nil
|
|
20
|
+
|
|
21
|
+
content.each_line do |raw_line|
|
|
22
|
+
line = raw_line.strip
|
|
23
|
+
next if line.empty?
|
|
24
|
+
|
|
25
|
+
header = parse_section_header(line)
|
|
26
|
+
if header
|
|
27
|
+
result[current_name] = current_builder if current_name && current_builder
|
|
28
|
+
current_name = header
|
|
29
|
+
current_builder = AAMBuilder.new
|
|
30
|
+
next
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
next unless current_name && current_builder
|
|
34
|
+
|
|
35
|
+
assignment = parse_assignment(line)
|
|
36
|
+
current_builder.add_line(*assignment) if assignment
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
result[current_name] = current_builder if current_name && current_builder
|
|
40
|
+
result
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def parse_section_header(line)
|
|
44
|
+
return nil unless line.start_with?('#')
|
|
45
|
+
|
|
46
|
+
rest = line[1..].strip
|
|
47
|
+
rest.end_with?('.aam') ? rest : nil
|
|
48
|
+
end
|
|
49
|
+
private_class_method :parse_section_header
|
|
50
|
+
|
|
51
|
+
def parse_assignment(line)
|
|
52
|
+
key, value = line.split('=', 2)
|
|
53
|
+
return nil unless value
|
|
54
|
+
|
|
55
|
+
key = key.strip
|
|
56
|
+
return nil if key.empty?
|
|
57
|
+
|
|
58
|
+
[key, value.strip]
|
|
59
|
+
end
|
|
60
|
+
private_class_method :parse_assignment
|
|
61
|
+
end
|
|
62
|
+
|
data/lib/aam_ruby.so
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aam-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- INiNiDS
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Ruby bindings for the aam-rs AAML parser built with Rust and magnus.
|
|
14
14
|
email:
|