Bump rex to 2.0.3, update LICENSE, retab call.rb - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 5015670e3a10cbb3c934858c0097b9d83b5e0ab0
(DIR) parent 0ee4fde89042537d057545c30f4520225f8a2562
(HTM) Author: HD Moore <hd_moore@rapid7.com>
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(-)
---
(DIR) 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'
(DIR) 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
(DIR) diff --git a/README.md b/README.md
@@ -19,8 +19,8 @@ WarVOX requires PostgreSQL 9.1 or newer with the "contrib" package installed for
To get started, install the OS-level dependencies:
- $ sudo apt-get install gnuplot lame build-essential libssl-dev libcurl3-openssl-dev \
- postgresql postgresql-contrib git-core curl libpq libpq-dev
+ $ sudo apt-get install gnuplot lame build-essential libssl-dev libcurl4-openssl-dev \
+ postgresql postgresql-contrib postgresql-common git-core curl libpq libpq-dev
Install RVM to obtain Ruby 1.9.3 or later
(DIR) 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_data => true, :cacheable => false, :limit => 24
- reportable :daily, :aggregation => :count, :grouping => :day, :live_data => true, :cacheable => false, :limit => 7
- reportable :weekly, :aggregation => :count, :grouping => :week, :live_data => true, :cacheable => false, :limit => 52
- reportable :monthly, :aggregation => :count, :grouping => :month, :live_data => true, :cacheable => false, :limit => 12
-
- reportable :analyzed_hourly, :aggregation => :count, :grouping => :hour, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 24
- reportable :analyzed_daily, :aggregation => :count, :grouping => :day, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 7
- reportable :analyzed_weekly, :aggregation => :count, :grouping => :week, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 52
- reportable :analyzed_monthly, :aggregation => :count, :grouping => :month, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 12
-
- 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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) AS matchscore " +
- '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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) > 10.0 " +
- '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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[])::float ) * 100.0 ) AS matchscore " +
- 'FROM calls ' +
- 'WHERE icount(calls.fprint) > 0 AND ' +
- "calls.id != \'#{id}\' " +
-# "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) > 10.0 " +
- '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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) AS matchscore " +
- 'FROM calls ' +
- 'WHERE icount(calls.fprint) > 0 AND ' +
- scope_limit +
- "calls.id != \'#{id}\' " +
- "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) > #{min_match} " +
- '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[:project_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], self[:project_id])
- 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 => true, :cacheable => false, :limit => 24
+ reportable :daily, :aggregation => :count, :grouping => :day, :live_data => true, :cacheable => false, :limit => 7
+ reportable :weekly, :aggregation => :count, :grouping => :week, :live_data => true, :cacheable => false, :limit => 52
+ reportable :monthly, :aggregation => :count, :grouping => :month, :live_data => true, :cacheable => false, :limit => 12
+
+ reportable :analyzed_hourly, :aggregation => :count, :grouping => :hour, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 24
+ reportable :analyzed_daily, :aggregation => :count, :grouping => :day, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 7
+ reportable :analyzed_weekly, :aggregation => :count, :grouping => :week, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 52
+ reportable :analyzed_monthly, :aggregation => :count, :grouping => :month, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false, :limit => 12
+
+ 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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) AS matchscore " +
+ '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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) > 10.0 " +
+ '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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[])::float ) * 100.0 ) AS matchscore " +
+ 'FROM calls ' +
+ 'WHERE icount(calls.fprint) > 0 AND ' +
+ "calls.id != \'#{id}\' " +
+# "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) > 10.0 " +
+ '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.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) AS matchscore " +
+ 'FROM calls ' +
+ 'WHERE icount(calls.fprint) > 0 AND ' +
+ scope_limit +
+ "calls.id != \'#{id}\' " +
+ "AND (( icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}\'::int[] & calls.fprint::int[]) / icount(\'{#{fprint.map{|x| x.to_s}.join(",")}}'::int[])::float ) * 100.0 ) > #{min_match} " +
+ '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[:project_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], self[:project_id])
+ end
+
+ def update_linked_line
+ line = linked_line
+
+ if self[:line_type]
+ line.line_type = self[:line_type]
+ line.save
+ end
+ end
end
(DIR) 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 modification,
@@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
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)