bjeanes / ghost

Create, list, delete, and modify /etc/hosts entries with ease...
MIT License
732 stars 44 forks source link

NoMethodError in ghost-ssh list #40

Closed roxeteer closed 11 years ago

roxeteer commented 11 years ago

I just installed ghost on Mac OS X 10.8.2. As the first thing, I wanted to check what ghost-ssh says with the list parameter. This is what I got:

$ ghost-ssh list
/Library/Ruby/Gems/1.8/gems/ghost-0.3.0/bin/ghost-ssh:80: undefined method `length' for nil:NilClass (NoMethodError)
    from /usr/bin/ghost-ssh:23:in `load'
    from /usr/bin/ghost-ssh:23
chrishein commented 11 years ago

Same here. It seems to be caused by general configurations out of a specific host configuration group, such as:

ServerAliveInterval 10
ServerAliveCountMax 300

Host myhost
    HostName myhost.com

Or comments could be related to this too, as the code does not handle them.

Anyway, the whole ghost-ssh features have been removed from the code after 0.3.0

bjeanes commented 11 years ago

It wasn't removed so much as I rewrote all the things and the ghost-ssh features were not something I am very familiar with or need. I'd be happy to add it in or split it out as a different gem (or, more realistically, be supportive of anyone else who wanted to do so).

bjeanes commented 11 years ago

I'm marking this as won't fix for now, because the new version of ghost doesn't even have this functionality. Though I am not opposed to it being added back, I don't have a need for it so haven't put the time in (since the new Ghost is a 100% rewrite) and I think it'd stand better as its own tool anyway.

bjeanes commented 11 years ago

(FWIW, I will happily accept a PR that fixes this and release a fixed gem based on the old version)

adamstac commented 11 years ago

What a bummer @bjeanes.

So we can cover this, can you answer if the ghost-ssh feature is, in fact, is being removed from ghost? We've covered both ghost and ghost-ssh before.

As a save, storm was just mentioned to us to cover too which has a similar feature set as ghost-ssh.

bjeanes commented 11 years ago

Ghost-ssh was originally a feature from someone else that I accepted in a pull request. I never used it and in fact forgot it was part if ghost. When starting the rewrite, I noticed that the implementation didn't work for a lot of valid ssh config files so I decided to remove it. I think it would be better as a separate tool from ghost. Storm looks like an interesting project that does just that. I'll have to try it...