Remember command's optoins

Store options in file in home folder. 
Use just '.tddium' file, because when I save options and then user enter command without them I can't guess from what host use config file (e.x. '.tddium' or '.tddium.localhost').

https://bugs.tddium.com/bugzilla/show_bug.cgi?id=619
You are right. I will also test presence of PARAMS_PATH constant


2014-08-05 21:14 GMT+03:00 wkj <notifications@github.com>:

> In lib/tddium/cli/params_helper.rb:
>
> > @@ -0,0 +1,40 @@
> > +# Copyright (c) 2014 Solano Labs All Rights Reserved
> > +
> > +module ParamsHelper
> > +  include TddiumConstant
> > +
> > +  def load_params
> > +    begin
> > +      File.open(Default::PARAMS_PATH, 'r') do |file|
> > +        return JSON.parse file.read
> > +      end
> > +    rescue Errno::ENOENT => e
> > +      # when was called from class 'TddiumCli', return {} to use default options
> > +      if caller[1][/`([^']*)'/, 1] == '<class:TddiumCli>'
>
> Is it better to test to see if Default::PARAMS_PATH exists with
> File.exists?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/solanolabs/tddium/pull/60/files#r15830829>.
>