New gems in plugin

Hi Foreman Dev,

We have developed one rails application based on Foreman APIs and that
application is used to deploy platforms(with multiple hosts). Now we wanted
to convert it to foreman plugin and use that feature from foreman
application. Here my application using some other gems like
"delayed_job_active_record", "daemons", "paperclip" etc. My question is how
to include these gems in foreman plugin? Is there any plugin exists like
this scenario ? Please suggest

Thanks in advance
Nagarjuna

Typically you specify these as dependencies in the plugin gemspec, e.g.

A plugin is a gem itself, so can depend on others. When installing your
plugin gem, any dependencies that are defined will also be installed.

This does make it harder to package as an RPM or deb, so it's good to
minimise or at least re-use common dependencies.

··· On 12/01/15 11:39, Nagarjuna Rachaneni wrote: > Hi Foreman Dev, > > We have developed one rails application based on Foreman APIs and that > application is used to deploy platforms(with multiple hosts). Now we > wanted to convert it to foreman plugin and use that feature from foreman > application. Here my application using some other gems like > "delayed_job_active_record", "daemons", "paperclip" etc. My question is > how to include these gems in foreman plugin? Is there any plugin exists > like this scenario ? Please suggest


Dominic Cleal
Red Hat Engineering

Hi Dominic Cleal,

Thanks for your reply, So when i add "delayed_job_active_record",
"daemons", "paperclip" gems as dependencies in the gem spec and install RPM
package, will it install these gems also ?

Regards,
Nagarjuna

··· On Monday, 12 January 2015 17:13:12 UTC+5:30, Dominic Cleal wrote: > > On 12/01/15 11:39, Nagarjuna Rachaneni wrote: > > Hi Foreman Dev, > > > > We have developed one rails application based on Foreman APIs and that > > application is used to deploy platforms(with multiple hosts). Now we > > wanted to convert it to foreman plugin and use that feature from foreman > > application. Here my application using some other gems like > > "delayed_job_active_record", "daemons", "paperclip" etc. My question is > > how to include these gems in foreman plugin? Is there any plugin exists > > like this scenario ? Please suggest > > Typically you specify these as dependencies in the plugin gemspec, e.g. > > > https://github.com/theforeman/foreman-docker/blob/master/foreman_docker.gemspec#L21 > > A plugin is a gem itself, so can depend on others. When installing your > plugin gem, any dependencies that are defined will also be installed. > > This does make it harder to package as an RPM or deb, so it's good to > minimise or at least re-use common dependencies. > > -- > Dominic Cleal > Red Hat Engineering >

If you install it via a gem install (for source or Debian installs) then
it will install those dependencies, but to package the plugin as an RPM
then you need to package those gems as RPMs too.

As an example, foreman_docker depends on docker-api and so it's
specified in the gemspec, which ensures it's installed:

Plus we have both foreman_docker and docker-api RPMs, and the
foreman_docker one depends on the latter:

https://github.com/theforeman/foreman-packaging/tree/rpm/develop/rubygem-foreman_docker
https://github.com/theforeman/foreman-packaging/tree/rpm/develop/rubygem-docker-api

··· -- Dominic Cleal Red Hat Engineering

On 11/03/15 05:25, Nagarjuna Rachaneni wrote:

Hi Dominic Cleal,

Thanks for your reply, So when i add “delayed_job_active_record”,
“daemons”, “paperclip” gems as dependencies in the gem spec and install
RPM package, will it install these gems also ?

Regards,
Nagarjuna

On Monday, 12 January 2015 17:13:12 UTC+5:30, Dominic Cleal wrote:

On 12/01/15 11:39, Nagarjuna Rachaneni wrote:
> Hi Foreman Dev,
>
> We have developed one rails application based on Foreman APIs and
that
> application is used to deploy platforms(with multiple hosts). Now we
> wanted to convert it to foreman plugin and use that feature from
foreman
> application. Here my application using some other gems like
> "delayed_job_active_record", "daemons", "paperclip" etc. My
question is
> how to include these gems in foreman plugin? Is there any plugin
exists
> like this scenario ? Please suggest

Typically you specify these as dependencies in the plugin gemspec, e.g.

https://github.com/theforeman/foreman-docker/blob/master/foreman_docker.gemspec#L21
<https://github.com/theforeman/foreman-docker/blob/master/foreman_docker.gemspec#L21>


A plugin is a gem itself, so can depend on others.  When installing
your
plugin gem, any dependencies that are defined will also be installed.

This does make it harder to package as an RPM or deb, so it's good to
minimise or at least re-use common dependencies.

-- 
Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google
Groups “foreman-dev” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-dev+unsubscribe@googlegroups.com
mailto:foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.