Update Rails to 5.0.0.1 - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit d7e775889c384144700de870bc8479a7e3b6233c
(DIR) parent 07363cb3542caf65d451aa2e2cded20085d976c4
(HTM) Author: Chee Yeo <ckyeo.1@gmail.com>
Date: Thu, 25 Aug 2016 13:50:12 +0100
Update Rails to 5.0.0.1
Update Rails to latest version
Update migrations and schema to be Rails 5 compatible
Fix bug inside bin/warvox.rb
Generate new Rails 5 binstubs
Diffstat:
M .gitignore | 1 +
M Gemfile | 4 ++--
M Gemfile.lock | 68 ++++++++++++++++----------------
M bin/rails | 2 +-
M bin/warvox.rb | 2 +-
M db/migrate/20121228171549_initial_… | 23 +++++++++++------------
M db/migrate/20130113004653_create_r… | 7 +++----
M db/schema.rb | 77 ++++++++++++++-----------------
8 files changed, 87 insertions(+), 97 deletions(-)
---
(DIR) diff --git a/.gitignore b/.gitignore
@@ -30,3 +30,4 @@ config/secrets.yml
playbook.retry
TODO.md
+/public/assets
(DIR) diff --git a/Gemfile b/Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
gem 'unicorn'
-gem 'rails', '5.0.0'
+gem 'rails', '~> 5.0', '>= 5.0.0.1'
gem 'pg', '~> 0.18'
gem 'jquery-rails'
@@ -46,7 +46,7 @@ end
group :development, :test do
gem 'factory_girl_rails'
gem 'faker'
- gem 'rspec-rails'
+ gem 'rspec-rails', '~> 3.5'
gem 'byebug', platform: :mri
end
group :test do
(DIR) diff --git a/Gemfile.lock b/Gemfile.lock
@@ -29,39 +29,39 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.0.0)
- actionpack (= 5.0.0)
+ actioncable (5.0.0.1)
+ actionpack (= 5.0.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
- actionmailer (5.0.0)
- actionpack (= 5.0.0)
- actionview (= 5.0.0)
- activejob (= 5.0.0)
+ actionmailer (5.0.0.1)
+ actionpack (= 5.0.0.1)
+ actionview (= 5.0.0.1)
+ activejob (= 5.0.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.0.0)
- actionview (= 5.0.0)
- activesupport (= 5.0.0)
+ actionpack (5.0.0.1)
+ actionview (= 5.0.0.1)
+ activesupport (= 5.0.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.0.0)
- activesupport (= 5.0.0)
+ actionview (5.0.0.1)
+ activesupport (= 5.0.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- activejob (5.0.0)
- activesupport (= 5.0.0)
+ activejob (5.0.0.1)
+ activesupport (= 5.0.0.1)
globalid (>= 0.3.6)
- activemodel (5.0.0)
- activesupport (= 5.0.0)
- activerecord (5.0.0)
- activemodel (= 5.0.0)
- activesupport (= 5.0.0)
+ activemodel (5.0.0.1)
+ activesupport (= 5.0.0.1)
+ activerecord (5.0.0.1)
+ activemodel (= 5.0.0.1)
+ activesupport (= 5.0.0.1)
arel (~> 7.0)
- activesupport (5.0.0)
+ activesupport (5.0.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
@@ -205,17 +205,17 @@ GEM
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
- rails (5.0.0)
- actioncable (= 5.0.0)
- actionmailer (= 5.0.0)
- actionpack (= 5.0.0)
- actionview (= 5.0.0)
- activejob (= 5.0.0)
- activemodel (= 5.0.0)
- activerecord (= 5.0.0)
- activesupport (= 5.0.0)
+ rails (5.0.0.1)
+ actioncable (= 5.0.0.1)
+ actionmailer (= 5.0.0.1)
+ actionpack (= 5.0.0.1)
+ actionview (= 5.0.0.1)
+ activejob (= 5.0.0.1)
+ activemodel (= 5.0.0.1)
+ activerecord (= 5.0.0.1)
+ activesupport (= 5.0.0.1)
bundler (>= 1.3.0, < 2.0)
- railties (= 5.0.0)
+ railties (= 5.0.0.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
@@ -225,9 +225,9 @@ GEM
rails-settings-cached (0.6.5)
rails (>= 4.2.0)
rails_layout (1.0.29)
- railties (5.0.0)
- actionpack (= 5.0.0)
- activesupport (= 5.0.0)
+ railties (5.0.0.1)
+ actionpack (= 5.0.0.1)
+ activesupport (= 5.0.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
@@ -354,12 +354,12 @@ DEPENDENCIES
launchy
pg (~> 0.18)
psych_shield
- rails (= 5.0.0)
+ rails (~> 5.0, >= 5.0.0.1)
rails-settings-cached (>= 0.4.1)
rails_layout
reportable!
rex (~> 2.0.10)
- rspec-rails
+ rspec-rails (~> 3.5)
sass-rails (~> 5.0)
scrypt
selenium-webdriver
(DIR) diff --git a/bin/rails b/bin/rails
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-APP_PATH = File.expand_path('../../config/application', __FILE__)
+APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
(DIR) diff --git a/bin/warvox.rb b/bin/warvox.rb
@@ -15,7 +15,7 @@ end
$:.unshift(File.join(File.expand_path(File.dirname(base)), '..', 'lib'))
voxroot = File.expand_path(File.join(File.dirname(base), '..'))
-voxserv = File.expand_path(File.join(File.expand_path(voxroot), 'script', 'rails'))
+voxserv = File.expand_path(File.join(File.expand_path(voxroot), 'bin', 'rails'))
manager = File.expand_path(File.join(File.dirname(base), 'worker_manager.rb'))
require 'warvox'
(DIR) diff --git a/db/migrate/20121228171549_initial_schema.rb b/db/migrate/20121228171549_initial_schema.rb
@@ -1,6 +1,6 @@
-class InitialSchema < ActiveRecord::Migration
+# class InitialSchema < ActiveRecord::Migration
+class InitialSchema < ActiveRecord::Migration[5.0]
def up
-
# Require the intarray extension
execute("CREATE EXTENSION IF NOT EXISTS intarray")
@@ -9,7 +9,7 @@ class InitialSchema < ActiveRecord::Migration
t.text :value, :null => true
t.integer :thing_id, :null => true
t.string :thing_type, :limit => 30, :null => true
- t.timestamps
+ t.timestamps null: false
end
add_index :settings, [ :thing_type, :thing_id, :var ], :unique => true
@@ -32,13 +32,13 @@ class InitialSchema < ActiveRecord::Migration
t.string :current_login_ip # optional, see Authlogic::Session::MagicColumns
t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
- t.timestamps
+ t.timestamps null: false
t.boolean "enabled", :default => true
t.boolean "admin", :default => true
end
create_table 'projects' do |t|
- t.timestamps
+ t.timestamps null: false
t.text "name", :null => false
t.text "description"
t.text "included"
@@ -47,7 +47,7 @@ class InitialSchema < ActiveRecord::Migration
end
create_table "jobs" do |t|
- t.timestamps
+ t.timestamps null: false
t.integer "project_id", :null => false
t.string "locked_by"
t.timestamp "locked_at"
@@ -62,7 +62,7 @@ class InitialSchema < ActiveRecord::Migration
end
create_table "lines" do |t|
- t.timestamps
+ t.timestamps null: false
t.text "number", :null => false
t.integer "project_id", :null => false
t.text "line_type"
@@ -70,7 +70,7 @@ class InitialSchema < ActiveRecord::Migration
end
create_table "line_attributes" do |t|
- t.timestamps
+ t.timestamps null: false
t.integer "line_id", :null => false
t.integer "project_id", :null => false
t.text "name", :null => false
@@ -80,7 +80,7 @@ class InitialSchema < ActiveRecord::Migration
create_table "calls" do |t|
# Created by the dialer job
- t.timestamps
+ t.timestamps null: false
t.text "number", :null => false
t.integer "project_id", :null => false
t.integer "job_id", :null => false
@@ -115,7 +115,7 @@ class InitialSchema < ActiveRecord::Migration
end
create_table "signatures" do |t|
- t.timestamps
+ t.timestamps null: false
t.text "name", :null => false
t.string "source"
t.text "description"
@@ -130,7 +130,7 @@ class InitialSchema < ActiveRecord::Migration
end
create_table "providers" do |t|
- t.timestamps
+ t.timestamps null: false
t.text "name", :null => false
t.text "host", :null => false
t.integer "port", :null => false
@@ -151,7 +151,6 @@ class InitialSchema < ActiveRecord::Migration
add_index :call_media, :call_id
add_index :call_media, :project_id
add_index :signature_fp, :signature_id
-
end
def down
(DIR) diff --git a/db/migrate/20130113004653_create_reportable_cache.rb b/db/migrate/20130113004653_create_reportable_cache.rb
@@ -1,6 +1,5 @@
-class CreateReportableCache < ActiveRecord::Migration
-
- def self.up
+class CreateReportableCache < ActiveRecord::Migration[5.0]
+ def up
create_table :reportable_cache, :force => true do |t|
t.string :model_name, :null => false, :limit => 100
t.string :report_name, :null => false, :limit => 100
@@ -10,7 +9,7 @@ class CreateReportableCache < ActiveRecord::Migration
t.float :value, :null => false, :default => 0
t.datetime :reporting_period, :null => false
- t.timestamps
+ t.timestamps null: false
end
add_index :reportable_cache, [
(DIR) diff --git a/db/schema.rb b/db/schema.rb
@@ -1,4 +1,3 @@
-# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
@@ -27,14 +26,13 @@ ActiveRecord::Schema.define(version: 20130113004653) do
t.binary "png_big_freq"
t.binary "png_sig"
t.binary "png_sig_freq"
+ t.index ["call_id"], name: "index_call_media_on_call_id", using: :btree
+ t.index ["project_id"], name: "index_call_media_on_project_id", using: :btree
end
- add_index "call_media", ["call_id"], name: "index_call_media_on_call_id", using: :btree
- add_index "call_media", ["project_id"], name: "index_call_media_on_project_id", using: :btree
-
create_table "calls", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.text "number", null: false
t.integer "project_id", null: false
t.integer "job_id", null: false
@@ -52,15 +50,14 @@ ActiveRecord::Schema.define(version: 20130113004653) do
t.text "peak_freq_data"
t.text "line_type"
t.integer "fprint", array: true
+ t.index ["job_id"], name: "index_calls_on_job_id", using: :btree
+ t.index ["number"], name: "index_calls_on_number", using: :btree
+ t.index ["provider_id"], name: "index_calls_on_provider_id", using: :btree
end
- add_index "calls", ["job_id"], name: "index_calls_on_job_id", using: :btree
- add_index "calls", ["number"], name: "index_calls_on_number", using: :btree
- add_index "calls", ["provider_id"], name: "index_calls_on_provider_id", using: :btree
-
create_table "jobs", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.integer "project_id", null: false
t.string "locked_by"
t.datetime "locked_at"
@@ -72,38 +69,35 @@ ActiveRecord::Schema.define(version: 20130113004653) do
t.string "status"
t.text "error"
t.integer "progress", default: 0
+ t.index ["project_id"], name: "index_jobs_on_project_id", using: :btree
end
- add_index "jobs", ["project_id"], name: "index_jobs_on_project_id", using: :btree
-
create_table "line_attributes", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.integer "line_id", null: false
t.integer "project_id", null: false
t.text "name", null: false
t.binary "value", null: false
t.string "content_type", default: "text"
+ t.index ["line_id"], name: "index_line_attributes_on_line_id", using: :btree
+ t.index ["project_id"], name: "index_line_attributes_on_project_id", using: :btree
end
- add_index "line_attributes", ["line_id"], name: "index_line_attributes_on_line_id", using: :btree
- add_index "line_attributes", ["project_id"], name: "index_line_attributes_on_project_id", using: :btree
-
create_table "lines", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.text "number", null: false
t.integer "project_id", null: false
t.text "line_type"
t.text "notes"
+ t.index ["number"], name: "index_lines_on_number", using: :btree
+ t.index ["project_id"], name: "index_lines_on_project_id", using: :btree
end
- add_index "lines", ["number"], name: "index_lines_on_number", using: :btree
- add_index "lines", ["project_id"], name: "index_lines_on_project_id", using: :btree
-
create_table "projects", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.text "name", null: false
t.text "description"
t.text "included"
@@ -112,8 +106,8 @@ ActiveRecord::Schema.define(version: 20130113004653) do
end
create_table "providers", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.text "name", null: false
t.text "host", null: false
t.integer "port", null: false
@@ -131,34 +125,31 @@ ActiveRecord::Schema.define(version: 20130113004653) do
t.string "conditions", limit: 100, null: false
t.float "value", default: 0.0, null: false
t.datetime "reporting_period", null: false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["model_name", "report_name", "grouping", "aggregation", "conditions", "reporting_period"], name: "name_model_grouping_aggregation_period", unique: true, using: :btree
+ t.index ["model_name", "report_name", "grouping", "aggregation", "conditions"], name: "name_model_grouping_agregation", using: :btree
end
- add_index "reportable_cache", ["model_name", "report_name", "grouping", "aggregation", "conditions", "reporting_period"], name: "name_model_grouping_aggregation_period", unique: true, using: :btree
- add_index "reportable_cache", ["model_name", "report_name", "grouping", "aggregation", "conditions"], name: "name_model_grouping_agregation", using: :btree
-
create_table "settings", force: :cascade do |t|
t.string "var", null: false
t.text "value"
t.integer "thing_id"
t.string "thing_type", limit: 30
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true, using: :btree
end
- add_index "settings", ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true, using: :btree
-
create_table "signature_fp", force: :cascade do |t|
t.integer "signature_id", null: false
t.integer "fprint", array: true
+ t.index ["signature_id"], name: "index_signature_fp_on_signature_id", using: :btree
end
- add_index "signature_fp", ["signature_id"], name: "index_signature_fp_on_signature_id", using: :btree
-
create_table "signatures", force: :cascade do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.text "name", null: false
t.string "source"
t.text "description"
@@ -182,8 +173,8 @@ ActiveRecord::Schema.define(version: 20130113004653) do
t.datetime "last_login_at"
t.string "current_login_ip"
t.string "last_login_ip"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.boolean "enabled", default: true
t.boolean "admin", default: true
end