TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Programs that rewrite Ruby programs

77 点作者 tcopeland超过 8 年前

6 条评论

Sivart13超过 8 年前
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.
jfoutz超过 8 年前
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 未加载
easong超过 8 年前
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>
meesterdude超过 8 年前
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
benlovell超过 8 年前
Rubocop does a similar job, also thanks in part to the parser library.
JoelMcCracken超过 8 年前
I have been wanting to toy with doing this for a long time now. After seeing this, maybe I will get around to it.