cache_clear.rb - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
(HTM) git clone git://jay.scot/warvox
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
cache_clear.rb (608B)
---
1 #!/usr/bin/env ruby
2 ###################
3
4 #
5 # Load the library path
6 #
7 base = __FILE__
8 while File.symlink?(base)
9 base = File.expand_path(File.readlink(base), File.dirname(base))
10 end
11 $:.unshift(File.join(File.expand_path(File.dirname(base)), '..', 'lib'))
12
13 require 'warvox'
14 require 'fileutils'
15 require 'yaml'
16
17 ENV['RAILS_ENV'] ||= 'production'
18 $:.unshift(File.join(File.expand_path(File.dirname(base)), '..'))
19
20
21 $stderr.puts "[*] Loading database environment..."
22
23 require 'config/boot'
24 require 'config/environment'
25
26
27 $stderr.puts "[*] Clearing the report cache..."
28 Saulabs::Reportable::ReportCache.delete_all