Sha256: 511d6a0af13c577ae087b51d6b2df933fbc1fe23d70379f2df6c85467f7a6e3e
Contents?: true
Size: 792 Bytes
Versions: 83
Compression:
Stored size: 792 Bytes
Contents
ASSETS.cli.config do |cnf| cnf.input(default_option: "-entries-from") do |session, str_opt, options| input = [] if SCR.get_arg(str_opt) file = SCR.get_file(str_opt, required: true) options.deep_merge!(input: {file: {name: file}}) if SCR.get_arg("-xml") options.deep_merge!(input: {file: {format: :xml}}) session.config.files.validate(:xml, file) input = session.entries(file: file, format: :xml) elsif SCR.get_arg("-json") options.deep_merge!(input: {file: {format: :json}}) input = Eco::API::Organization::People.new(JSON.parse(File.read(file))) else options.deep_merge!(input: {file: {format: :csv}}) input = session.csv_entries(file) end end input end end
Version data entries
83 entries across 83 versions & 1 rubygems