警惕不要向glarp发送gntp通知

时间:2015-02-03 03:51:16

标签: ruby guard minitest growl

我正在使用minitest的守卫,一切都很好,除了咆哮通知不起作用。

的Gemfile

gem 'growl'
gem 'guard'
gem 'guard-minitest'
gem 'json'
gem 'minitest'
gem 'rack-test'
gem 'ruby_gntp'
gem 'sinatra'

Guardfile

guard :minitest do
  watch(%r{^spec/(.*)_spec\.rb$})
  watch(%r{^spec/test_helper.rb$})
  watch('beacons_app.rb') { "spec/beacons_app_spec.rb" }
end

notification :gntp

(注意:我已尝试将"通知"行放在文件顶部)

如果我将bundle exec guard notifiers gntp显示为可用:

  +-------------------+-----------+------+--------+-------------+
  | Name              | Available | Used | Option | Value       |
  +-------------------+-----------+------+--------+-------------+
  | gntp              | ✔         | ✔    | title  | "Notiffany" |
  |                   |           |      | sticky | false       |
  +-------------------+-----------+------+--------+-------------+
  | growl             | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | terminal_notifier | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | libnotify         | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | notifysend        | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | notifu            | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | emacs             | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | tmux              | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+
  | terminal_title    | ✔         | ✔    | title  | "Notiffany" |
  +-------------------+-----------+------+--------+-------------+
  | file              | ✘         | ✘    |        |             |
  +-------------------+-----------+------+--------+-------------+

Growl正在运行并正在运行(我可以在命令行使用growlnotify成功发送它。)

当我运行bundle exec guard时,我的测试运行正常,文件更改会触发测试在终端中重新运行,如预期的那样。但没有咆哮通知。

如何让它们发挥作用?

更新

这是由guard-minitest中的一个错误造成的,现在已修复:https://github.com/guard/guard-minitest/commit/35ba44c2df7d25b8c3631be2571d3f1411e64185

1 个答案:

答案 0 :(得分:3)

嗯,我的第一个猜测是你的咆哮设置中没有启用后卫:

你检查了你的咆哮偏好吗?

growl preferences

我也会检查http://www.rubydoc.info/github/guard/guard/Guard/Notifier/Growl 确保您有正确的配置选项。如果这不起作用,请在https://github.com/guard/guard-minitest/issues

处打开一个问题

更新:看起来这是防守最小的错误 https://github.com/guard/guard-minitest/issues/126