TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Programs that rewrite Ruby programs

77 pointsby tcopelandover 8 years ago

6 comments

Sivart13over 8 years ago
Author of `rails5-spec-converter` here. I&#x27;ve been looking for ways to advertise this gem and wouldn&#x27;t have guessed someone would find it via the reverse_dependencies API :)<p>I don&#x27;t think there&#x27;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&#x27;d love to fix them.
jfoutzover 8 years ago
I forget who said it, but &quot;Programs that write programs are the happiest programs of all&quot;.<p>I find these kinds of transformations <i>so much fun</i> they&#x27;re like the coolest part of programming.
评论 #12552220 未加载
评论 #12552081 未加载
easongover 8 years ago
If anyone is looking for a similar tool for JS, I&#x27;ve used codemods to great effect.<p><a href="https:&#x2F;&#x2F;vramana.github.io&#x2F;blog&#x2F;2015&#x2F;12&#x2F;21&#x2F;codemod-tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vramana.github.io&#x2F;blog&#x2F;2015&#x2F;12&#x2F;21&#x2F;codemod-tutorial&#x2F;</a>
meesterdudeover 8 years ago
Relatedly, I wrote this to automatically rewrite rails controllers that wanted to implement strong params<p><a href="http:&#x2F;&#x2F;ruru.name&#x2F;entries&#x2F;upgrading-rails-to-use-strong-params-automatically" rel="nofollow">http:&#x2F;&#x2F;ruru.name&#x2F;entries&#x2F;upgrading-rails-to-use-strong-param...</a><p>not &quot;smart&quot; but worked well enough for me
benlovellover 8 years ago
Rubocop does a similar job, also thanks in part to the parser library.
JoelMcCrackenover 8 years ago
I have been wanting to toy with doing this for a long time now. After seeing this, maybe I will get around to it.