ruby_header_parser 0.3.1 → 0.4.1

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: a3cb911b5f0dc841a7328c6c3b53fa3675da1354da43b46160cb3d6a1b1776a0
4
- data.tar.gz: 16aae2bb9c95bebce91a54345a2acd13df16690e2a78db77ffb3ca8255387b04
3
+ metadata.gz: 18f150713fc0d1334ffb208d791fa9ff2ff20d155dae7671ad29cd83eb8a6448
4
+ data.tar.gz: 0db140e9526aaee48755b54de304509c9a4d537265a03dde8f83aac1e7719701
5
5
  SHA512:
6
- metadata.gz: ccd4722f2e50eadc3cc001e8554e811c14b435208b6e8a1bdfd44b2e000e3f90c662633cd8320f5861e4731ffb436d97e18cfd27a3eb0b9b6c7b6909eccedd73
7
- data.tar.gz: 8208e18c41cd8ad0f98a47cd229790e2eb49b016701cf6e932e8a4ecd47d59cdaf8a3153cce330d914ec760a0a05986fa0504ee72ad7cbf6db42ec5e7e0f716b
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.3.1...main)
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
- yaml = File.read(config_file)
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] # rubocop:disable Layout/LeadingCommentSpace
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyHeaderParser
4
- VERSION = "0.3.1"
4
+ VERSION = "0.4.1"
5
5
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "yaml"
4
4
  require "tmpdir"
5
+ require "erb"
5
6
 
6
7
  require_relative "ruby_header_parser/version"
7
8
 
@@ -6,7 +6,7 @@ gems:
6
6
  source:
7
7
  type: git
8
8
  name: ruby/gem_rbs_collection
9
- revision: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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: 0a6ea105a0afc7eaee4494585a7775f47eea6145
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
@@ -25,3 +25,4 @@ gems:
25
25
 
26
26
  - name: yaml
27
27
  - name: tmpdir
28
+ - name: erb
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.3.1
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: 2024-12-15 00:00:00.000000000 Z
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.5.16
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: []