I'd like to read a text file from the web and assign it to a variable in chef / ruby
In powershell I would do something like this:
$content = (Invoke-WebRequest http://website.com/string.txt).content
Can anyone tell me how this is done in ruby?
Within Chef, the correct approach is to use the Chef::HTTP
client.
Chef::HTTP.new('https://example.com/').get('/string.txt')