From 9b64dd539fb1ee094408a5b65ad521621cd04893 Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Thu, 3 Oct 2019 16:02:50 -0400 Subject: [PATCH] Implement "bare" environment type This type has no content besides environment-attached modules --- lib/r10k/environment.rb | 1 + lib/r10k/environment/bare.rb | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 lib/r10k/environment/bare.rb diff --git a/lib/r10k/environment.rb b/lib/r10k/environment.rb index b18bdc586..5acd31231 100644 --- a/lib/r10k/environment.rb +++ b/lib/r10k/environment.rb @@ -30,6 +30,7 @@ def self.from_hash(name, hash) require 'r10k/environment/base' require 'r10k/environment/with_modules' + require 'r10k/environment/bare' require 'r10k/environment/git' require 'r10k/environment/svn' end diff --git a/lib/r10k/environment/bare.rb b/lib/r10k/environment/bare.rb new file mode 100644 index 000000000..e33ef2de4 --- /dev/null +++ b/lib/r10k/environment/bare.rb @@ -0,0 +1,16 @@ +class R10K::Environment::Bare < R10K::Environment::WithModules + + R10K::Environment.register(:bare, self) + + def sync + true + end + + def status + :not_applicable + end + + def signature + 'bare-default' + end +end