| Bump rex to 2.0.3, update LICENSE, retab call.rb - warvox - VoIP based wardiali… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 5015670e3a10cbb3c934858c0097b9d83b5e0ab0 | |
| parent 0ee4fde89042537d057545c30f4520225f8a2562 | |
| Author: HD Moore <[email protected]> | |
| Date: Sun, 7 Sep 2014 14:52:43 -0500 | |
| Bump rex to 2.0.3, update LICENSE, retab call.rb | |
| Diffstat: | |
| M Gemfile | 2 +- | |
| M Gemfile.lock | 4 ++-- | |
| M README.md | 4 ++-- | |
| M app/models/call.rb | 164 ++++++++++++++++-------------… | |
| M docs/LICENSE | 6 +++--- | |
| 5 files changed, 90 insertions(+), 90 deletions(-) | |
| --- | |
| diff --git a/Gemfile b/Gemfile | |
| @@ -13,7 +13,7 @@ gem 'jquery-datatables-rails', '>= 2.2.3' | |
| gem 'postgres_ext', :git => 'git://github.com/dockyard/postgres_ext.git' | |
| gem 'kissfft' | |
| -gem 'rex', '>= 2.0.2' | |
| +gem 'rex', '~> 2.0.3' | |
| gem 'sass-rails', '~> 4.0.2' | |
| gem 'coffee-rails', '~> 4.0.1' | |
| diff --git a/Gemfile.lock b/Gemfile.lock | |
| @@ -130,7 +130,7 @@ GEM | |
| rake (10.3.2) | |
| ref (1.0.5) | |
| request_store (1.1.0) | |
| - rex (2.0.2) | |
| + rex (2.0.3) | |
| sass (3.2.19) | |
| sass-rails (4.0.3) | |
| railties (>= 4.0.0, < 5.0) | |
| @@ -197,7 +197,7 @@ DEPENDENCIES | |
| rails-settings-cached (>= 0.4.1) | |
| rails_bootstrap_navbar (>= 2.0.1) | |
| reportable! | |
| - rex (>= 2.0.2) | |
| + rex (~> 2.0.3) | |
| sass-rails (~> 4.0.2) | |
| scrypt | |
| therubyracer | |
| diff --git a/README.md b/README.md | |
| @@ -19,8 +19,8 @@ WarVOX requires PostgreSQL 9.1 or newer with the "contrib" pa… | |
| To get started, install the OS-level dependencies: | |
| - $ sudo apt-get install gnuplot lame build-essential libssl-dev libcurl… | |
| - postgresql postgresql-contrib git-core curl libpq libpq-dev | |
| + $ sudo apt-get install gnuplot lame build-essential libssl-dev libcurl… | |
| + postgresql postgresql-contrib postgresql-common git-core curl libpq … | |
| Install RVM to obtain Ruby 1.9.3 or later | |
| diff --git a/app/models/call.rb b/app/models/call.rb | |
| @@ -1,86 +1,86 @@ | |
| class Call < ActiveRecord::Base | |
| - reportable :hourly, :aggregation => :count, :grouping => :hour, :live_… | |
| - reportable :daily, :aggregation => :count, :grouping => :day, :live_da… | |
| - reportable :weekly, :aggregation => :count, :grouping => :week, :live_… | |
| - reportable :monthly, :aggregation => :count, :grouping => :month, :liv… | |
| - | |
| - reportable :analyzed_hourly, :aggregation => :count, :grouping => :hou… | |
| - reportable :analyzed_daily, :aggregation => :count, :grouping => :day,… | |
| - reportable :analyzed_weekly, :aggregation => :count, :grouping => :wee… | |
| - reportable :analyzed_monthly, :aggregation => :count, :grouping => :mo… | |
| - | |
| - belongs_to :project | |
| - belongs_to :provider | |
| - belongs_to :job | |
| - has_one :call_medium, :dependent => :delete | |
| - | |
| - has_many :matches, :class_name => 'Call', :finder_sql => proc { | |
| - 'SELECT calls.*, ' + | |
| - " (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::… | |
| - 'FROM calls ' + | |
| - 'WHERE icount(calls.fprint) > 0 AND ' + | |
| - "calls.job_id = \'#{job_id}\' AND " + | |
| - "calls.id != \'#{id}\' " + | |
| -# "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int… | |
| - 'ORDER BY matchscore DESC' | |
| - } | |
| - | |
| - has_many :matches_all_jobs, :class_name => 'Call', :finder_sql => proc… | |
| - 'SELECT calls.*, ' + | |
| - " (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::… | |
| - 'FROM calls ' + | |
| - 'WHERE icount(calls.fprint) > 0 AND ' + | |
| - "calls.id != \'#{id}\' " + | |
| -# "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & cal… | |
| - 'ORDER BY matchscore DESC' | |
| - } | |
| - | |
| - | |
| - after_save :update_linked_line | |
| - | |
| - def paginate_matches(scope, min_match, page, per_page) | |
| - | |
| - scope_limit = "" | |
| - case scope | |
| - when 'job' | |
| - scope_limit = "calls.job_id = \'#{job_id}\' AND " | |
| - when 'project' | |
| - scope_limit = "calls.project_id = \'#{project_id}\' AN… | |
| - end | |
| - | |
| - query = | |
| - 'SELECT calls.*, ' + | |
| - " (( icount(\'{#{fprint.map{|x| x.to_s}.join(",… | |
| - 'FROM calls ' + | |
| - 'WHERE icount(calls.fprint) > 0 AND ' + | |
| - scope_limit + | |
| - "calls.id != \'#{id}\' " + | |
| - "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}… | |
| - 'ORDER BY matchscore DESC' | |
| - | |
| - Call.paginate_by_sql(query, :page => page, :per_page => per_pa… | |
| - end | |
| - | |
| - def media | |
| - CallMedium.find_or_create_by_call_id_and_project_id(self[:id],… | |
| - end | |
| - | |
| - def media_fields | |
| - CallMedium.columns_hash.keys.reject{|x| x =~ /^id|_id$/} | |
| - end | |
| - | |
| - def linked_line | |
| - Line.find_or_create_by_number_and_project_id(self[:number], se… | |
| - end | |
| - | |
| - def update_linked_line | |
| - line = linked_line | |
| - | |
| - if self[:line_type] | |
| - line.line_type = self[:line_type] | |
| - line.save | |
| - end | |
| - end | |
| + reportable :hourly, :aggregation => :count, :grouping => :hour, :live_data =… | |
| + reportable :daily, :aggregation => :count, :grouping => :day, :live_data => … | |
| + reportable :weekly, :aggregation => :count, :grouping => :week, :live_data =… | |
| + reportable :monthly, :aggregation => :count, :grouping => :month, :live_data… | |
| + | |
| + reportable :analyzed_hourly, :aggregation => :count, :grouping => :hour, :da… | |
| + reportable :analyzed_daily, :aggregation => :count, :grouping => :day, :date… | |
| + reportable :analyzed_weekly, :aggregation => :count, :grouping => :week, :da… | |
| + reportable :analyzed_monthly, :aggregation => :count, :grouping => :month, :… | |
| + | |
| + belongs_to :project | |
| + belongs_to :provider | |
| + belongs_to :job | |
| + has_one :call_medium, :dependent => :delete | |
| + | |
| + has_many :matches, :class_name => 'Call', :finder_sql => proc { | |
| + 'SELECT calls.*, ' + | |
| + " (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fpri… | |
| + 'FROM calls ' + | |
| + 'WHERE icount(calls.fprint) > 0 AND ' + | |
| + "calls.job_id = \'#{job_id}\' AND " + | |
| + "calls.id != \'#{id}\' " + | |
| +# "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.f… | |
| + 'ORDER BY matchscore DESC' | |
| + } | |
| + | |
| + has_many :matches_all_jobs, :class_name => 'Call', :finder_sql => proc { | |
| + 'SELECT calls.*, ' + | |
| + " (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fpri… | |
| + 'FROM calls ' + | |
| + 'WHERE icount(calls.fprint) > 0 AND ' + | |
| + "calls.id != \'#{id}\' " + | |
| +# "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fpr… | |
| + 'ORDER BY matchscore DESC' | |
| + } | |
| + | |
| + | |
| + after_save :update_linked_line | |
| + | |
| + def paginate_matches(scope, min_match, page, per_page) | |
| + | |
| + scope_limit = "" | |
| + case scope | |
| + when 'job' | |
| + scope_limit = "calls.job_id = \'#{job_id}\' AND " | |
| + when 'project' | |
| + scope_limit = "calls.project_id = \'#{project_id}\' AND " | |
| + end | |
| + | |
| + query = | |
| + 'SELECT calls.*, ' + | |
| + " (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fp… | |
| + 'FROM calls ' + | |
| + 'WHERE icount(calls.fprint) > 0 AND ' + | |
| + scope_limit + | |
| + "calls.id != \'#{id}\' " + | |
| + "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.… | |
| + 'ORDER BY matchscore DESC' | |
| + | |
| + Call.paginate_by_sql(query, :page => page, :per_page => per_page) | |
| + end | |
| + | |
| + def media | |
| + CallMedium.find_or_create_by_call_id_and_project_id(self[:id], self[:proje… | |
| + end | |
| + | |
| + def media_fields | |
| + CallMedium.columns_hash.keys.reject{|x| x =~ /^id|_id$/} | |
| + end | |
| + | |
| + def linked_line | |
| + Line.find_or_create_by_number_and_project_id(self[:number], self[:project_… | |
| + end | |
| + | |
| + def update_linked_line | |
| + line = linked_line | |
| + | |
| + if self[:line_type] | |
| + line.line_type = self[:line_type] | |
| + line.save | |
| + end | |
| + end | |
| end | |
| diff --git a/docs/LICENSE b/docs/LICENSE | |
| @@ -1,4 +1,4 @@ | |
| -Copyright (c) 2009-2013, Rapid7 Inc | |
| +Copyright (c) 2009-2014, Rapid7, Inc. | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without modificatio… | |
| @@ -11,7 +11,7 @@ are permitted provided that the following conditions are met: | |
| this list of conditions and the following disclaimer in the document… | |
| and/or other materials provided with the distribution. | |
| - * Neither the name of Rapid7 Inc nor the names of its contributors | |
| + * Neither the name of Rapid7, Inc. nor the names of its contributors | |
| may be used to endorse or promote products derived from this software | |
| without specific prior written permission. | |
| @@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| WarVOX is provided under the BSD license above. | |
| -The copyright on this package is held by Rapid7 Inc. | |
| +The copyright on this package is held by Rapid7, Inc. | |
| This copyright and license does not apply to the following components: | |
| - The ruby on rails vendor libraries under web/vendor/ (Ruby license) |