Method: Inspec::InspecCLI#version
- Defined in:
- lib/inspec/cli.rb
#version ⇒ Object
335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/inspec/cli.rb', line 335 def version if opts['format'] == 'json' v = { version: Inspec::VERSION } puts v.to_json else puts Inspec::VERSION # display outdated version latest = LatestInSpecVersion.new.latest if Gem::Version.new(Inspec::VERSION) < Gem::Version.new(latest) puts "\nYour version of InSpec is out of date! The latest version is #{latest}." end end end |