Sha256: aca9bac4862df4add45f28ea9d28e126e9ff60510d99a3ec1606efacb742099d
Contents?: true
Size: 656 Bytes
Versions: 27
Compression:
Stored size: 656 Bytes
Contents
module MuxTf module VersionCheck def has_updates? current_gem_version < latest_gem_version end def latest_gem_version value = cache.fetch("latest_gem_version") { fetcher = Gem::SpecFetcher.fetcher dependency = Gem::Dependency.new "mux_tf" remotes, = fetcher.search_for_dependency dependency remotes.map(&:first).map(&:version).max.to_s } Gem::Version.new(value) end def current_gem_version Gem::Version.new(MuxTf::VERSION) end def cache @cache ||= YamlCache.new(File.expand_path("~/.mux_tf.yaml"), default_ttl: 1.hour) end extend self end end
Version data entries
27 entries across 27 versions & 1 rubygems