Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Update Rails to 5.0.0.1
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cheeyeo committed Aug 25, 2016
1 parent 07363cb commit d7e7758
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 97 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ config/secrets.yml
playbook.retry

TODO.md
/public/assets
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
Expand Down
68 changes: 34 additions & 34 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion bin/warvox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$:.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'
Expand Down
23 changes: 11 additions & 12 deletions db/migrate/20121228171549_initial_schema.rb
Original file line number Diff line number Diff line change
@@ -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")

Expand All @@ -9,7 +9,7 @@ def up
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
Expand All @@ -32,13 +32,13 @@ def up
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"
Expand All @@ -47,7 +47,7 @@ def up
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"
Expand All @@ -62,15 +62,15 @@ def up
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"
t.text "notes"
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
Expand All @@ -80,7 +80,7 @@ def up

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
Expand Down Expand Up @@ -115,7 +115,7 @@ def up
end

create_table "signatures" do |t|
t.timestamps
t.timestamps null: false
t.text "name", :null => false
t.string "source"
t.text "description"
Expand All @@ -130,7 +130,7 @@ def up
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
Expand All @@ -151,7 +151,6 @@ def up
add_index :call_media, :call_id
add_index :call_media, :project_id
add_index :signature_fp, :signature_id

end

def down
Expand Down
7 changes: 3 additions & 4 deletions db/migrate/20130113004653_create_reportable_cache.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +9,7 @@ def self.up
t.float :value, :null => false, :default => 0
t.datetime :reporting_period, :null => false

t.timestamps
t.timestamps null: false
end

add_index :reportable_cache, [
Expand Down
Loading

0 comments on commit d7e7758

Please sign in to comment.