lib/eco/cli/config/default/usecases.rb in eco-helpers-2.0.13 vs lib/eco/cli/config/default/usecases.rb in eco-helpers-2.0.14
- old
+ new
@@ -4,11 +4,11 @@
desc = "It exports to a CSV the (filtered) people"
cases.add("-people-to-csv", :export, desc) do |people, session, options|
file = SCR.get_file("-people-to-csv", required: true, should_exist: false)
options.deep_merge!(export: {file: {name: file, format: :csv}})
options.deep_merge!(export: {options: {nice_header: true}}) if SCR.get_arg("-nice-header")
-
+ options.deep_merge!(export: {options: {internal_names: true}}) if SCR.get_arg("-internal-names")
case_name = SCR.get_arg("-detailed")? "to-csv-detailed" : "to-csv"
session.usecases.case(case_name)
end
desc = "Adds a column 'ecoPortalTag' to the input CSV with the tags that the location codes map to"
@@ -71,10 +71,10 @@
session.logger.error("You need to specify a -source-enviro for the conversion to work out")
exit(1)
end
options.deep_merge!(ignore: {missing: {policy_groups: true}}) if SCR.get_arg("-ignore-missing-policy-groups")
-
+
end
desc = "Restores the people manager by using a backup.json file"
cases.add("-restore-db-from", :sync, desc, case_name: "restore-db") do |input, people, session, options|
unless input && input.is_a?(Eco::API::Organization::People)