Sha256: 0c6494070e2f284bed7a87a147ef7e1ea95c22db033a0fe0b8353b667790e1c6
Contents?: true
Size: 580 Bytes
Versions: 1
Compression:
Stored size: 580 Bytes
Contents
require "thor" require "json" require "pathname" module CodeInventory module CLI class App < Thor desc "json AGENCY FILENAME", "Build an inventory from a JSON file" def json(agency, filename) file = Pathname.new(filename) unless File.exist? file puts "No such file: #{file}" exit 1 end source = CodeInventory::JSONFile.new(file) inventory = CodeInventory::Inventory.new(source) output = inventory.generate(agency, "2.0.0") puts JSON.pretty_generate(output) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
codeinventory-0.3.1 | lib/codeinventory/cli/json.rb |