【问题标题】:Guard not sending gntp notifications to growlGuard 不发送 gntp 通知来咆哮
【发布时间】:2015-04-02 04:27:24
【问题描述】:

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

宝石文件

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

保护文件

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

【问题讨论】:

    标签: ruby guard minitest growl


    【解决方案1】:

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

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

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

    上打开一个问题

    更新:看起来这是 guard-minitest 中的一个错误 https://github.com/guard/guard-minitest/issues/126

    【讨论】:

    • 感谢您的回复。这看起来很有希望,因为 Guard 确实没有在我的 Growl 应用程序首选项中列出。但是,我不知道如何添加它。我的屏幕与您的不同(v2.1.3),我有一个“获取应用程序”按钮而不是“配置”。它链接了here,而Guard不在列出的应用中。
    • 我正在运行咆哮 1.3.3,看来我需要升级 :)
    • 似乎无法手动将保护添加到咆哮中的应用程序列表中:growl.info/documentation/faq.php#how-do-I-add-app-X。我想知道为什么它无法通过咆哮注册自己,或者是否有任何方法可以强制它。
    • 另外,我在 ruby​​ 2.1.3 上运行 Guard 版本 2.11.1
    • 我会尝试卸载Guard,看看是否会从列表中删除它,然后重新安装,一秒钟
    猜你喜欢
    • 2011-09-26
    • 1970-01-01
    • 2012-05-12
    • 1970-01-01
    • 1970-01-01
    • 2012-08-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多