Skip to content

Commit

Permalink
Upgraded to Rails 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahW91 committed May 13, 2020
1 parent dbcde51 commit 1009601
Show file tree
Hide file tree
Showing 27 changed files with 781 additions and 702 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source 'https://rubygems.org'

ruby '2.6.6'

gem 'rails', '5.1.5'
gem 'rails', '5.2.4.2'

# Postgres
gem 'pg'
Expand Down
128 changes: 68 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,55 @@ GIT

GIT
remote: https://github.com/seuros/capistrano-sidekiq.git
revision: 92bf51eae4bdcc2eee2c1d0b2883d77e5e3f1ab8
revision: bb661daf848bd7a176bca8fc4633803c3de24091
specs:
capistrano-sidekiq (1.0.3)
capistrano-sidekiq (2.0.0.beta1)
capistrano (>= 3.9.0)
sidekiq (>= 3.4, < 6.0)
capistrano-bundler
sidekiq (>= 6.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.5)
actionpack (= 5.1.5)
actioncable (5.2.4.2)
actionpack (= 5.2.4.2)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.5)
actionpack (= 5.1.5)
actionview (= 5.1.5)
activejob (= 5.1.5)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.2)
actionpack (= 5.2.4.2)
actionview (= 5.2.4.2)
activejob (= 5.2.4.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.5)
actionview (= 5.1.5)
activesupport (= 5.1.5)
rack (~> 2.0)
actionpack (5.2.4.2)
actionview (= 5.2.4.2)
activesupport (= 5.2.4.2)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.5)
activesupport (= 5.1.5)
actionview (5.2.4.2)
activesupport (= 5.2.4.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.5)
activesupport (= 5.1.5)
activejob (5.2.4.2)
activesupport (= 5.2.4.2)
globalid (>= 0.3.6)
activemodel (5.1.5)
activesupport (= 5.1.5)
activerecord (5.1.5)
activemodel (= 5.1.5)
activesupport (= 5.1.5)
arel (~> 8.0)
activesupport (5.1.5)
activemodel (5.2.4.2)
activesupport (= 5.2.4.2)
activerecord (5.2.4.2)
activemodel (= 5.2.4.2)
activesupport (= 5.2.4.2)
arel (>= 9.0)
activestorage (5.2.4.2)
actionpack (= 5.2.4.2)
activerecord (= 5.2.4.2)
marcel (~> 0.3.1)
activesupport (5.2.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
Expand All @@ -62,7 +67,7 @@ GEM
sshkit (>= 1.6.1, != 1.7.0)
ancestry (3.0.7)
activerecord (>= 3.2.0)
arel (8.0.0)
arel (9.0.0)
autoprefixer-rails (9.7.6)
execjs
aws-eventstream (1.1.0)
Expand Down Expand Up @@ -407,7 +412,7 @@ GEM
aws-sdk-iotsecuretunneling (1.2.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-iotsitewise (1.1.0)
aws-sdk-iotsitewise (1.2.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-iotthingsgraph (1.6.0)
Expand Down Expand Up @@ -952,7 +957,7 @@ GEM
aws-sdk-worklink (1.14.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-workmail (1.23.0)
aws-sdk-workmail (1.24.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-workmailmessageflow (1.3.0)
Expand Down Expand Up @@ -1022,9 +1027,9 @@ GEM
cli (1.3.1)
climate_control (0.2.0)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
railties (>= 5.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
Expand All @@ -1049,8 +1054,8 @@ GEM
factory_bot_rails (5.2.0)
factory_bot (~> 5.2.0)
railties (>= 4.2.0)
faker (2.2.1)
i18n (>= 0.8)
faker (2.11.0)
i18n (>= 1.6, < 2)
ffi (1.12.2)
ffi (1.12.2-x86-mingw32)
formatador (0.2.5)
Expand All @@ -1070,7 +1075,7 @@ GEM
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
i18n (0.9.5)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -1099,13 +1104,15 @@ GEM
lumberjack (1.2.4)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
meta_request (0.7.2)
rack-contrib (>= 1.1, < 3)
railties (>= 3.0.0, < 7)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0425)
mime-types-data (3.2020.0512)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
Expand Down Expand Up @@ -1139,45 +1146,46 @@ GEM
terrapin (~> 0.6.0)
pg (1.2.3)
pg (1.2.3-x86-mingw32)
pg_search (2.3.0)
activerecord (>= 4.2)
activesupport (>= 4.2)
pg_search (2.3.2)
activerecord (>= 5.2)
activesupport (>= 5.2)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.5)
puma (4.3.3)
nio4r (~> 2.0)
rack (2.0.9)
rack (2.2.2)
rack-contrib (2.2.0)
rack (~> 2.0)
rack-protection (2.0.8.1)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.5)
actioncable (= 5.1.5)
actionmailer (= 5.1.5)
actionpack (= 5.1.5)
actionview (= 5.1.5)
activejob (= 5.1.5)
activemodel (= 5.1.5)
activerecord (= 5.1.5)
activesupport (= 5.1.5)
rails (5.2.4.2)
actioncable (= 5.2.4.2)
actionmailer (= 5.2.4.2)
actionpack (= 5.2.4.2)
actionview (= 5.2.4.2)
activejob (= 5.2.4.2)
activemodel (= 5.2.4.2)
activerecord (= 5.2.4.2)
activestorage (= 5.2.4.2)
activesupport (= 5.2.4.2)
bundler (>= 1.3.0)
railties (= 5.1.5)
railties (= 5.2.4.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.1.5)
actionpack (= 5.1.5)
activesupport (= 5.1.5)
railties (5.2.4.2)
actionpack (= 5.2.4.2)
activesupport (= 5.2.4.2)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.19.0, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -1238,11 +1246,11 @@ GEM
activesupport (>= 3)
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
sidekiq (5.2.8)
connection_pool (~> 2.2, >= 2.2.2)
rack (< 2.1.0)
rack-protection (>= 1.5.0)
redis (>= 3.3.5, < 5)
sidekiq (6.0.7)
connection_pool (>= 2.2.2)
rack (~> 2.0)
rack-protection (>= 2.0.0)
redis (>= 4.1.0)
sidekiq-client-cli (0.1.7)
cli
sidekiq (>= 2.15)
Expand Down Expand Up @@ -1297,7 +1305,7 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
websocket-driver (0.6.5)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
whenever (1.0.0)
Expand Down Expand Up @@ -1358,7 +1366,7 @@ DEPENDENCIES
pg
pg_search
puma
rails (= 5.1.5)
rails (= 5.2.4.2)
redis
roo-xls
rspec-rails
Expand Down
2 changes: 1 addition & 1 deletion bin/bundle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
9 changes: 1 addition & 8 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/usr/bin/env ruby.exe
# frozen_string_literal: true

begin
load File.expand_path('spring', __dir__)
rescue LoadError
end

#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
9 changes: 1 addition & 8 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/usr/bin/env ruby.exe
# frozen_string_literal: true

begin
load File.expand_path('spring', __dir__)
rescue LoadError
end

#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
6 changes: 4 additions & 2 deletions bin/setup
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/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 = File.expand_path('..', __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand All @@ -18,6 +17,9 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# Install JavaScript dependencies if using Yarn
# system('bin/yarn')

# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
Expand Down
6 changes: 4 additions & 2 deletions bin/update
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/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 = File.expand_path('..', __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand All @@ -18,6 +17,9 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# Install JavaScript dependencies if using Yarn
# system('bin/yarn')

puts "\n== Updating database =="
system! 'bin/rails db:migrate'

Expand Down
11 changes: 11 additions & 0 deletions bin/yarn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
begin
exec "yarnpkg", *ARGV
rescue Errno::ENOENT
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
end
end
24 changes: 9 additions & 15 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require_relative 'boot'

require 'csv'
Expand All @@ -11,6 +9,15 @@

module GBOLapp
class Application < Rails::Application
config.load_defaults 5.2

# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.

config.autoload_paths << "#{Rails.root}/lib"
config.eager_load_paths << "#{Rails.root}/lib"

config.generators do |g|
g.test_framework :rspec,
:fixtures => true,
Expand All @@ -21,18 +28,5 @@ class Application < Rails::Application
:request_specs => true
g.fixture_replacement :factory_bot, :dir => 'spec/factories'
end

# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.

config.assets.paths << "#{Rails}/app/assets/fonts"
config.assets.paths << "#{Rails}/vendor/assets/fonts"

# config.assets.enabled = true
# config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)

config.autoload_paths << "#{Rails.root}/lib"
config.eager_load_paths << "#{Rails.root}/lib"
end
end
Loading

0 comments on commit 1009601

Please sign in to comment.