mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
use strings instead of symbols in .restclient sessions
This commit is contained in:
parent
2b7e53bf02
commit
eebe99742d
2 changed files with 6 additions and 6 deletions
10
README
10
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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue