ruby_header_parser 0.3.1 → 0.4.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/.rubocop.yml +4 -0
- data/CHANGELOG.md +11 -1
- data/CONFIG.md +1 -1
- data/config/{default.yml → default.yml.erb} +12 -0
- data/lib/ruby_header_parser/config.rb +2 -1
- data/lib/ruby_header_parser/parser.rb +3 -3
- data/lib/ruby_header_parser/version.rb +1 -1
- data/lib/ruby_header_parser.rb +1 -0
- data/rbs_collection.lock.yaml +14 -10
- data/rbs_collection.yaml +1 -0
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18f150713fc0d1334ffb208d791fa9ff2ff20d155dae7671ad29cd83eb8a6448
|
4
|
+
data.tar.gz: 0db140e9526aaee48755b54de304509c9a4d537265a03dde8f83aac1e7719701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41b2ae01ab34d8077b9dac631fa4279100dac43d2026ee3ea082fa40383a5807f77ab93b837e2dd6c518480b475175fcb9836e14a336d2ed3a7c1400afdee223
|
7
|
+
data.tar.gz: c572948aca695cc74cbf363f0bec001763b8b2fea8abeb9c691e3656cd521d687f25cc4fb05dd61a0e811fd65bc948f636ebcd6c6295de77e9825ecd0321ff31
|
data/.rubocop.yml
CHANGED
@@ -13,6 +13,10 @@ Layout/HashAlignment:
|
|
13
13
|
EnforcedColonStyle: table
|
14
14
|
EnforcedHashRocketStyle: table
|
15
15
|
|
16
|
+
Layout/LeadingCommentSpace:
|
17
|
+
AllowRBSInlineAnnotation: true
|
18
|
+
AllowSteepAnnotation: true
|
19
|
+
|
16
20
|
Layout/SpaceAroundOperators:
|
17
21
|
Exclude:
|
18
22
|
# Suppress line breaks in spec files (e.g `it { should xxxx }`, `its(:method) { should xxxx }` )
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## [Unreleased]
|
2
|
-
[full changelog](http://github.com/ruby-go-gem/ruby_header_parser/compare/v0.
|
2
|
+
[full changelog](http://github.com/ruby-go-gem/ruby_header_parser/compare/v0.4.1...main)
|
3
|
+
|
4
|
+
## [0.4.1](https://github.com/ruby-go-gem/ruby_header_parser/releases/tag/v0.4.1) - 2025-01-07
|
5
|
+
[full changelog](http://github.com/ruby-go-gem/ruby_header_parser/compare/v0.4.0...v0.4.1)
|
6
|
+
|
7
|
+
* Fix build error with Ruby 3.4 + GitHub Actions (Ubuntu 22.04) https://github.com/ruby-go-gem/ruby_header_parser/pull/30
|
8
|
+
|
9
|
+
## [0.4.0](https://github.com/ruby-go-gem/ruby_header_parser/releases/tag/v0.4.0) - 2025-01-07
|
10
|
+
[full changelog](http://github.com/ruby-go-gem/ruby_header_parser/compare/v0.3.1...v0.4.0)
|
11
|
+
|
12
|
+
* Exclude removed methods in Ruby 3.4 and support erb config file https://github.com/ruby-go-gem/ruby_header_parser/pull/29
|
3
13
|
|
4
14
|
## [0.3.1](https://github.com/ruby-go-gem/ruby_header_parser/releases/tag/v0.3.1) - 2024-12-15
|
5
15
|
[full changelog](http://github.com/ruby-go-gem/ruby_header_parser/compare/v0.3.0...v0.3.1)
|
data/CONFIG.md
CHANGED
@@ -45,7 +45,7 @@ enum:
|
|
45
45
|
```
|
46
46
|
|
47
47
|
## Full configuration file
|
48
|
-
[config/default.yml](config/default.yml) is used by https://github.com/ruby-go-gem/go-gem-wrapper to generate bindings for Go.
|
48
|
+
[config/default.yml.erb](config/default.yml.erb) is used by https://github.com/ruby-go-gem/go-gem-wrapper to generate bindings for Go.
|
49
49
|
|
50
50
|
## `function.include_name`, `struct.include_name`, `type.include_name`, `enum.include_name`
|
51
51
|
Return functions and structures that match the condition with a [RubyHeaderParser::Parser](lib/ruby_header_parser/parser.rb)
|
@@ -68,6 +68,18 @@ function:
|
|
68
68
|
# FIXME: Workaround for "undefined reference to `rb_class_descendants'" on GitHub Actions (Ubuntu 22.04)
|
69
69
|
- rb_class_descendants
|
70
70
|
|
71
|
+
<% if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create("3.4.0") %>
|
72
|
+
# Removed since ruby 3.4+
|
73
|
+
- rb_data_object_make
|
74
|
+
- rb_newobj
|
75
|
+
- rb_newobj_of
|
76
|
+
- rb_st_init_existing_table_with_size
|
77
|
+
- rb_st_replace
|
78
|
+
|
79
|
+
# FIXME: Workaround for "undefined reference to `rb_undefine_finalizer'" on GitHub Actions (Ubuntu 22.04)
|
80
|
+
- rb_undefine_finalizer
|
81
|
+
<% end %>
|
82
|
+
|
71
83
|
pointer_hint:
|
72
84
|
RSTRING_PTR:
|
73
85
|
self: raw
|
@@ -11,7 +11,8 @@ module RubyHeaderParser
|
|
11
11
|
#
|
12
12
|
# @note See [CONFIG.md](../file.CONFIG.html) for config file details
|
13
13
|
def initialize(config_file)
|
14
|
-
|
14
|
+
erb = File.read(config_file)
|
15
|
+
yaml = ERB.new(erb).result
|
15
16
|
@data = YAML.safe_load(yaml, aliases: true, permitted_classes: [Regexp])
|
16
17
|
end
|
17
18
|
|
@@ -30,7 +30,7 @@ module RubyHeaderParser
|
|
30
30
|
# @param include_paths [Array<String>]
|
31
31
|
# @param dist_preprocessed_header_file [String,nil] Destination path to the output of preprocessed ruby.h.
|
32
32
|
# (default: `"#{Dir.tmpdir}/ruby_preprocessed.h"`)
|
33
|
-
# @param config_file [String,nil] Path to config file (default: `config/default.yml`)
|
33
|
+
# @param config_file [String,nil] Path to config file (default: `config/default.yml.erb`)
|
34
34
|
#
|
35
35
|
# @note `dist_preprocessed_header_file` is used as the output destination for temporary files when the parser
|
36
36
|
# is executed
|
@@ -42,7 +42,7 @@ module RubyHeaderParser
|
|
42
42
|
@include_paths = include_paths
|
43
43
|
@dist_preprocessed_header_file = dist_preprocessed_header_file || File.join(Dir.tmpdir, "ruby_preprocessed.h")
|
44
44
|
|
45
|
-
config_file ||= File.expand_path("../../config/default.yml", __dir__.to_s)
|
45
|
+
config_file ||= File.expand_path("../../config/default.yml.erb", __dir__.to_s)
|
46
46
|
@config = Config.new(config_file)
|
47
47
|
end
|
48
48
|
|
@@ -94,7 +94,7 @@ module RubyHeaderParser
|
|
94
94
|
stdout = execute_ctags("--c-kinds=e --fields=+n")
|
95
95
|
|
96
96
|
# Workaround for Ruby::UnannotatedEmptyCollection on steep 1.9.0+
|
97
|
-
name_to_definition = {} #: Hash[String, RubyHeaderParser::EnumDefinition]
|
97
|
+
name_to_definition = {} #: Hash[String, RubyHeaderParser::EnumDefinition]
|
98
98
|
|
99
99
|
name_to_definitions =
|
100
100
|
stdout.each_line.with_object(name_to_definition) do |line, hash|
|
data/lib/ruby_header_parser.rb
CHANGED
data/rbs_collection.lock.yaml
CHANGED
@@ -6,7 +6,7 @@ gems:
|
|
6
6
|
source:
|
7
7
|
type: git
|
8
8
|
name: ruby/gem_rbs_collection
|
9
|
-
revision:
|
9
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
10
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
11
|
repo_dir: gems
|
12
12
|
- name: binding_of_caller
|
@@ -14,7 +14,7 @@ gems:
|
|
14
14
|
source:
|
15
15
|
type: git
|
16
16
|
name: ruby/gem_rbs_collection
|
17
|
-
revision:
|
17
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
18
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
19
19
|
repo_dir: gems
|
20
20
|
- name: dbm
|
@@ -26,9 +26,13 @@ gems:
|
|
26
26
|
source:
|
27
27
|
type: git
|
28
28
|
name: ruby/gem_rbs_collection
|
29
|
-
revision:
|
29
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
30
30
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
31
31
|
repo_dir: gems
|
32
|
+
- name: erb
|
33
|
+
version: '0'
|
34
|
+
source:
|
35
|
+
type: stdlib
|
32
36
|
- name: fileutils
|
33
37
|
version: '0'
|
34
38
|
source:
|
@@ -42,7 +46,7 @@ gems:
|
|
42
46
|
source:
|
43
47
|
type: git
|
44
48
|
name: ruby/gem_rbs_collection
|
45
|
-
revision:
|
49
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
46
50
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
47
51
|
repo_dir: gems
|
48
52
|
- name: parser
|
@@ -50,7 +54,7 @@ gems:
|
|
50
54
|
source:
|
51
55
|
type: git
|
52
56
|
name: ruby/gem_rbs_collection
|
53
|
-
revision:
|
57
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
54
58
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
55
59
|
repo_dir: gems
|
56
60
|
- name: pstore
|
@@ -66,7 +70,7 @@ gems:
|
|
66
70
|
source:
|
67
71
|
type: git
|
68
72
|
name: ruby/gem_rbs_collection
|
69
|
-
revision:
|
73
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
70
74
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
71
75
|
repo_dir: gems
|
72
76
|
- name: rake
|
@@ -74,7 +78,7 @@ gems:
|
|
74
78
|
source:
|
75
79
|
type: git
|
76
80
|
name: ruby/gem_rbs_collection
|
77
|
-
revision:
|
81
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
78
82
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
79
83
|
repo_dir: gems
|
80
84
|
- name: regexp_parser
|
@@ -82,7 +86,7 @@ gems:
|
|
82
86
|
source:
|
83
87
|
type: git
|
84
88
|
name: ruby/gem_rbs_collection
|
85
|
-
revision:
|
89
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
86
90
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
87
91
|
repo_dir: gems
|
88
92
|
- name: rspec-parameterized-core
|
@@ -98,7 +102,7 @@ gems:
|
|
98
102
|
source:
|
99
103
|
type: git
|
100
104
|
name: ruby/gem_rbs_collection
|
101
|
-
revision:
|
105
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
102
106
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
103
107
|
repo_dir: gems
|
104
108
|
- name: rubocop-ast
|
@@ -106,7 +110,7 @@ gems:
|
|
106
110
|
source:
|
107
111
|
type: git
|
108
112
|
name: ruby/gem_rbs_collection
|
109
|
-
revision:
|
113
|
+
revision: '09beb2100db10cbf4773ed0e71ddf79280a2f275'
|
110
114
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
111
115
|
repo_dir: gems
|
112
116
|
- name: tmpdir
|
data/rbs_collection.yaml
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_header_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-06 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rake
|
@@ -166,7 +165,7 @@ files:
|
|
166
165
|
- README.md
|
167
166
|
- Rakefile
|
168
167
|
- Steepfile
|
169
|
-
- config/default.yml
|
168
|
+
- config/default.yml.erb
|
170
169
|
- lib/ruby_header_parser.rb
|
171
170
|
- lib/ruby_header_parser/argument_definition.rb
|
172
171
|
- lib/ruby_header_parser/config.rb
|
@@ -199,7 +198,6 @@ metadata:
|
|
199
198
|
changelog_uri: https://github.com/ruby-go-gem/ruby_header_parser/blob/main/CHANGELOG.md
|
200
199
|
documentation_uri: https://ruby-go-gem.github.io/ruby_header_parser/
|
201
200
|
rubygems_mfa_required: 'true'
|
202
|
-
post_install_message:
|
203
201
|
rdoc_options: []
|
204
202
|
require_paths:
|
205
203
|
- lib
|
@@ -214,8 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
212
|
- !ruby/object:Gem::Version
|
215
213
|
version: '0'
|
216
214
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
218
|
-
signing_key:
|
215
|
+
rubygems_version: 3.6.2
|
219
216
|
specification_version: 4
|
220
217
|
summary: Parser for ruby.h
|
221
218
|
test_files: []
|