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

check_compatibility! breaks if @executables contains Pathname objects #13

Open
djungowski opened this issue Mar 19, 2014 · 3 comments
Open

Comments

@djungowski
Copy link

This is what we encountered:

Poltergeist uses cliver since 1.4.0. We set
poltergeist_options[:phantomjs] =
With a pathname object, leading to a lot of errors:

 NoMethodError: undefined method `[]' for #<Pathname:0x007ff093b69028>
 occurred at /Users/djungowski/.rvm/gems/ruby-2.0.0-p247/gems/cliver-0.3.2/lib/cliver/dependency.rb:71:in `block in check_compatibility!'

This is because the check_compatibility! method expects a string. It would be good if the method either supports the Pathname object (which would be useful) or uses a .to_s

@yaauie
Copy link
Owner

yaauie commented Mar 19, 2014

The YARDDOC explicitly says that executables should be [String,Array<String>], so with the current version you have to comply. I would welcome a pull-request that relaxes that to [String,Pathname,Array<String,Pathname> so long as it doesn't explicitly require 'pathname'. I would rather not support [#to_s,Array<#to_s>] since just about everything has #to_s.

@djungowski
Copy link
Author

Since the method uses paths it would be nice if it could support the Pathname object in the long run. Would at least make sense if you ask me ;-)

@yaauie
Copy link
Owner

yaauie commented Mar 19, 2014

It would be nice, but would be a breaking change since we currently support 1.8.7 & it doesn't have Pathname.

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