rye icon indicating copy to clipboard operation
rye copied to clipboard

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

Open rlister opened this issue 14 years ago • 1 comments

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?

rlister avatar Aug 18 '11 04:08 rlister

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.

delano avatar Aug 18 '11 22:08 delano