Sha256: 88aab7f32d4b06f0eb6f9cbb4fe1bad53799c32b68cd4832b0e06c3b5dd8cfdf
Contents?: true
Size: 787 Bytes
Versions: 6
Compression:
Stored size: 787 Bytes
Contents
# frozen_string_literal: true require "firestore" module Icarus module Mod module CLI # Sync CLI command definitions class Add < SubCommandBase desc "modinfo", "Adds an entry to 'meta/modinfo/list'" def modinfo(item) firestore = Firestore.new payload = [firestore.list(:modinfo), item].flatten.compact puts firestore.update(:modinfo, payload, merge: true) ? "Success" : "Failure" end desc "repos", "Adds an entry to 'meta/repos/list'" def repos(item) firestore = Firestore.new payload = [firestore.list(:repositories), item].flatten.compact puts firestore.update(:repositories, payload, merge: true) ? "Success" : "Failure" end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems