1 # acts_as_ferret gem install script
2 # Use inside the root of your Rails project
5 @basedir = File.join(File.dirname(__FILE__), '..')
7 def install(dir, file, executable=false)
8 puts "Installing: #{file}"
9 target = File.join('.', dir, file)
10 if File.exists?(target)
11 puts "#{target} already exists, skipping"
13 FileUtils.cp File.join(@basedir, dir, file), target
14 FileUtils.chmod 0755, target if executable
19 install 'script', 'ferret_server', true
20 install 'config', 'ferret_server.yml'
22 puts IO.read(File.join(@basedir, 'README'))