sfu-rcg / foreman_host_overview

Modifies the properties table for all hosts in the Foreman
GNU General Public License v3.0
4 stars 2 forks source link

1.9.3 support #4

Open logicminds opened 9 years ago

logicminds commented 9 years ago

Why is ruby 2.0+ only supported?

Ginja commented 9 years ago

Because prepend is used:

https://github.com/sfu-rcg/foreman_host_overview/blob/master/lib/foreman_host_overview/engine.rb#L18

And I used it to ensure that this plugin's overview_fields method (/app/helpers/concerns/foreman_host_overview/hosts_helper_extensions.rb) would be used instead of the original.

logicminds commented 9 years ago

Isn't the default foreman install using SCL ruby 1.9.3? So this plugin would not work for the majority of foreman users. Anyways we can make this work with 1.9.3? I am not sure what prepend is or does.

This plugin is exactly what I need but I am not able to use it until the official foreman installer installs ruby 2.0.

Ginja commented 9 years ago

I wasn't able to get it to work on Ruby 1.9.3 the way I wanted to without really ugly hacks. I'd welcome a pull request though.

It was suggested to me that https://github.com/GregSutcliffe/foreman_column_view could be used to achieve what this plugin does.

prepend simply modifies the ancestor chain so that my plugin's overview_field method comes before The Foreman's.

logicminds commented 9 years ago

Found this great article detailing the usage.

http://gshutler.com/2013/04/ruby-2-module-prepend/

If I find time I'll make a PR. (doubtful...). Futhermore, maybe its only a matter of time till Foreman goes to ruby 2.0 anyways.

Ginja commented 9 years ago

Also, you could try using my puppet_stack module to bring up a Foreman server using Ruby 2.0.0:

https://github.com/Ginja/puppet_stack

/end shamless self plug

lawre commented 9 years ago

I was excited to learn of this plugin... until I saw the requirement for Ruby 2.0.0. My hope is that someday Foreman will be released with official support for the required Ruby version.

tek0011 commented 8 years ago

yep, sure would be nice if it support < 2.0.0

Ginja commented 8 years ago

@tek0011 At this time I have no plans to support anything < 2.0.0. My suggestion is to look into using RVM (or chruby) to deploy Foreman (installing from source, of course). This has several benefits: