Also, the code works two hard at URL validation: for my money, take what
the user claims is the API URL, do a GET against that URL and report any
errors you might get (which are not just 'syntax error in URL' but also
'network not reachable' and all kinds of other fun things)

David


On Tue, Aug 6, 2013 at 3:56 PM, David Lutterkort <lutter@puppetlabs.com>wrote:

> I actually disagree on this one ... people might deploy Razor in lots of
> interesting ways (i.e., behind proxies, mapped to fun places in the URL
> hierarchy etc.) We should therefore ask for the API entrypoint URL in its
> full glory instead of assuming where on a server it is.
>
> David
>
> On Mon, Aug 5, 2013 at 2:07 PM, Daniel Pittman <notifications@github.com>wrote:
>
>> In lib/razor/cli/client.rb:
>>
>> > +      OptionParser.new do |opts|
>> > +        opts.banner = "Usage: razor [command] [options...]\n"
>> > +                      "   or: razor shell"
>> > +        options[:verbose] = false
>> > +        opts.on "-v", "--verbose", "Increases verbosity" do
>> > +          options[:verbose] = true
>> > +        end
>> > +
>> > +        options[:dump] = false
>> > +        opts.on "-d", "--dump", "Dumps API output to the screen" do
>> > +          options[:dump] = true
>> > +        end
>> > +
>> > +        opts.on "-u", "--url URL", "Specify Razor API URL" do |rz_url|
>> > +          options[:url] = rz_url
>> > +        end
>>
>> We shouldn't be asking users for the URL -- at most, we should ask them
>> for the server and port that Razor is running on. The URL structure, beyond
>> the navigation entry point, is of no interest to the outside world.
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/puppetlabs/razor-server/pull/15/files#r5590239>
>> .
>>
>
>