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

Version Path
eco-helpers-2.0.21 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.19 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.18 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.17 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.16 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.15 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.14 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.13 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.12 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.11 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.10 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.9 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.8 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.7 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.6 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.5 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.4 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.3 lib/eco/cli/config/default/input.rb
eco-helpers-2.0.2 lib/eco/cli/config/default/input.rb
eco-helpers-1.5.15 lib/eco/cli/config/default/input.rb