Guard is Awesome!

2 views
Skip to first unread message

Andy

unread,
Aug 31, 2011, 10:37:32 PM8/31/11
to Rails Wednesday
今天在一个项目中使用了一下Guard - https://github.com/guard/guard 非常好用,不管你是不是用Rails,它
都可以帮你做很多自动化的控制,人觉得类似autotest和watchr之类的工具,会因为Guard的存在而退出历史舞台了 :)

这里有我同事Michael Bleigh写的一篇介绍Guard的Blog(需翻墙),供大家参考:http://intridea.com/
2011/8/25/hire-a-guard-for-your-project

推荐给大家试试。

Allen Wei

unread,
Aug 31, 2011, 10:44:50 PM8/31/11
to Andy, Rails Wednesday
强烈支持Guard,速度很快很灵活, 有很多插件,常用的任务都覆盖了, 太喜欢Ruby社区这点了。 Railscasts的介绍 http://railscasts.com/episodes/264-guard

不知道自动跑rspec测试之前怎么样才能不先运行所有测试,像autotest有个force参数,guard里面没见有类似的参数

-- 
Allen Wei
Sent with Sparrow
--
--
微群:http://q.weibo.com/793783
--
You received this message because you are subscribed to the Google
Groups "Rails Wednesday" group.
To post to this group, send email to rail...@googlegroups.com
To unsubscribe from this group, send email to
railswed+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/railswed?hl=en?hl=en

Andy

unread,
Aug 31, 2011, 11:07:11 PM8/31/11
to Allen Wei, Rails Wednesday
我一定是错过这期Railscast了 :)

@Allen, 你是希望在自动跑rspec测试之前运行所有测试还是不运行所有测试?


2011/9/1 Allen Wei <dig...@gmail.com>

wxianfeng

unread,
Aug 31, 2011, 11:09:54 PM8/31/11
to Rails Wednesday
http://intridea.com/ 这样的网站也墙?


2011/9/1 Andy <wang...@gmail.com>

Allen Wei

unread,
Aug 31, 2011, 11:12:53 PM8/31/11
to Andy, Rails Wednesday
不运行所有测试,只是等待新的文件修改

-- 
Allen Wei
Sent with Sparrow

Andy

unread,
Aug 31, 2011, 11:58:48 PM8/31/11
to wxianfeng, Rails Wednesday
@wxianfeng http://intridea.com/部署在heroku上面,估计是heroku做域名解析的代理服务器被墙了。。


2011/9/1 wxianfeng <wang....@gmail.com>

Andy

unread,
Sep 1, 2011, 12:14:19 AM9/1/11
to Allen Wei, Rails Wednesday
在Guardfile里面设置 :all_on_start => false


:version => 1                # force use RSpec version 1, default: 2
:cli => "-c -f doc"          # pass arbitrary RSpec CLI arguments, default: "-f progress"
:bundler => false            # don't use "bundle exec" to run the RSpec command, default: true
:rvm => ['1.8.7', '1.9.2']   # directly run your specs on multiple Rubies, default: nil
:notification => false       # don't display Growl (or Libnotify) notification after the specs are done running, default: true
:all_after_pass => false     # don't run all specs after changed specs pass, default: true
:all_on_start => false       # don't run all the specs at startup, default: true
:keep_failed => false        # don't keep failed specs until they pass, default: true
:run_all => { :cli => "-p" } # override any option when running all specs
:spec_paths => ["spec/"]     # specify an array of paths that contain spec files

2011/9/1 Allen Wei <dig...@gmail.com>

Allen Wei

unread,
Sep 1, 2011, 4:26:22 AM9/1/11
to Andy, Rails Wednesday
原来还有如此配置,一直没去研究,很好很强大,更坚定了用guard的信心

-- 
Allen Wei
Sent with Sparrow
Reply all
Reply to author
Forward
0 new messages