google-map-weather-intregration 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/weather_api/version.rb +1 -1
- data/lib/weather_api.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 247bc237a000084afb63310396e32502bd6a0414f1112074ea16f1bc51c13652
|
|
4
|
+
data.tar.gz: 0bb58446fb692e6b77f0eab06e344cc2c163ea9145040fb711ba3a6b1d3187b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87f31f7669b53c7f189ef3f836352cfb02e58c7a7d3503f06751c3bd13823230391df4199d863c2966b7f8bae9f6447b00d11d65a1cf6fa70c744357258ccd50
|
|
7
|
+
data.tar.gz: 856e096388d1a1d27440de49432c7348c5050408d932593f884f64351891ff4f2a6a30d78dd1ee736fa417456e35825a5c7bcdb70c29d22bbb004d43ea65f692
|
data/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> ⚠️ **DEPRECATED** — The MyWeather2 API this gem depends on has been shut down since ~2020. All API calls will fail. Please migrate to [open-meteo](https://open-meteo.com/) (free, no API key) or [OpenWeatherMap](https://openweathermap.org/).
|
|
2
|
+
|
|
1
3
|
# google-map-weather-intregration
|
|
2
4
|
|
|
3
5
|
A Ruby gem to fetch weather data by geographic coordinates and surface it alongside Google Maps in Rails applications. Powered by the [MyWeather2](http://www.myweather2.com/developer/) API.
|
data/lib/weather_api/version.rb
CHANGED
data/lib/weather_api.rb
CHANGED
|
@@ -6,6 +6,9 @@ class WeatherApi
|
|
|
6
6
|
FORECAST_URL = "http://www.myweather2.com/developer/forecast.ashx?output=json"
|
|
7
7
|
|
|
8
8
|
def initialize(key, lat, lng)
|
|
9
|
+
warn "[DEPRECATION] google-map-weather-intregration: The MyWeather2 API (myweather2.com) " \
|
|
10
|
+
"has been shut down. This gem is no longer functional. " \
|
|
11
|
+
"Please migrate to the open-meteo gem (https://github.com/open-meteo/ruby-sdk) or openweathermap."
|
|
9
12
|
uri = URI.parse(FORECAST_URL + "&uac=#{key}&query=#{lat},#{lng}")
|
|
10
13
|
result = URI.open(uri).read
|
|
11
14
|
unless result == "Unable to find any matching weather location to the query submitted!"
|