Class: VersionCheckHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/wired/helpers/version_check_helper.rb

Class Method Summary collapse

Class Method Details

.check_version!Object



6
7
8
9
10
11
12
# File 'lib/wired/helpers/version_check_helper.rb', line 6

def self.check_version!
  response = HTTParty.get 'https://rubygems.org/api/v1/gems/wired.json'
  latest_version = response.parsed_response['version']
  if latest_version != Wired::VERSION
    exit unless agree("You are using an outdated version of Wired and will probably break stuff, are you sure you want to continue?")
  end
end