Guard启动控制台,使用Time - INFO显示注释.怎么会?

jim*_*ney 1 ruby-on-rails guard spork

我今天根据Michael Hartl的Rails教程(http://youtu.be/FZ-b9oZpCZYhttp://ruby.railstutorial.org/chapters/static-pages#sec-advanced_setup)中的高级设置设置了一个新的Rails应用程序.).我以前做过这个,但是,特别是Guard的输出是非常不同的.

首先,在此之前,Guard将运行并坐在那里听取更改,在新项目中,Guard运行控制台.当有变化时,它仍然坐在那里运行测试,但我想知道是否有人知道为什么会这样,特别是据我所知,我已经将这个项目设置为与我的其他项目完全相同(Gemfiles正是如此)相同).

其次,所有输出消息都带有时间戳和INFO在它们之前.再次,有谁知道这是为什么?

只是为了说明,这是旧项目的输出:

$ guard
Guard uses Growl to send notifications.
Guard is now watching at '/Users/billmurray/rails_projects/sample_app'
Starting Spork for RSpec
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Spork server for RSpec successfully started
Guard::RSpec is running, with RSpec 2!
Running all specs
Running tests with args ["--color", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/billmurray/.rvm/gems/ruby-1.9.3-p194@rails3tutorial/gems/guard-rspec-1.2.1/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]...
.........

Finished in 0.66338 seconds
9 examples, 0 failures

Randomized with seed 46867

Done.
Run Code Online (Sandbox Code Playgroud)

这个新应用程序也是如此.请注意控制台如何在底部启动.

$ guard
14:52:42 - INFO - Guard uses Growl to send notifications.
14:52:42 - INFO - Guard uses TerminalTitle to send notifications.
14:52:42 - INFO - Guard is now watching at '/Users/billmurray/rails_projects/new_app'
14:52:42 - INFO - Starting Spork for RSpec
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!
14:52:47 - INFO - Spork server for RSpec successfully started

14:52:47 - INFO - Guard::RSpec is running, with RSpec 2!
14:52:47 - INFO - Running all specs
Running tests with args ["--color", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/billmurray/.rvm/gems/ruby-1.9.3-p194@rails3tutorial/gems/guard-rspec-1.2.1/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]...
No examples found.


Finished in 0.00213 seconds
0 examples, 0 failures


Randomized with seed 11776

Done.

[1] guard(main)> 
Run Code Online (Sandbox Code Playgroud)

这并不妨碍事情的运行,但我想知道是什么导致它.我应该提一下,我正在使用Mac OS X Mountain Lion.任何帮助将不胜感激.谢谢!

Net*_*rat 5

当您查看Guard CHANGELOG时,您会看到Guard 1.5.0已经实现了以下新功能:

  • 使用Pry作为交互者.
  • 使用Lumberjack作为可定制的记录器.

Guard现在集成了Pry以从用户获取命令(称为交互器).几乎从一开始,交互器一直是Guard的一部分,但是使用Pry你会得到一个插件API,允许你向Guard添加自定义命令.您可以看到已注册的Guard命令:

[1] guard(main)> help guard

有关更多信息,请参阅https://github.com/guard/guard#interactions.

Lumberjack是一个可配置的Ruby记录器,允许您自定义Guard UI记录器,有关详细信息,请参阅https://github.com/guard/guard#logger.