generator (was: Next steps)

1 view
Skip to first unread message

Robert Citek

unread,
Jan 28, 2010, 3:23:19 AM1/28/10
to spec...@googlegroups.com
On Thu, Jan 21, 2010 at 11:32 AM, Ed Howland <ed.ho...@gmail.com> wrote:
> (3) Crafting a "gemerator" like script to drop in a dir structure
> wherever the user decides.(More on this in a following email.)

Tackling the generator script. - Robert

Robert Citek

unread,
Jan 28, 2010, 3:35:05 AM1/28/10
to spec...@googlegroups.com

Added the bin/spec_wire stub to github. - Robert

Ed Howland

unread,
Jan 28, 2010, 12:30:37 PM1/28/10
to spec...@googlegroups.com
Excellent! and Excellent!

Although, I only got spec_wire.gemspec when I pulled via git.


Any thoughts on how to add this so it is automatically in the user's
path? Like the 'rails' command?

Ed

Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland

> --
> Post: spec...@googlegroups.com
> Subscribe: spec_wire...@googlegroups.com
> Unsubscribe: spec_wire+...@googlegroups.com
> Website: http://groups.google.com/group/spec_wire
>

Robert Citek

unread,
Jan 28, 2010, 12:43:05 PM1/28/10
to spec...@googlegroups.com
On Thu, Jan 28, 2010 at 12:30 PM, Ed Howland <ed.ho...@gmail.com> wrote:
> Excellent! and Excellent!
>
> Although, I only got spec_wire.gemspec when I pulled via git.

That's because of me and my branching. I have it in my experimental
branch. Let me merge and commit again.

> Any thoughts on how to add this so it is automatically in the user's
> path? Like the 'rails' command?

Not sure. Need to think about it.

You up for a Skype later this afternoon? Sometime between 3 and 4pm?
Got some errands to run and should be back by then.

BTW, fixed the keys on my keyboard. Am definitely not going to pop
the keys of off this keyboard again. What a pain.

Regards,
- Robert

Robert Citek

unread,
Jan 28, 2010, 12:49:56 PM1/28/10
to spec...@googlegroups.com
On Thu, Jan 21, 2010 at 12:15 PM, Ed Howland <ed.ho...@gmail.com> wrote:
> A gereator script is needed to make things easier for the spec_wire
> user. Similar to the generator scripts used in Rails, etc. And _very_
> similar to the generator used in RSpec for Rails.
>
> Bssically, it copies a template folder structure with files and
> sub-folders into a source, but not overwriting files (unless asked to)
>
> It should also take some options and convert them to variables ro be
> used in ERB templates. ERB templates are any files with a
> .erb extension. They are processed through ERB and then written out to
> the same filename sans .erb.

Here's a list of the files/folders I've discovered so far on my Ubuntu
9.04 machine:

/usr/bin/rails : a bash script that calls rails and uses the rails folder
/usr/share/rails/railties/bin/rails : a ruby script that requires
rails_generator
/usr/share/rails/railties/lib/rails_generator.rb : a ruby module
/usr/share/rails/railties/lib/rails_generator/ : a folder for the
ruby_generator.rb script
/usr/share/rails/ : folder where the templates are located

Are these the files I should be exploring to create a spec_wire generator?

BTW, did see any erb stuff in any of them. But then I only glanced over them.

Regards,
- Robert

Ed Howland

unread,
Jan 28, 2010, 4:31:36 PM1/28/10
to spec...@googlegroups.com
I was out running errands, so If I missed you. Sorry. Try again.

Ed

Ed Howland

unread,
Jan 28, 2010, 4:34:14 PM1/28/10
to spec...@googlegroups.com
Certainly a start.

They may not have an ERb component.

BTW, I am redoing the existing templates folder from what it currently
exists like on Github.

Stay tuned.

Cheers,
Ed

Ed Howland

unread,
Jan 28, 2010, 5:04:53 PM1/28/10
to spec...@googlegroups.com
On Thu, Jan 28, 2010 at 12:43 PM, Robert Citek <robert...@gmail.com> wrote:
>> Any thoughts on how to add this so it is automatically in the user's
>> path? Like the 'rails' command?
>
> Not sure.  Need to think about it.
>

From what you discovered, re: apt-get pkg, it seems to just install it
in /usr/bin where Ruby itself is installed. On my Mac it is
/usr/local/bin/rails

Somehow, it figures out where Ruby is and installs it there. Mayve via
a system('which ruby')??

And then, there must be something in the gemspec that tells it to copy
scripts somewhere.

Ed

Robert Citek

unread,
Jan 28, 2010, 5:23:21 PM1/28/10
to spec...@googlegroups.com
I was out, too, doing errands. And I'm still not done. Will have to
wait until later tonight or tomorrow to work on spec_wire.

Regards,
- Robert

Reply all
Reply to author
Forward
0 new messages