elliottg
2009-Sep-21 04:57 UTC
Integration of rake tasks and shell commands with Rails generators?
Just starting to learn about rake and Rails generators... I have a couple Qs I have yet to find answers to. 1. Can shell commands somehow be called from a generator''s manifest method? If so, is that poor form? 2. Can rake tasks be called from a generator''s manifest method? Thanks heaps, Elliott
elliottg
2009-Sep-22 14:39 UTC
Re: Integration of rake tasks and shell commands with Rails generators?
Any thoughts on this one? Thanks, Elliott On Sep 21, 12:57 am, elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote:> Just starting to learn about rake and Rails generators... I have a > couple Qs I have yet to find answers to. > > 1. Can shell commands somehow be called from a generator''s manifest > method? If so, is that poor form? > 2. Can rake tasks be called from a generator''s manifest method? > > Thanks heaps, Elliott
elliottg
2009-Sep-24 21:33 UTC
Re: Integration of rake tasks and shell commands with Rails generators?
I found the syntax that makes shell calls from Ruby... example_shell_command = `gem list` puts example_shell_command Elliott On Sep 22, 10:39 am, elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote:> Any thoughts on this one? > > Thanks, Elliott > > On Sep 21, 12:57 am,elliottg<x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote: > > > > > Just starting to learn about rake and Rails generators... I have a > > couple Qs I have yet to find answers to. > > > 1. Can shell commands somehow be called from a generator''s manifest > > method? If so, is that poor form? > > 2. Can rake tasks be called from a generator''s manifest method? > > > Thanks heaps, Elliott
elliottg
2009-Sep-30 15:58 UTC
Re: Integration of rake tasks and shell commands with Rails generators?
This was a useful post for me on the topic of Ruby and the shell: http://pasadenarb.com/2007/03/ruby-shell-commands.html On Sep 24, 5:33 pm, elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote:> I found the syntax that makes shell calls from Ruby... > > example_shell_command = `gem list` > puts example_shell_command > > Elliott > > On Sep 22, 10:39 am,elliottg<x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote: > > > > > Any thoughts on this one? > > > Thanks, Elliott > > > On Sep 21, 12:57 am,elliottg<x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote: > > > > Just starting to learn about rake and Rails generators... I have a > > > couple Qs I have yet to find answers to. > > > > 1. Can shell commands somehow be called from a generator''s manifest > > > method? If so, is that poor form? > > > 2. Can rake tasks be called from a generator''s manifest method? > > > > Thanks heaps, Elliott