From 48a9cc2a9adce08a09fe52feaedafc4e010b6767 Mon Sep 17 00:00:00 2001 From: Jeff McCune Date: Mon, 20 Aug 2012 15:25:22 -0700 Subject: [PATCH] (#15464) Exclude gem command from bundler This patch simply excludes the `gem` command from the dependency handling of Bundler with the `rubygems-bundler` gem installed. This patch also updates the README to describe the resolution to the spec test failures we've been seeing when Puppet contains a Gemfile in the project root. To summarize: Use of RVM is considered dangerous We're able to work around the problem, but the hijacking of shell builtin commands is a maintenance burden we're not willing to shoulder, hence RVM being considered a dangerous tool. --- .noexec.yaml | 1 + README_DEVELOPER.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.noexec.yaml b/.noexec.yaml index dd4203d521b..0e0b0206b8a 100644 --- a/.noexec.yaml +++ b/.noexec.yaml @@ -1,4 +1,5 @@ --- exclude: + - gem - rake - rspec diff --git a/README_DEVELOPER.md b/README_DEVELOPER.md index 21ae9a02aae..796af989eb9 100644 --- a/README_DEVELOPER.md +++ b/README_DEVELOPER.md @@ -3,6 +3,28 @@ This file is intended to provide a place for developers and contributors to document what other developers need to know about changes made to Puppet. +# Use of RVM considered dangerous # + +Use of RVM in production situations, e.g. running CI tests against this +repository, is considered dangerous. The reason we consider RVM to be +dangerous is because the default behavior of RVM is to hijack the builtin +behavior of the shell, causing Gemfile files to be loaded and evaluated when +the shell changes directories into the project root. + +This behavior causes the CI Job execution environment that runs with `set -e` +to be incompatible with RVM. + +We work around this issue by disabling the per-project RC file parsing using + + if ! grep -qx rvm_project_rvmrc=0 ~/.rvmrc; then + echo rvm_project_rvmrc=0 >> ~/.rvmrc + fi + +When we setup CI nodes, but this is not standard or expected behavior. + +Please consider rbenv instead of rvm. The default behavior of rvm is difficult +to maintain with `set -e` shell environments. + # Dependencies # Puppet is considered an Application as it relates to the recommendation of