delano / rye

Safe, parallel access to Unix shells from Ruby
http://delano.github.com/rye
MIT License
235 stars 32 forks source link

Rye::Set should not pass bad opts to Rye::Box #11

Open rlister opened 13 years ago

rlister commented 13 years ago

Rye::Box does a great job of setting options, in my case getting user from .ssh_config. However, creating a Set and adding boxes with String args fails in this case:

r = Rye::Set.new r.add_box('host1', 'host2')

This uses :user => Rye.sysinfo.user, as set in Rye::Set::initialize. I have to use either:

r = Rye::Set(:user => 'foobar') r.add_box %w(host1 host2)

or create Boxes explicitly:

r.add_box %w(host1 host2).map{|b| Rye::Box.new b}

Can Set just pass opts straight through to Box without merging some limited defaults?

delano commented 13 years ago

Ya, that seems reasonable. I'll look into it but I'm pretty swamped right now so it could take a while. If you'd like to submit a pull request with the changes, I could create a release pretty quick.