-
Notifications
You must be signed in to change notification settings - Fork 17
Support both puppet and openvox gem names #67
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
base: main
Are you sure you want to change the base?
Conversation
works fine:
|
@ekohl should we merge this, and afterwards I update the release action to publish the puppet gem also to the github registry? |
mhm
|
Does it maybe make more sense to move the second gemspec into another directory? Then we don't need to always specificy the gemspec we're using. |
Ah it's not that complicated: diff --git a/Gemfile b/Gemfile
index 5fa0ec958f..828a132282 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
-gemspec
+gemspec name: 'openvox'
def location_for(place, fake_version = nil)
if place.is_a?(String) && place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/ This tells bundler/Gemfile to use the openvox.gemspec With that, bundle works:
|
I tested it with one of our modules and that doesn't work: diff --git a/Gemfile b/Gemfile
index ea079b0..5b29f61 100644
--- a/Gemfile
+++ b/Gemfile
@@ -27,6 +27,7 @@ gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"]
-gem 'puppet', puppetversion, :require => false, :groups => [:test]
+#gem 'puppet', puppetversion, :require => false, :groups => [:test]
+gem 'puppet', github: 'ekohl/puppet', branch: 'add-legacy-gemspec'
# vim: syntax=ruby $ bundle update
Fetching https://github.com/ekohl/puppet.git
Fetching gem metadata from https://rubygems.org/.......
Could not find gem 'puppet' in https://github.com/ekohl/puppet.git (at add-legacy-gemspec@bc5056b). I assume we wirst need to publish them gem |
It works locally with I'm not sure why this fails now. |
Spoke too soon: https://bundler.io/guides/git.html says there's gem 'puppet', :github => 'ekohl/puppet', :branch => 'add-legacy-gemspec', :glob => 'puppet.gemspec' |
yes we don't have to. But I think it would be nice for users from a convenience point of view. |
This uses the filename to determine the gem name. This allows users to choose: gem 'puppet', github: 'OpenVoxProject/puppet' Or use the new openvox gem gem 'openvox', github: 'OpenVoxProject/puppet' At some point they can start to diverge and make puppet more of a transitional gem that only depends on openvox.
I agree. Switching over is easier. |
This uses the filename to determine the gem name. This allows users to choose:
Or use the new openvox gem:
At some point they can start to diverge and make puppet more of a transitional gem that only depends on openvox.
Currently untested, but this allows for discussion.