Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

growl is not working #17

Closed
chabgood opened this issue Sep 3, 2011 · 8 comments
Closed

growl is not working #17

chabgood opened this issue Sep 3, 2011 · 8 comments

Comments

@chabgood
Copy link

chabgood commented Sep 3, 2011

I have growl_notify and when guard is running cucumber features it blows up when trying to do a growl notification. The growl for rspec seems to work.

@chabgood
Copy link
Author

chabgood commented Sep 3, 2011

Sorry, error is:
Running all features
Disabling profiles...

0 scenarios
0 steps
0m0.000s
CommandError
OSERROR: 3
MESSAGE: 'image from URL' parameter - Badly formed path.
COMMAND: app("/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app").notify({:title=>"Cucumber Results", :application_name=>"Guard", :description=>"", :sticky=>false, :priority=>0, :with_name=>"Guard", :image_from_location=>""})
(Appscript::CommandError)
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/rb-appscript-0.6.1/lib/appscript.rb:542:in _send_command' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/rb-appscript-0.6.1/lib/appscript.rb:642:inmethod_missing'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/growl_notify-0.0.1/lib/growl_notify.rb:36:in send_notification' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-0.6.3/lib/guard/notifier.rb:58:innotify_mac'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-0.6.3/lib/guard/notifier.rb:32:in notify' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-cucumber-0.6.1/lib/guard/cucumber/notification_formatter.rb:56:innotify_summary'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-cucumber-0.6.1/lib/guard/cucumber/notification_formatter.rb:20:in after_features' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:173:inblock in send_to_all'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:171:in each' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:171:insend_to_all'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:164:in broadcast' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:13:invisit_features'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/runtime.rb:45:in run!' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/cli/main.rb:43:inexecute!'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/cli/main.rb:20:in execute' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/bin/cucumber:14:in<top (required)>'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/bin/cucumber:19:in load' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/bin/cucumber:19:in

'

@netzpirat
Copy link
Owner

Can you please give some more details about the exception? In general the growl notifications are done in Guard and both, guard-cucumber and guard-rspec, use the functionality through the same API.

FYI: I just added a wiki page to Guard that deals with problems we're seeing with growl_notify. Please share your findings there also.

@chabgood
Copy link
Author

chabgood commented Sep 3, 2011

The error was the complete error generated. Here is my gemfile, not using spork:
source 'http://rubygems.org'

gem 'rails', '3.1.0.rc8'

group :assets do
gem 'sass-rails', "> 3.1.0.rc"
gem 'coffee-rails', "
> 3.1.0.rc"
gem 'uglifier'
end

gem 'jquery-rails'
gem "mongo_mapper", :path => "/Volumes/Backup/git_working/food_for_thought/web/vendor/gems/mongomapper"

group :development, :test do
gem "nifty-generators", :group => :development
gem "rspec-rails", ">= 2.6.1"
gem "factory_girl_rails", ">= 1.1.0"
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'guard-livereload'
gem "cucumber-rails", ">= 1.0.2"
gem "capybara", ">= 1.0.0"
gem "database_cleaner", ">= 0.6.7"
gem "launchy", ">= 2.0.5"
gem "bson_ext"
gem 'turn', :require => false
gem 'growl_notify'
end

@netzpirat
Copy link
Owner

The problem is that the image is empty, so this means that there is an unknown status passed to icon_for. I just checked the Cucumber sources and can't find any new status.

So can you please analyze what status is passed to icon_for? Just call

bundle open guard-cucumber

and your editor will open with the current guard-cucumber sources. Now go to line 65 and simply add the following line at the top of the icon_for method:

puts status, status.class

Now run your features and report your findings.

@chabgood
Copy link
Author

chabgood commented Sep 4, 2011

I think it is erroring prior to that call, I am not seeing any output:

Running all features
Disabling profiles...

0 scenarios
0 steps
0m0.000s
CommandError
OSERROR: 3
MESSAGE: 'image from URL' parameter - Badly formed path.
COMMAND:
app("/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app").notify({:title=>"Cucumber
Results", :application_name=>"Guard", :description=>"", :sticky=>false,
:priority=>0, :with_name=>"Guard", :image_from_location=>""})
(Appscript::CommandError)
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/rb-appscript-0.6.1/lib/appscript.rb:542:in
_send_command' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in method_missing'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/growl_notify-0.0.1/lib/growl_notify.rb:36:in
send_notification' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-0.6.3/lib/guard/notifier.rb:58:in notify_mac'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-0.6.3/lib/guard/notifier.rb:32:in
notify' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-cucumber-0.6.1/lib/guard/cucumber/notification_formatter.rb:56:in notify_summary'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/guard-cucumber-0.6.1/lib/guard/cucumber/notification_formatter.rb:20:in
after_features' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:173:in block in send_to_all'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:171:in
each' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:171:in send_to_all'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:164:in
broadcast' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/ast/tree_walker.rb:13:in visit_features'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/runtime.rb:45:in
run!' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/cli/main.rb:43:in execute!'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/lib/cucumber/cli/main.rb:20:in
execute' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/gems/cucumber-1.0.2/bin/cucumber:14:in <top (required)>'
/Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/bin/cucumber:19:in
load' /Users/chabgood/.rvm/gems/ruby-1.9.2-p136@food_for_thought/bin/cucumber:19:in

'

On Sun, Sep 4, 2011 at 07:04, netzpirat <
reply@reply.github.com>wrote:

The problem is that the image is empty, so this means that there is an
unknown status passed to icon_for.
I just checked the Cucumber sources and can't find any new status.

So can you please analyze what status is passed to icon_for? Just call

bundle open guard-cucumber

and your editor will open with the current guard-cucumber sources. Now go
to line 65 and simply add the following line at the top of the icon_for
method:

puts status, status.class

Now run your features and report your findings.

Reply to this email directly or view it on GitHub:
#17 (comment)

*"In matters of style, swim with the current; in matters of principle, stand
like a rock."
Thomas Jefferson
*

@netzpirat
Copy link
Owner

Seeing that exception again I finally understand the problem. Released 0.6.2 that contains the bugfix. Thanks a lot.

@chabgood
Copy link
Author

chabgood commented Sep 4, 2011

Awesome, it works now, thanks. What did you change?

On Sun, Sep 4, 2011 at 13:08, netzpirat <
reply@reply.github.com>wrote:

Seeing that exception again I finally understand the problem. Released
0.6.2 that contains the bugfix. Thanks a lot.

Reply to this email directly or view it on GitHub:
#17 (comment)

*"In matters of style, swim with the current; in matters of principle, stand
like a rock."
Thomas Jefferson
*

@netzpirat
Copy link
Owner

I had a logic error that may lead to an empty image name and that caused growl_notify to throw an error. I fixed it by making sure that only a valid image symbol or nil is passed to Guard.

hron pushed a commit to hron/guard-cucumber that referenced this issue Nov 10, 2015
Fixed travis link for guard/guard-cucumber repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants