NUBIC/psc.rb — Issue #4: REPL for exploratory programming
Author: yipdw
Created: 2012-02-21 17:58:55+00:00
State: open
Labels: feature

Having a repl (say, irb with psc.rb preloaded) would ease writing code that calls PSC services. Perhaps something like this:

```ruby

#!/usr/bin/env ruby

require 'irb'
require 'psc'

@url = ARGV[0]
@auth = { :basic => [ARGV[1], ARGV[2]] }
@options = { :authenticator => @auth }

def psc
Psc::Client.new(@url, @options)
end

IRB.start
```

I think it's critical to

1. permit all configuration options to be changed at any time
2. make it easy to get back to a clean client state
3. make psc.rb as easy to use as possible

and the above code, while not having the most obvious usage (it's not at all clear that setting @url will alter what #psc does), does accomplish goals one and two.