Skip to content

Commit e2abf04

Browse files
authored
Merge pull request #215 from ruby-go-gem/feature/steep_target
Add rbs to `go_gem` gem
2 parents 8ac1eb0 + 58ceacc commit e2abf04

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

Steepfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ target :lib do
66
signature "ruby/testdata/example/sig"
77
signature "_gem/sig"
88

9-
check "ruby/testdata/example/lib" # Directory name
9+
check "ruby/testdata/example/lib"
10+
check "_gem/lib"
11+
1012
# check "Gemfile" # File name
1113
# check "app/models/**/*.rb" # Glob
1214
# ignore "lib/templates/*.rb"

_gem/go_gem.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
2626
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
2727
ls.readlines("\x0", chomp: true).reject do |f|
2828
(f == gemspec) ||
29-
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
29+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile sig/non-gemify/])
3030
end
3131
end
3232
spec.bindir = "exe"

_gem/lib/go_gem/mkmf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def $objs.empty?; false; end
2626

2727
create_makefile(target, srcprefix)
2828

29-
case `#{CONFIG["CC"]} --version` # rubocop:disable Lint/LiteralAsCondition
29+
case `#{RbConfig::CONFIG["CC"]} --version` # rubocop:disable Lint/LiteralAsCondition
3030
when /Free Software Foundation/
3131
ldflags = "-Wl,--unresolved-symbols=ignore-all"
3232
when /clang/

_gem/sig/go_gem.rbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module GoGem
22
VERSION: String
3+
4+
class Error < StandardError
5+
end
6+
37
# See the writing guide of rbs: https://github.com/ruby/rbs#guides
48
end

_gem/sig/go_gem/mkmf.rbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module GoGem
22
module Mkmf
3-
def create_go_makefile: (String, String? nil) -> void
3+
$objs: Array[untyped]
4+
5+
def create_go_makefile: (String target, String? srcprefix) -> void
46
end
57
end

_gem/sig/non-gemify/mkmf.rbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Kernel
2+
def include: (*untyped) -> void
3+
4+
def find_executable: (String bin, ?String path) -> String?
5+
6+
def create_makefile: (String target, String? srcprefix) -> void
7+
end

0 commit comments

Comments
 (0)