rhbz1110627 zanata init

https://bugzilla.redhat.com/show_bug.cgi?id=1110627
and https://bugzilla.redhat.com/show_bug.cgi?id=1038852

Depends on https://github.com/zanata/zanata-api/pull/15 and https://github.com/zanata/zanata-server/pull/520
Good catch. Will fix it 

----- Original Message -----

> From: "David Mason" <notifications@github.com>
> To: "zanata/zanata-client" <zanata-client@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Tuesday, July 29, 2014 11:57:20 AM
> Subject: Re: [zanata-client] rhbz1110627 zanata init (#27)

> In
> zanata-client-commands/src/main/java/org/zanata/client/commands/init/UserConfigHandler.java:
> > +     * Search for zanata.ini. (If there's none, link them to the help
> > page).
> > +     * Provide a list of servers to choose from.
> > +     * @throws Exception
> > +     */
> > +    @VisibleForTesting
> > +    protected void verifyUserConfig() throws Exception {
> > +        File userConfig = opts.getUserConfig();
> > +        if (!userConfig.exists()) {
> > +            String msg = _("missing.user.config");
> > +            log.warn(msg);
> > +            throw new RuntimeException(msg);
> > +        }
> > +        // read in content and get all available server urls
> > +        HierarchicalINIConfiguration config =
> > +                new HierarchicalINIConfiguration(opts.getUserConfig());
> > +        List<URL> serverUrls = readServerUrlsFromUserConfig(config);

> It looks like this might no longer be handling the case where there are no
> server URLs in the user config. We should definitely be handling this case
> and direct the user to documentation, similar to when there is no user
> config.

> —
> Reply to this email directly or view it on GitHub .