mikeauclair/active_pdftk — comment on commit 3c338a98338dc05ef4b3ecff889845ca7875011a
File:  line 0
By tcocca:

how about:

````
def self.locate_pdftk
@pdftk_location ||= begin
auto_path = %x{locate pdftk | grep "/bin/pdftk"}.strip.split("\n").first
#TODO find a valid Win32 procedure (not in my top priorities)
(auto_path.nil? || auto_path.empty?) ? nil : auto_path
end
end
````

Its a little cleaner. I do like this though, this will definitely be a lot cleaner, also, this will greatly help me is setting up a stub in the spec's to force the path.

Hopefully I'll get this pulled into the branch I have going to refactor the specs tonight.

Thanks,
~ Tom

PS. are you using this for anything yet? Hoping to get a 0.1.0 release out really soon. But you should be able to use it from the git repo for now I think with bundler.