summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
Diffstat (limited to 'Gemfile')
-rw-r--r--Gemfile17
1 files changed, 6 insertions, 11 deletions
diff --git a/Gemfile b/Gemfile
index 803e1115d5..c20549012c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,17 +4,12 @@ extend GemfileUtil
source "https://rubygems.org"
-# 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
+# Note we do not use the gemspec DSL which restricts to the
+# gemspec for the current platform and filters out other platforms
+# during a bundle lock operation. We actually want dependencies from
+# both of our gemspecs. Also note this this mimics gemspec behavior
+# of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed)
+gem "chef", path: "."
gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
# Ensure that we can always install rake, regardless of gem groups