Corey Ehmke used to maintain a nice BBRails toolkit

One of the scripts was like so:

(*

        BBRails - Capistrano, v1.0

        A component of the BBRails Tools package

        Created by Corey Ehmke

        

        For more tips, tools, and techniques for Ruby on Rails,

        BBEdit, and more, visit http://www.idolhands.com/

        

        This work is licensed under the Creative Commons Attribution-
Noncommercial-Share Alike 3.0 United States

        License. To view a copy of this license, visit 
http://creativecommons.org/licenses/by-nc-sa/3.0/us/ 
or 

        send a letter to Creative Commons, 171 Second Street, Suite 300, San 
Francisco, California, 94105, USA. 

        

*)



run start_application



script start_application

        set thisFile to getFrontmostFile()

        if thisFile is "" then

                set thisFile to choose file with prompt "Select a file:"

                tell application "BBEdit"

                        open thisFile

                end tell

        end if

        doReek(POSIX path of thisFile)

end script



on getFrontmostFile()

        set thisFile to ""

        tell application "BBEdit"

                if exists file of window 1 then

                        set thisFile to file of window 1

                end if

        end tell

        return thisFile

end getFrontmostFile



on doReek(thisFile)

        tell application "BBEdit"

                set theWindowTitle to quoted form of "Reek Results for " & 
thisFile

                do shell script "reek " & thisFile & " | /usr/bin/bbedit 
--clean --new-window --view-top -t " & quoted form of ("Reek Results for " & 
thisFile)

        end tell

end doReek


You could sub rubocop in pretty easily. You could also use the sweet 
bbresults tool instead of the regular bbedit command line tool. I'll be 
honest I do most of ruby coding in Textmate 2 these days because ruby isn't 
popular enough (in general, but especially among BBEdit users) to be a 
first tier language in BBEdit. I still use it for other things and 
especially for search find/replace/factories etc. Nobody can touch that and 
proper syntax highlighting is less of an issue.

-- 
This is the BBEdit Talk public discussion group. 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>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to