Skip to content

Instantly share code, notes, and snippets.

@ebot
Created April 7, 2009 18:46
Show Gist options
  • Save ebot/91385 to your computer and use it in GitHub Desktop.
Save ebot/91385 to your computer and use it in GitHub Desktop.
Sample audit config file
#!/usr/bin/env ruby -wKU
require 'yaml'
config = YAML::load( File.open( 'config.yml' ) )
execution_time = config["Execution Time"]
doc_types = config["Document Types"]
user_groups = config["User Groups"]
puts ""
puts "----------------------------------------------------"
puts "Reports will be generated at #{execution_time}."
puts "----------------------------------------------------"
puts ""
puts "----------------------------------------------------"
puts "Documents should be filed in the following folders:"
doc_types.each { |doc_type, owner_type| puts " #{doc_type} => #{owner_type}" }
puts "----------------------------------------------------"
puts ""
puts "----------------------------------------------------"
puts "User Groups:"
user_groups.each do |group|
puts " #{group["Name"]}:"
puts " This group's report doc type is #{group["Report Doc Type"]}."
puts " This group includes the following users:"
group["Users"].each { |user| puts " #{user}" }
end
puts "----------------------------------------------------"
---
Execution Time: 12:15 AM
Document Types:
Doc Type Name 1: Folder Name
Doc Type Name 2: Folder Name
Doc Type Name 3: Folder Name
User Groups:
- Name: Name 1
Report Doc Type: Group DocType
Users:
- User Name A
- User Name B
- User Name C
- Name: Name 2
Report Doc Type: Group DocType
Users:
- User Name A
- User Name B
- User Name C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment