ninefold/cli — pull request #11 by shaundomingo (2014-06-18 08:50:59+00:00)
Title: OCT-4727 #comment Permit modification of options

On my machine any time I tried to tail the logs or specify --from or --to dates, I got the following exception:

/Users/sdom/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/core_ext/hash_with_indifferent_access.rb:24:in `[]=': can't modify frozen Thor::CoreExt::HashWithIndifferentAccess (RuntimeError)
from /Users/sdom/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/core_ext/hash_with_indifferent_access.rb:24:in `[]='
from /Users/sdom/www/cli/lib/ninefold/models/log.rb:44:in `poll'
from /Users/sdom/www/cli/lib/ninefold/interactions/logstail.rb:12:in `block in run'
from /Users/sdom/www/cli/lib/ninefold/models/log.rb:38:in `block in fetch'
from /Users/sdom/www/cli/lib/ninefold/services/host.rb:61:in `call'
from /Users/sdom/www/cli/lib/ninefold/services/host.rb:61:in `block in request'
from /Users/sdom/www/cli/lib/ninefold/services/host.rb:60:in `tap'
from /Users/sdom/www/cli/lib/ninefold/services/host.rb:60:in `request'
from /Users/sdom/www/cli/lib/ninefold/services/host.rb:33:in `get'
from /Users/sdom/www/cli/lib/ninefold/models/log.rb:36:in `fetch'

This fix dups the options hash so that modification of argument values can occur.

See http://rubydoc.info/github/wycats/thor/master/Thor/Options (OPTS_END)

Open to other suggestions but it fixes the problem for me.