Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Environment Isolation #162

Closed
joshperry opened this issue Sep 17, 2020 · 1 comment · Fixed by #163
Closed

Support Environment Isolation #162

joshperry opened this issue Sep 17, 2020 · 1 comment · Fixed by #163

Comments

@joshperry
Copy link

Errors are generated when trying to enable environment isolation while using this module.

$ puppet generate types --environment pgproxy_update
Error: /srv/puppetmaster/current/environments/pgproxy_update/modules/rvm/lib/puppet/type/rvm_gem.rb: title patterns that use procs are not supported.
Error: /srv/puppetmaster/current/environments/pgproxy_update/modules/rvm/lib/puppet/type/rvm_gemset.rb: title patterns that use procs are not supported.

I'm attempting this change, similar to puppetlabs/puppetlabs-java_ks@3526d1c

diff --git a/modules/rvm/lib/puppet/type/rvm_gem.rb b/modules/rvm/lib/puppet/type/rvm_gem.rb
index 34b785317b..c1fcd3aa45 100644
--- a/modules/rvm/lib/puppet/type/rvm_gem.rb
+++ b/modules/rvm/lib/puppet/type/rvm_gem.rb
@@ -2,7 +2,7 @@ Puppet::Type.newtype(:rvm_gem) do
   @doc = "Ruby Gem support using RVM."
 
   def self.title_patterns
-    [ [ /^(?:(.*)\/)?(.*)$/, [ [ :ruby_version, lambda{|x| x} ], [ :name, lambda{|x| x} ] ] ] ]
+    [ [ /^(?:(.*)\/)?(.*)$/, [ [ :ruby_version ], [ :name ] ] ] ]
   end
 
   ensurable do
diff --git a/modules/rvm/lib/puppet/type/rvm_gemset.rb b/modules/rvm/lib/puppet/type/rvm_gemset.rb
index 4062946b18..8d8987deb0 100644
--- a/modules/rvm/lib/puppet/type/rvm_gemset.rb
+++ b/modules/rvm/lib/puppet/type/rvm_gemset.rb
@@ -2,7 +2,7 @@ Puppet::Type.newtype(:rvm_gemset) do
   @doc = "Manage RVM Gemsets."
 
   def self.title_patterns
-    [ [ /^(?:(.*)@)?(.*)$/, [ [ :ruby_version, lambda{|x| x} ], [ :name, lambda{|x| x} ] ] ] ]
+    [ [ /^(?:(.*)@)?(.*)$/, [ [ :ruby_version ], [ :name ] ] ] ]
   end
 
   ensurable
@ekohl
Copy link
Member

ekohl commented Jul 6, 2022

Should be resolved via #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants