From 73c750a1db58238269caa94b6e7925dc928654d8 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Mon, 31 Aug 2020 08:06:04 +0530 Subject: [PATCH] FEATURE: allow specifying platform name for platform specific gems (#10559) --- lib/plugin_gem.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/plugin_gem.rb b/lib/plugin_gem.rb index fe0e4cbb4b4..1ca1fd9176c 100644 --- a/lib/plugin_gem.rb +++ b/lib/plugin_gem.rb @@ -6,7 +6,9 @@ module PluginGem gems_path = File.dirname(path) + "/gems/#{RUBY_VERSION}" spec_path = gems_path + "/specifications" - spec_file = spec_path + "/#{name}-#{version}.gemspec" + spec_file = spec_path + "/#{name}-#{version}" + spec_file += "-#{opts[:platform]}" if opts[:platform] + spec_file += ".gemspec" unless File.exists? spec_file command = "gem install #{name} -v #{version} -i #{gems_path} --no-document --ignore-dependencies --no-user-install" if opts[:source]