diff --git a/README b/README index 08f2d0b..3b288f0 100644 --- a/README +++ b/README @@ -53,13 +53,13 @@ Add a user and password for authenticated resources: Create ~/.restclient for named sessions: sinatra: - :url: http://localhost:4567 + url: http://localhost:4567 rack: - :url: http://localhost:9292 + url: http://localhost:9292 private_site: - :url: http://example.com - :username: user - :password: pass + url: http://example.com + username: user + password: pass Then invoke: diff --git a/bin/restclient b/bin/restclient index 6a7c4fe..5a7fb70 100755 --- a/bin/restclient +++ b/bin/restclient @@ -16,7 +16,7 @@ end config = YAML.load(File.read(ENV['HOME'] + "/.restclient")) rescue {} @url, @username, @password = if c = config[@url] - [c[:url], c[:username], c[:password]] + [c['url'], c['username'], c['password']] else [@url, *ARGV] end