-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fixes #14460 - Add ability to use local Gemfiles #14
Fixes #14460 - Add ability to use local Gemfiles #14
Conversation
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project. More guidelines are available on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
Oops, sorry, looks like we did turn on redmine issues for the repo. @cpeters Can you file one please? |
@stbenjam Updated |
Shouldn't we do the same as Foreman and Smart Proxy and read a They seem to do it this way: Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle|
self.instance_eval(Bundler.read_file(bundle))
end |
@stbenjam The hammer cli plugins do it with a Gemfile.local file. https://github.com/theforeman/hammer-cli-foreman-discovery/blob/master/Gemfile#L18-L19 I'm not opposed to doing it with bundler.d similar to Foreman |
Ok cool, how about Foreman's style then? |
+1 for Foreman style |
@stbenjam @shlomizadok Updated |
Oh, See packaging: https://github.com/theforeman/foreman-packaging/blob/rpm/develop/rubygem-smart_proxy_dynflow/rubygem-smart_proxy_dynflow.spec#L63 So I'm not sure, maybe we should adopt the hammer style. |
Yeah. I tried modifying the gemspec, removing the bundler.d from gem.files and still ran into a bundler issue. I also tried creating a bundler.d/smart-proxy-local.rb file and having the gemspec include it but it still fetched smart-proxy from upstream despite me pointing to a downstream git repo. |
The packaging gets it from the gem, so it needs to stay. |
@stbenjam Ok; back to the original with pulling Gemfile.local into the Gemfile. |
Looks good to me, thanks! Will merge tomorrow, just want to give the others on @theforeman/remote-execution a chance to make sure it's ok for them. |
@@ -6,3 +6,7 @@ group :development do | |||
gem 'smart_proxy', :git => "https://github.com/theforeman/smart-proxy", :branch => "develop" | |||
gem 'pry' | |||
end | |||
|
|||
# load local gemfile | |||
local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bikesheding: Gemfile.local.rb
would be better, as editors recognize it's a ruby source.
Also adding it to .gitignore
would make sense here
Thanks @stbenjam for waiting :) |
@iNecas Updated |
👍 |
I was inclined to also make the Anyway, it's the right solution. I opened a RM against hammer. http://projects.theforeman.org/issues/14466 |
No description provided.