Class: Buildless::GemVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/buildless/gem_version.rb

Constant Summary collapse

NotUpdatedGem =
Class.new(StandardError)

Class Method Summary collapse

Class Method Details

.validate!Object

Raises:



5
6
7
8
9
10
11
# File 'lib/buildless/gem_version.rb', line 5

def self.validate!
  newest_version = Buildless::Cli::FetchTemplate.new.gem_version

  return if system("gem list ^buildless-app$ --version #{newest_version} -i")

  raise NotUpdatedGem, "Please update the gem to newest version #{newest_version} and retry"
end