lib/trend.rb in trend-0.2.0 vs lib/trend.rb in trend-0.2.1

- old
+ new

@@ -22,11 +22,11 @@ def self.correlation(*args) client.correlation(*args) end def self.url - @url ||= ENV["TREND_URL"] || "https://trendapi.org" + @url ||= ENV["TREND_URL"] || hosted_url end def self.url=(url) @url = url @client = nil @@ -42,7 +42,13 @@ end # private def self.client @client ||= Client.new + end + + # private + def self.hosted_url + warn "[trend] WARNING: The hosted version is shutting down on May 1, 2024. See https://github.com/ankane/trend-api for how to run the API on your own infrastructure." + "https://trendapi.org" end end