diff options
author | Graham Marlow <graham@onesignal.com> | 2023-09-29 09:37:39 -0700 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-02 01:34:01 +0000 |
commit | f3aea74c3d63a9b1e0f597b060bf84c14d1c70fc (patch) | |
tree | 02653de5f88c6cd1c1c7766376059076714bd5fd /lib/bundler/templates | |
parent | 1ed6fd899769e6cd66a1a3f66b7818d48ba4231b (diff) |
[rubygems/rubygems] Include gemspec in ExtensionTask for native gem tasks
https://github.com/rubygems/rubygems/commit/042cfb7007
Diffstat (limited to 'lib/bundler/templates')
-rw-r--r-- | lib/bundler/templates/newgem/Rakefile.tt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/templates/newgem/Rakefile.tt b/lib/bundler/templates/newgem/Rakefile.tt index b5a5c4e392..77f8a02530 100644 --- a/lib/bundler/templates/newgem/Rakefile.tt +++ b/lib/bundler/templates/newgem/Rakefile.tt @@ -46,7 +46,9 @@ require "rb_sys/extensiontask" task build: :compile -RbSys::ExtensionTask.new(<%= config[:name].inspect %>) do |ext| +GEMSPEC = Gem::Specification.load("<%= config[:underscored_name] %>.gemspec") + +RbSys::ExtensionTask.new(<%= config[:name].inspect %>, GEMSPEC) do |ext| ext.lib_dir = "lib/<%= config[:namespaced_path] %>" end <% else -%> @@ -54,7 +56,9 @@ require "rake/extensiontask" task build: :compile -Rake::ExtensionTask.new("<%= config[:underscored_name] %>") do |ext| +GEMSPEC = Gem::Specification.load("<%= config[:underscored_name] %>.gemspec") + +Rake::ExtensionTask.new("<%= config[:underscored_name] %>", GEMSPEC) do |ext| ext.lib_dir = "lib/<%= config[:namespaced_path] %>" end <% end -%> |