blinry / nom

"Lose weight and hair through stress and poor nutrition"
GNU General Public License v2.0
64 stars 4 forks source link

fix URI.escape and URI.open deprecation warnings #7

Closed rohieb closed 3 years ago

rohieb commented 3 years ago

Fixes #6

$ ./bin/nom search foo
Previous log entries:
(no matching entries found)
---------------------
     (0) total
.../lib/nom/nom.rb:109: warning: URI.escape is obsolete
.../lib/nom/nom.rb:111: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
.../lib/nom/nom.rb:115: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Food Diet Pro, Schoko (Powerstar Food)
    (707) 1 Glas (200 ml)
    (106) 1 Becher (30 ml)

As the stdlib 1 and the warnings suggest, use CGI.escape and URI.open instead.

blinry commented 3 years ago

Thanks! :green_heart: