Fix command paths - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 2f9ae946a773cf231a7321c9397703b231cad481
 (DIR) parent cdb039c03fc022704e2b0cec9489e03492538eca
 (HTM) Author: HD Moore <hd_moore@rapid7.com>
       Date:   Wed, 26 Dec 2012 23:02:45 -0600
       
       Fix command paths
       
       Diffstat:
         M Gemfile.lock                        |       6 ------
         M Makefile                            |      10 +++++-----
         M bin/export_audio.rb                 |       5 ++---
         M bin/export_list.rb                  |       5 ++---
         M bin/identify_matches.rb             |       8 ++++----
         M bin/verify_install.rb               |       6 +++---
         M bin/warvox.rb                       |       8 ++++----
       
       7 files changed, 20 insertions(+), 28 deletions(-)
       ---
 (DIR) diff --git a/Gemfile.lock b/Gemfile.lock
       @@ -38,11 +38,6 @@ GEM
              execjs
            coffee-script-source (1.4.0)
            daemons (1.1.9)
       -    delayed_job (3.0.4)
       -      activesupport (~> 3.0)
       -    delayed_job_active_record (0.3.3)
       -      activerecord (>= 2.1.0, < 4)
       -      delayed_job (~> 3.0)
            dynamic_form (1.1.4)
            erubis (2.7.0)
            eventmachine (1.0.0)
       @@ -119,7 +114,6 @@ PLATFORMS
        
        DEPENDENCIES
          coffee-rails (~> 3.2.1)
       -  delayed_job_active_record
          dynamic_form
          jquery-rails
          kissfft
 (DIR) diff --git a/Makefile b/Makefile
       @@ -2,8 +2,8 @@ all: test
        
        test: install
                bin/verify_install.rb
       -        
       -install: bundler dtmf2num 
       +
       +install: bundler dtmf2num
                cp -a src/dtmf2num/dtmf2num bin/
        
        dtmf2num:
       @@ -11,7 +11,7 @@ dtmf2num:
        
        db:
                @echo "Checking the database.."
       -        (cd web; RAILS_ENV=production bundle exec rake db:migrate )
       +        RAILS_ENV=production bundle exec rake db:migrate
        
        bundler:
                @echo "Checking for RubyGems and the Bundler gem..."
       @@ -19,9 +19,9 @@ bundler:
        
                @echo "Validating that 'bundle' is in the path..."
                which bundle
       -        
       +
                @echo "Installing missing gems as needed.."
       -        (cd web; bundle install)
       +        bundle install
        
        clean:
                make -C src/dtmf2num/ clean
 (DIR) diff --git a/bin/export_audio.rb b/bin/export_audio.rb
       @@ -3,7 +3,7 @@
        
        #
        # Load the library path
       -# 
       +#
        base = __FILE__
        while File.symlink?(base)
                base = File.expand_path(File.readlink(base), File.dirname(base))
       @@ -16,7 +16,7 @@ require 'fileutils'
        
        ENV['RAILS_ENV'] ||= 'production'
        
       -$:.unshift(File.join(File.expand_path(File.dirname(base)), '..', 'web'))
       +$:.unshift(File.join(File.expand_path(File.dirname(base)), '..'))
        require 'config/boot'
        require 'config/environment'
        
       @@ -66,4 +66,3 @@ rescue ActiveRecord::RecordNotFound
                $stderr.puts "Job not found"
                exit
        end
       -
 (DIR) diff --git a/bin/export_list.rb b/bin/export_list.rb
       @@ -3,7 +3,7 @@
        
        #
        # Load the library path
       -# 
       +#
        base = __FILE__
        while File.symlink?(base)
                base = File.expand_path(File.readlink(base), File.dirname(base))
       @@ -14,7 +14,7 @@ require 'warvox'
        
        ENV['RAILS_ENV'] ||= 'production'
        
       -$:.unshift(File.join(File.expand_path(File.dirname(base)), '..', 'web'))
       +$:.unshift(File.join(File.expand_path(File.dirname(base)), '..'))
        require 'config/boot'
        require 'config/environment'
        
       @@ -55,4 +55,3 @@ rescue ActiveRecord::RecordNotFound
                $stderr.puts "Job not found"
                exit
        end
       -
 (DIR) diff --git a/bin/identify_matches.rb b/bin/identify_matches.rb
       @@ -3,7 +3,7 @@
        
        #
        # Load the library path
       -# 
       +#
        base = __FILE__
        while File.symlink?(base)
                base = File.expand_path(File.readlink(base), File.dirname(base))
       @@ -14,7 +14,7 @@ require 'warvox'
        
        ENV['RAILS_ENV'] ||= 'production'
        
       -$:.unshift(File.join(File.expand_path(File.dirname(base)), '..', 'web'))
       +$:.unshift(File.join(File.expand_path(File.dirname(base)), '..'))
        require 'config/boot'
        require 'config/environment'
        
       @@ -46,7 +46,7 @@ end
        fp  = $stdin.read.strip if fp == "-"
        job = nil if job.downcase == "all"
        
       -if not fp 
       +if not fp
                usage()
        end
        
       @@ -59,7 +59,7 @@ begin
                                " (( icount('#{fp}'::int[] & dial_results.fprint::int[]) / icount('#{fp}'::int[])::float ) * 100.0 ) AS matchscore " +
                                "FROM dial_results " +
                                "WHERE " +
       -                        " icount(dial_results.fprint) > 0 AND " + 
       +                        " icount(dial_results.fprint) > 0 AND " +
                                " dial_results.dial_job_id = '#{job.id}' " +
                                "ORDER BY matchscore DESC"
                else
 (DIR) diff --git a/bin/verify_install.rb b/bin/verify_install.rb
       @@ -3,7 +3,7 @@
        
        #
        # Load the library path
       -# 
       +#
        base = __FILE__
        while File.symlink?(base)
                base = File.expand_path(File.readlink(base), File.dirname(base))
       @@ -37,7 +37,7 @@ begin
                puts "[*] The Bundler gem has been installed"
        rescue ::LoadError
                puts "[*] ERROR: The Bundler gem has not been installed:"
       -        puts "    $ sudo gem install bundler"        
       +        puts "    $ sudo gem install bundler"
                exit
        end
        
       @@ -93,7 +93,7 @@ puts "[*]    $ psql"
        puts "[*]    psql> alter user warvox with password 'randompass';"
        puts "[*]    psql> exit"
        puts "[*]"
       -puts "[*] 5. Modify web/config/database.yml to match this password"
       +puts "[*] 5. Modify config/database.yml to match this password"
        puts "[*]"
        puts "[*] 6. Modify etc/warvox.conf and set a UI password"
        puts "[*]"
 (DIR) diff --git a/bin/warvox.rb b/bin/warvox.rb
       @@ -6,13 +6,13 @@ require 'getoptlong'
        
        #
        # Load the library path
       -# 
       +#
        base = __FILE__
        while File.symlink?(base)
                base = File.expand_path(File.readlink(base), File.dirname(base))
        end
        
       -voxroot = File.join(File.dirname(base), '..', 'web')
       +voxroot = File.join(File.dirname(base), '..')
        voxserv = File.join(File.expand_path(voxroot), 'script', 'rails')
        
        Dir.chdir(voxroot)
       @@ -22,7 +22,7 @@ def usage
                exit(0)
        end
        
       -opts    = 
       +opts    =
        {
                'ServerPort' => 7777,
                'ServerHost' => '127.0.0.1',
       @@ -51,7 +51,7 @@ end
        
        args = [
                'server',
       -        '-p', opts['ServerPort'].to_s, 
       +        '-p', opts['ServerPort'].to_s,
                '-b', opts['ServerHost'],
                '-e', 'production',
        ]