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:
|
Create ~/.restclient for named sessions:
|
||||||
|
|
||||||
sinatra:
|
sinatra:
|
||||||
:url: http://localhost:4567
|
url: http://localhost:4567
|
||||||
rack:
|
rack:
|
||||||
:url: http://localhost:9292
|
url: http://localhost:9292
|
||||||
private_site:
|
private_site:
|
||||||
:url: http://example.com
|
url: http://example.com
|
||||||
:username: user
|
username: user
|
||||||
:password: pass
|
password: pass
|
||||||
|
|
||||||
Then invoke:
|
Then invoke:
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ end
|
||||||
config = YAML.load(File.read(ENV['HOME'] + "/.restclient")) rescue {}
|
config = YAML.load(File.read(ENV['HOME'] + "/.restclient")) rescue {}
|
||||||
|
|
||||||
@url, @username, @password = if c = config[@url]
|
@url, @username, @password = if c = config[@url]
|
||||||
[c[:url], c[:username], c[:password]]
|
[c['url'], c['username'], c['password']]
|
||||||
else
|
else
|
||||||
[@url, *ARGV]
|
[@url, *ARGV]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue