this is the solution that I settled on:
Dir.chdir(@dashboard_path) do
klasses.collect do |klass|
stdout = `rake nodeclass:add name=#{klass.name}`
"adding class:#{klass.name}:#{stdout}"
end
end
lame :(
On Tue, Feb 22, 2011 at 5:02 PM, Dan Bode <[email protected]> wrote:
> Hi *,
>
> I am trying to write an interface for the Dashboard using Luke's #>puppet
> interface tool, but I was not sure how to proceed.
>
> I would prefer to make direct ruby calls in to the model to alter/query the
> database (I tried to use the RESTful interface, but I just could not figure
> out how/if it is as fully functional as direct API calls would be), but I am
> not sure how I can have code external to the Dashboard access classes from
> its model:
>
> I tried setting RUBYLIB=$DASHBOARD_HOME/app/models:$RUBYLIB, requiring
> 'node_class', but that is not sufficient, I need to be able to require
> rails, and use the current database settings for active record. How can I do
> this?
>
> -Dan
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.