Skip to content

Upgrade to Ruby 2.4.0, Rails 5.0.1, and Scrivito 1.7.0 #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.3
2.4.0
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby '2.3.3'
ruby '2.4.0'

gem 'rails', '~> 4.2.7'
gem 'rails', '~> 5.0'
gem 'scrivito'

gem 'scrivito_section_widgets'
Expand Down Expand Up @@ -35,6 +35,10 @@ group :development, :test do
gem 'minitest-retry'
end

group :test do
gem 'rails-controller-testing'
end

group :production do
gem 'pg'
end
161 changes: 86 additions & 75 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
actioncable (5.0.1)
actionpack (= 5.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.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.1)
actionview (= 5.0.1)
activesupport (= 5.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.7.1)
activesupport (= 4.2.7.1)
actionview (5.0.1)
activesupport (= 5.0.1)
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.2)
activejob (4.2.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.7.1)
activejob (5.0.1)
activesupport (= 5.0.1)
globalid (>= 0.3.6)
activemodel (5.0.1)
activesupport (= 5.0.1)
activerecord (5.0.1)
activemodel (= 5.0.1)
activesupport (= 5.0.1)
arel (~> 7.0)
activesupport (5.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
arel (6.0.4)
autoprefixer-rails (6.6.0)
arel (7.1.4)
autoprefixer-rails (6.6.1)
execjs
backports (3.6.8)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.2)
builder (3.2.3)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
Expand All @@ -61,11 +63,11 @@ GEM
ethon (0.10.1)
ffi (>= 1.3.0)
execjs (2.7.0)
faraday (0.10.0)
faraday (0.11.0)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.1)
faraday_middleware (0.11.0)
faraday (>= 0.7.4, < 1.0)
ffi (1.9.14)
ffi (1.9.17)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
gh (0.15.0)
Expand All @@ -91,7 +93,7 @@ GEM
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (1.8.3)
json (2.0.3)
launchy (2.4.3)
addressable (~> 2.3)
loofah (2.0.3)
Expand All @@ -105,12 +107,13 @@ GEM
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
minitest-retry (0.1.6)
minitest-retry (0.1.8)
minitest (>= 5.0)
multi_json (1.12.1)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
nio4r (1.2.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
pg (0.19.0)
Expand All @@ -123,31 +126,34 @@ GEM
pusher-client (0.6.2)
json
websocket (~> 1.0)
rack (1.6.5)
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
rails (5.0.1)
actioncable (= 5.0.1)
actionmailer (= 5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
activemodel (= 5.0.1)
activerecord (= 5.0.1)
activesupport (= 5.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.8)
activesupport (>= 4.2.0.beta, < 5.0)
railties (= 5.0.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.1)
actionpack (~> 5.x)
actionview (~> 5.x)
activesupport (~> 5.x)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
railties (5.0.1)
actionpack (= 5.0.1)
activesupport (= 5.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
Expand Down Expand Up @@ -175,39 +181,39 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
scrivito (1.6.1)
scrivito (1.7.0)
railties
scrivito_content_browser (= 1.6.1)
scrivito_editors (= 1.6.1)
scrivito_sdk (= 1.6.1)
scrivito_ui (= 1.6.1)
scrivito_content_browser (1.6.1)
scrivito_content_browser (= 1.7.0)
scrivito_editors (= 1.7.0)
scrivito_sdk (= 1.7.0)
scrivito_ui (= 1.7.0)
scrivito_content_browser (1.7.0)
railties
scrivito_sdk (= 1.6.1)
scrivito_editors (1.6.1)
scrivito_sdk (= 1.7.0)
scrivito_editors (1.7.0)
jquery-ui-rails (>= 5.0.0, < 7.0.0)
railties
scrivito_content_browser (= 1.6.1)
scrivito_sdk (= 1.6.1)
scrivito_sdk (1.6.1)
scrivito_content_browser (= 1.7.0)
scrivito_sdk (= 1.7.0)
scrivito_sdk (1.7.0)
addressable (~> 2.3)
connection_pool (~> 2.2)
diff-lcs (~> 1.2)
hyp_diff (~> 0.0.4)
jbuilder (~> 2.0)
json (>= 1.7.7)
json (>= 1.8.3)
memoist (>= 0.12.0)
multipart-post (~> 2.0)
nokogiri (~> 1.6)
rails (~> 4.2.0)
rails (>= 4.2, < 5.1)
rake (>= 0.9.2.2)
scrivito_section_widgets (1.0.4)
scrivito
scrivito_teaser_widget (0.1.2)
scrivito
scrivito_ui (1.6.1)
scrivito_ui (1.7.0)
railties
secure_headers (3.5.1)
secure_headers (3.6.0)
useragent
simple_grid_rails (0.1.0)
slop (3.6.0)
Expand All @@ -220,7 +226,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.12)
sqlite3 (1.3.13)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
Expand All @@ -240,11 +246,15 @@ GEM
uglifier (3.0.4)
execjs (>= 0.3.0, < 3)
useragent (0.16.8)
web-console (3.3.0)
activemodel (>= 4.2)
web-console (3.4.0)
actionview (>= 5.0)
activemodel (>= 5.0)
debug_inspector
railties (>= 4.2)
railties (>= 5.0)
websocket (1.2.3)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
ruby
Expand All @@ -258,7 +268,8 @@ DEPENDENCIES
minitest-retry
pg
pry-rails
rails (~> 4.2.7)
rails (~> 5.0)
rails-controller-testing
rake
rspec-rails
sass-rails
Expand All @@ -274,7 +285,7 @@ DEPENDENCIES
web-console

RUBY VERSION
ruby 2.3.3p222
ruby 2.4.0p0

BUNDLED WITH
1.13.7
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
class SessionsController < ApplicationController
before_filter :logged_in_user, only: [:destroy]
before_action :logged_in_user, only: [:destroy]

def create
if valid_credentials?(params[:email], params[:password])
Expand Down
2 changes: 2 additions & 0 deletions app/jobs/application_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class ApplicationJob < ActiveJob::Base
end
3 changes: 3 additions & 0 deletions app/models/application_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
2 changes: 1 addition & 1 deletion app/models/dojo.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
class Dojo < ActiveRecord::Base
class Dojo < ApplicationRecord
NUM_OF_COUNTRIES = "70"
NUM_OF_WHOLE_DOJOS = "1,200"
NUM_OF_JAPAN_DOJOS = "70"
Expand Down
7 changes: 1 addition & 6 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
5 changes: 0 additions & 5 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
require_relative '../config/boot'
require 'rake'
Rake.application.run
29 changes: 17 additions & 12 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)

Dir.chdir APP_ROOT do
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end

chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:
# Add necessary setup steps to this file.

puts "== Installing dependencies =="
system "gem install bundler --conservative"
system "bundle check || bundle install"
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
# end

puts "\n== Preparing database =="
system "bin/rake db:setup"
system! 'bin/rails db:setup'

puts "\n== Removing old logs and tempfiles =="
system "rm -f log/*"
system "rm -rf tmp/cache"
system! 'bin/rails log:clear tmp:clear'

puts "\n== Restarting application server =="
system "touch tmp/restart.txt"
system! 'bin/rails restart'
end
Loading