Sha256: ee9ed08fdbc0a38e9282b51538ace39aa44eed84587e9a4fe783621da50e19b0
Contents?: true
Size: 1.4 KB
Versions: 32
Compression:
Stored size: 1.4 KB
Contents
ASSETS.cli.config do |cnf| cnf.people do |input, session, options| people = Eco::API::Organization::People.new([]) if SCR.get_arg("-get-people") options.deep_merge!(people: { get: {from: :remote, type: :full} }) people = session.micro.people_cache elsif SCR.get_arg("-no-people") people = Eco::API::Organization::People.new([]) elsif SCR.get_arg("-people-from-backup") file = SCR.get_arg("-people-from-backup", with_param: true) options.deep_merge!(people: { get: {from: :local, type: :backup} }) people = JSON.parse(File.read(file)) people = Eco::API::Organization::People.new(people) elsif SCR.get_arg("-get-partial") unless input && input.is_a?(Enumerable) raise "To use -get-partial (partial updates), you need to use -entries-from" end options.deep_merge!(people: { get: {from: :remote, type: :partial} }) people = session.micro.people_search(input, options: options) else options.deep_merge!(people: { get: {from: :local, type: :full} }) people = session.micro.people_load(modifier: [:newest, :save]) if people.empty? options.deep_merge!(people: { get: {from: :remote, type: :full} }) people = session.micro.people_cache if people.empty? end end people end end
Version data entries
32 entries across 32 versions & 1 rubygems