Class: Ip2Geo::Helpers::CheckVersion
- Inherits:
-
Object
- Object
- Ip2Geo::Helpers::CheckVersion
- Defined in:
- lib/ip2geo/helpers/check_version.rb
Constant Summary collapse
- RUBYGEMS_API_URL =
'https://rubygems.org/api/v1/gems/ip2geo.json'
Class Method Summary collapse
Class Method Details
.call ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ip2geo/helpers/check_version.rb', line 12 def call return if Data::State.is_version_checked || !Data::State. Data::State.is_version_checked = true current_version = Ip2Geo::VERSION latest_version = fetch_latest_version return unless current_version && latest_version return if current_version == latest_version (current_version, latest_version) rescue StandardError # Silently fail - version check is non-critical end |