Skip to content

Commit 92eb179

Browse files
committed
Move to config/default.yml
1 parent 448015a commit 92eb179

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
File renamed without changes.

lib/ruby_header_parser/data.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# frozen_string_literal: true
22

33
module RubyHeaderParser
4-
# Manager for `data.yml`
4+
# Manager for config file
55
class Data
66
# @!attribute [r] data
77
# @return [Hash]
88
attr_reader :data
99

1010
def initialize
11-
yaml = File.read(File.join(__dir__.to_s, "data.yml"))
11+
yaml = File.read(File.join(__dir__.to_s, "..", "..", "config", "default.yml"))
1212
@data = YAML.safe_load(yaml, aliases: true, permitted_classes: [Regexp])
1313
end
1414

spec/ruby_header_parser/data_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
describe "#function_arg_pointer_hint" do
77
subject { data.function_arg_pointer_hint(function_name:, pos:) }
88

9-
context "found in data.yml" do
9+
context "found in config/default.yml" do
1010
let(:function_name) { "rb_funcallv" }
1111
let(:pos) { 4 }
1212

1313
it { should eq :array }
1414
end
1515

16-
context "not found in data.yml" do
16+
context "not found in config/default.yml" do
1717
let(:function_name) { "rb_funcallv" }
1818
let(:pos) { 5 }
1919

@@ -24,13 +24,13 @@
2424
describe "#function_self_pointer_hint" do
2525
subject { data.function_self_pointer_hint(function_name) }
2626

27-
context "found in data.yml" do
27+
context "found in default.yml" do
2828
let(:function_name) { "RSTRING_PTR" }
2929

3030
it { should eq :raw }
3131
end
3232

33-
context "not found in data.yml" do
33+
context "not found in config/default.yml" do
3434
let(:function_name) { "rb_class2name" }
3535

3636
it { should eq :ref }

0 commit comments

Comments
 (0)