summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-04-17 09:34:29 -0700
committerJohn Keiser <john@johnkeiser.com>2016-04-18 14:21:02 -0700
commit01cf3ef2a85d3190b0bd46835ff6ae37f830764a (patch)
treeb15fc1934d56c4449101b10d074b72e26a4884e3 /Gemfile
parent31f9ada8660a2831204aca436e343b6a10b103cd (diff)
downloadchef-01cf3ef2a85d3190b0bd46835ff6ae37f830764a.tar.gz
Remove Gemfile.windows and put both platforms in Gemfile.lock
Diffstat (limited to 'Gemfile')
-rw-r--r--Gemfile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Gemfile b/Gemfile
index 9099f6c4cb..ab1b5d11f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,18 @@ require_relative "tasks/gemfile_util"
extend GemfileUtil
source "https://rubygems.org"
-gemspec name: ($chef_platform ? "chef-#{$chef_platform}" : "chef")
+
+# Pick the gemspec for our platform
+gemspec_name = "chef"
+Dir.glob("chef-*.gemspec").each do |gemspec_filename|
+ gemspec_filename =~ /^chef-(.+).gemspec/
+ gemspec_platform = $1
+ if Gem::Platform.match(Gem::Platform.new(gemspec_platform))
+ Bundler.ui.info "Using gemspec #{gemspec_filename} for current platform."
+ gemspec_name = "chef-#{gemspec_platform}"
+ end
+end
+gemspec name: gemspec_name
gem "activesupport", "< 4.0.0", group: :compat_testing, platform: "ruby"
gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))