Method: Inspec::InspecCLI#version
- Defined in:
- lib/inspec/cli.rb
#version ⇒ Object
246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/inspec/cli.rb', line 246 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 |