aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2019-07-22 15:41:07 +0200
committerHans de Graaff <graaff@gentoo.org>2019-07-22 15:41:07 +0200
commita061f51f7023c414f53c95086a65569146cc43ac (patch)
treeee57245c183032ee2f1abe2d638398c1c8975df8
parentPin jquery-rails and require new enough version (diff)
downloadpackages-5-a061f51f7023c414f53c95086a65569146cc43ac.tar.gz
packages-5-a061f51f7023c414f53c95086a65569146cc43ac.tar.bz2
packages-5-a061f51f7023c414f53c95086a65569146cc43ac.zip
Migrate to Rails 5.0
This commit contains all the recommended steps in the commit guide: https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-2-to-rails-5-0 It also updates the associated web-console dependency. Signed-off-by: Hans de Graaff <graaff@gentoo.org>
-rw-r--r--Gemfile8
-rw-r--r--Gemfile.lock130
-rw-r--r--app/jobs/application_job.rb5
-rw-r--r--app/jobs/category_update_job.rb2
-rw-r--r--app/jobs/masks_update_job.rb2
-rw-r--r--app/jobs/package_removal_job.rb2
-rw-r--r--app/jobs/package_update_job.rb2
-rw-r--r--app/jobs/record_change_job.rb2
-rw-r--r--app/jobs/useflags_update_job.rb2
9 files changed, 87 insertions, 68 deletions
diff --git a/Gemfile b/Gemfile
index 6509fb7..dca327e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '4.2.11.1'
+gem 'rails', '5.0.7.2'
# Use mysql as the database for Active Record
# gem 'mysql2'
# Use SCSS for stylesheets
@@ -50,8 +50,12 @@ group :development do
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
- gem 'web-console', '~> 2.0'
+ gem 'web-console', '~> 3.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
+
+group :test do
+ gem 'rails-controller-testing'
+end
diff --git a/Gemfile.lock b/Gemfile.lock
index ec26ca7..f03a6b1 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,47 +1,49 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.2.11.1)
- actionpack (= 4.2.11.1)
- actionview (= 4.2.11.1)
- activejob (= 4.2.11.1)
+ actioncable (5.0.7.2)
+ actionpack (= 5.0.7.2)
+ nio4r (>= 1.2, < 3.0)
+ websocket-driver (~> 0.6.1)
+ actionmailer (5.0.7.2)
+ actionpack (= 5.0.7.2)
+ actionview (= 5.0.7.2)
+ activejob (= 5.0.7.2)
mail (~> 2.5, >= 2.5.4)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- actionpack (4.2.11.1)
- actionview (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- rack (~> 1.6)
- rack-test (~> 0.6.2)
- rails-dom-testing (~> 1.0, >= 1.0.5)
+ rails-dom-testing (~> 2.0)
+ actionpack (5.0.7.2)
+ actionview (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
+ rack (~> 2.0)
+ rack-test (~> 0.6.3)
+ rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (4.2.11.1)
- activesupport (= 4.2.11.1)
+ actionview (5.0.7.2)
+ activesupport (= 5.0.7.2)
builder (~> 3.1)
erubis (~> 2.7.0)
- rails-dom-testing (~> 1.0, >= 1.0.5)
+ rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (4.2.11.1)
- activesupport (= 4.2.11.1)
- globalid (>= 0.3.0)
- activemodel (4.2.11.1)
- activesupport (= 4.2.11.1)
- builder (~> 3.1)
- activerecord (4.2.11.1)
- activemodel (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- arel (~> 6.0)
- activesupport (4.2.11.1)
- i18n (~> 0.7)
+ activejob (5.0.7.2)
+ activesupport (= 5.0.7.2)
+ globalid (>= 0.3.6)
+ activemodel (5.0.7.2)
+ activesupport (= 5.0.7.2)
+ activerecord (5.0.7.2)
+ activemodel (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
+ arel (~> 7.0)
+ activesupport (5.0.7.2)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
- arel (6.0.4)
+ arel (7.1.4)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
- binding_of_caller (0.8.0)
- debug_inspector (>= 0.0.1)
+ bindex (0.8.1)
builder (3.2.3)
byebug (11.0.1)
coercible (1.0.0)
@@ -50,7 +52,6 @@ GEM
connection_pool (2.2.2)
crass (1.0.4)
daemons (1.3.1)
- debug_inspector (0.0.3)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
elasticsearch (5.0.5)
@@ -83,7 +84,7 @@ GEM
globalid (0.4.2)
activesupport (>= 4.2.0)
hashie (3.6.0)
- i18n (0.9.5)
+ i18n (1.6.0)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jbuilder (2.9.1)
@@ -97,11 +98,13 @@ GEM
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
+ method_source (0.9.2)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
multi_json (1.13.1)
multipart-post (2.1.1)
+ nio4r (2.4.0)
nokogiri (1.10.3)
mini_portile2 (~> 2.4.0)
octicons (9.1.1)
@@ -109,33 +112,36 @@ GEM
octicons_helper (9.1.1)
octicons (= 9.1.1)
rails
- rack (1.6.11)
+ rack (2.0.7)
rack-protection (2.0.5)
rack
rack-test (0.6.3)
rack (>= 1.0)
- rails (4.2.11.1)
- actionmailer (= 4.2.11.1)
- actionpack (= 4.2.11.1)
- actionview (= 4.2.11.1)
- activejob (= 4.2.11.1)
- activemodel (= 4.2.11.1)
- activerecord (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- bundler (>= 1.3.0, < 2.0)
- railties (= 4.2.11.1)
- sprockets-rails
- rails-deprecated_sanitizer (1.0.3)
- activesupport (>= 4.2.0.alpha)
- rails-dom-testing (1.0.9)
- activesupport (>= 4.2.0, < 5.0)
- nokogiri (~> 1.6)
- rails-deprecated_sanitizer (>= 1.0.1)
+ rails (5.0.7.2)
+ actioncable (= 5.0.7.2)
+ actionmailer (= 5.0.7.2)
+ actionpack (= 5.0.7.2)
+ actionview (= 5.0.7.2)
+ activejob (= 5.0.7.2)
+ activemodel (= 5.0.7.2)
+ activerecord (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
+ bundler (>= 1.3.0)
+ railties (= 5.0.7.2)
+ sprockets-rails (>= 2.0.0)
+ rails-controller-testing (1.0.4)
+ actionpack (>= 5.0.1.x)
+ actionview (>= 5.0.1.x)
+ activesupport (>= 5.0.1.x)
+ rails-dom-testing (2.0.3)
+ activesupport (>= 4.2.0)
+ nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
- railties (4.2.11.1)
- actionpack (= 4.2.11.1)
- activesupport (= 4.2.11.1)
+ railties (5.0.7.2)
+ actionpack (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
+ method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.3)
@@ -190,11 +196,14 @@ GEM
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
- web-console (2.3.0)
- activemodel (>= 4.0)
- binding_of_caller (>= 0.7.2)
- railties (>= 4.0)
- sprockets-rails (>= 2.0, < 4.0)
+ web-console (3.7.0)
+ actionview (>= 5.0)
+ activemodel (>= 5.0)
+ bindex (>= 0.4.0)
+ railties (>= 5.0)
+ websocket-driver (0.6.5)
+ websocket-extensions (>= 0.1.0)
+ websocket-extensions (0.1.4)
PLATFORMS
ruby
@@ -207,7 +216,8 @@ DEPENDENCIES
jquery-rails (~> 4.3.5)
nokogiri
octicons_helper
- rails (= 4.2.11.1)
+ rails (= 5.0.7.2)
+ rails-controller-testing
rdiscount
sass-rails (~> 5.0)
sdoc (~> 1.0)
@@ -216,7 +226,7 @@ DEPENDENCIES
thin
turbolinks
uglifier (>= 1.3.0)
- web-console (~> 2.0)
+ web-console (~> 3.0)
BUNDLED WITH
1.17.3
diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb
new file mode 100644
index 0000000..7a7eab0
--- /dev/null
+++ b/app/jobs/application_job.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+# Application-specific defaults for ActiveJob
+class ApplicationJob < ActiveJob::Base
+end
diff --git a/app/jobs/category_update_job.rb b/app/jobs/category_update_job.rb
index 6418bb4..7443099 100644
--- a/app/jobs/category_update_job.rb
+++ b/app/jobs/category_update_job.rb
@@ -1,4 +1,4 @@
-class CategoryUpdateJob < ActiveJob::Base
+class CategoryUpdateJob < ApplicationJob
queue_as :default
def perform(*args)
diff --git a/app/jobs/masks_update_job.rb b/app/jobs/masks_update_job.rb
index a6574a0..a032396 100644
--- a/app/jobs/masks_update_job.rb
+++ b/app/jobs/masks_update_job.rb
@@ -1,4 +1,4 @@
-class MasksUpdateJob < ActiveJob::Base
+class MasksUpdateJob < ApplicationJob
queue_as :default
def perform(*_args)
diff --git a/app/jobs/package_removal_job.rb b/app/jobs/package_removal_job.rb
index 1041f05..877ed07 100644
--- a/app/jobs/package_removal_job.rb
+++ b/app/jobs/package_removal_job.rb
@@ -1,4 +1,4 @@
-class PackageRemovalJob < ActiveJob::Base
+class PackageRemovalJob < ApplicationJob
queue_as :default
def perform(*args)
diff --git a/app/jobs/package_update_job.rb b/app/jobs/package_update_job.rb
index 8c4fd43..55e278f 100644
--- a/app/jobs/package_update_job.rb
+++ b/app/jobs/package_update_job.rb
@@ -1,4 +1,4 @@
-class PackageUpdateJob < ActiveJob::Base
+class PackageUpdateJob < ApplicationJob
queue_as :default
def perform(*args)
diff --git a/app/jobs/record_change_job.rb b/app/jobs/record_change_job.rb
index b2b4b10..0e6a011 100644
--- a/app/jobs/record_change_job.rb
+++ b/app/jobs/record_change_job.rb
@@ -1,4 +1,4 @@
-class RecordChangeJob < ActiveJob::Base
+class RecordChangeJob < ApplicationJob
queue_as :default
# Creates a Change object for the given data
diff --git a/app/jobs/useflags_update_job.rb b/app/jobs/useflags_update_job.rb
index d6f9e9b..21145c3 100644
--- a/app/jobs/useflags_update_job.rb
+++ b/app/jobs/useflags_update_job.rb
@@ -1,4 +1,4 @@
-class UseflagsUpdateJob < ActiveJob::Base
+class UseflagsUpdateJob < ApplicationJob
queue_as :default
def perform(*args)