lib/vindetta/cli.rb in vindetta-0.8.0 vs lib/vindetta/cli.rb in vindetta-0.9.0

- old
+ new

@@ -1,12 +1,14 @@ require "gli" +require "vindetta/version" module Vindetta class CLI extend GLI::App program_desc "Vehicle Identification Number (VIN) CLI" + version Vindetta::VERSION desc "Transliterates a VIN character" arg_name "character" command %i[transliterate t] do |c| c.action do |_global, _options, args| @@ -22,11 +24,10 @@ end desc "Decodes a VIN" command %i[decode d] do |c| c.action do |_global, _options, _args| - vin = Vindetta::Vin.new(_args.first) - puts Vindetta::Decoder.decode(vin) + puts Vindetta::Decoder.decode_vin(_args.first).to_json end end desc "Generates a random VIN" command %i[generate g] do |c|