Greetings list.
First time poster, long time BBEdit user here. Today I found myself in
BBEdit, editing 4 very long Ruby on Rails files. This worked well
until I had to navigate around in those files.
You see, these files were written using a Domain Specific Language, on
top of Ruby, called Shoulda[1], which gives us an easy way to test RoR
apps. Shoulda files look like this:
context "As a user trying to log into the system, I"
should "be able to access the home page" do
# some kind of test here
end
should "have my username and password accepted" do
# and more tests
end
end
Now imagine 1,000 lines of that, because neither the context nor the
should lines show up in the BBEdit function popup. And why should
they? Functions in Ruby start with "def", not should.... but Shoulda
So it was a little hard to navigate.
So I started thinking, and ended up writing a Python script to make it
easier to navigate Shoulda files. You can see my work at: <http://
bitbucket.org/rwilcox/bbedit_dsl/>
Ultimately this is a proof of concept script - I need to be able to
support other DSLs, and I'd like to be able to handle user specific
ones (maybe someone else writes an RSpec version (another Domain
Specific Language on top of BBEdit), for example). However, I thought
I'd get the word out there, and see if the wider community was
interested.
See also: my blog post talking about it: <http://blog.wilcoxd.com/
blog/?p=189>
Looking forward to hearing from folks,
_Ryan Wilcox
Footnotes:
[1] https://github.com/thoughtbot/shoulda
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Providing People with Solutions PGP: 0x2F4E9C31
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
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/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>