Sha256: bfac44ace8c35feeb5e644138abbd42454b2e96cab45e739e6f509bb47adb845
Contents?: true
Size: 789 Bytes
Versions: 14
Compression:
Stored size: 789 Bytes
Contents
# typed: true require "psych" module Mangadex module Api class VersionChecker extend T::Sig sig { returns(T.nilable(String)) } def self.check_mangadex_version puts("Checking Mangadex's latest API version...") version = Psych.load( RestClient.get( 'https://api.mangadex.org/api.yaml', ).body, ).dig('info', 'version') if version != Mangadex::Version::STRING warn( "[Warning] This gem is compatible with #{Mangadex::Version::STRING} but it looks like Mangadex is at #{version}", "[Warning] Check out #{Mangadex.configuration.mangadex_url} for more information.", ) end version rescue => error nil end end end end
Version data entries
14 entries across 14 versions & 1 rubygems