5 ms·
Programs that rewrite Ruby programs
- Sivart13 10y agoAuthor of `rails5-spec-converter` here. I've been looking for ways to advertise this gem and wouldn't have guessed someone would find it via the reverse_dependencies API :) I don't think there's anything RSpec-specific in the gem other than the default filename glob, which you can override on the command line. If there are any other issues transforming non-RSpec suites I'd love to fix them.
- JoelMcCracken 10y agoI have been wanting to toy with doing this for a long time now. After seeing this, maybe I will get around to it.
- benlovell 10y agoRubocop does a similar job, also thanks in part to the parser library.
- meesterdude 10y agoRelatedly, I wrote this to automatically rewrite rails controllers that wanted to implement strong params http://ruru.name/entries/upgrading-rails-to-use-strong-params-automatically http://ruru.name/entries/upgrading-rails-to-use-strong-param... not "smart" but worked well enough for me
- easong 10y agoIf anyone is looking for a similar tool for JS, I've used codemods to great effect. https://vramana.github.io/blog/2015/12/21/codemod-tutorial/ https://vramana.github.io/blog/2015/12/21/codemod-tutorial/
- jfoutz 10y agoI forget who said it, but "Programs that write programs are the happiest programs of all". I find these kinds of transformations so much fun they're like the coolest part of programming.
- paulddraper 10y agoAre you a Lisper?
- whateveracct 10y agoSome FPers argue that all programs should just be written as compositions of compilers and interpreters ;) so everything can be the coolest part of programming!
- deleted 10y ago[deleted]