Advertisement
Guest User

Untitled

a guest
Jul 31st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. require 'rubygems'
  2.  
  3. # a specific facets version
  4. require_gem 'facets', '= 1.4.5'
  5. require 'facets'
  6.  
  7. require 'socket'
  8. require 'time'
  9.  
  10. require 'og'
  11. require 'glue/timestamped'
  12.  
  13. # uncomment this, if this is the first run or if you changed ClamavScanResult
  14. Og.create_schema = false
  15.  
  16. # Og class, represents one entry in the database
  17.  
  18. class ClamavScanResult
  19. # The entry has a input/change and access date
  20. is Timestamped
  21.  
  22. property :path, String
  23. property :result, String
  24.  
  25. property :username, String
  26. property :filesize, Integer
  27. end
  28.  
  29. # Initialize database
  30.  
  31. Og.start(:destroy => false, :evolve_schema => :add, :store => :mysql,
  32. :name => 'clamavdb', :user => 'testuser',
  33. :password => 'testpw', :classes => [ClamavScanResult])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement