From 1d26ee83b56bbadfe7b0a8dc17657074d2b4e8da Mon Sep 17 00:00:00 2001 From: Alex Cruice Date: Mon, 12 Mar 2018 16:58:27 +1000 Subject: [PATCH] Update rails to 5.1.5. - Also update to Rails 5 binstubs (except bundler https://github.com/bundler/bundler/issues/6149) --- Gemfile | 2 +- Gemfile.lock | 82 ++++++++++++++++++++++++++-------------------------- bin/rails | 31 ++------------------ bin/rake | 31 ++------------------ bin/setup | 1 + bin/update | 1 + 6 files changed, 50 insertions(+), 98 deletions(-) diff --git a/Gemfile b/Gemfile index 4b2ad31..fb00ac7 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ ruby "2.5.0" gem "jbuilder" gem "pg" gem "puma" -gem "rails", "5.1.4" +gem "rails", "5.1.5" group :development, :test do gem "byebug" diff --git a/Gemfile.lock b/Gemfile.lock index baa26d4..89b5227 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,39 +1,39 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.1.4) - actionpack (= 5.1.4) + actioncable (5.1.5) + actionpack (= 5.1.5) nio4r (~> 2.0) websocket-driver (~> 0.6.1) - actionmailer (5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) + actionmailer (5.1.5) + actionpack (= 5.1.5) + actionview (= 5.1.5) + activejob (= 5.1.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.4) - actionview (= 5.1.4) - activesupport (= 5.1.4) + actionpack (5.1.5) + actionview (= 5.1.5) + activesupport (= 5.1.5) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.4) - activesupport (= 5.1.4) + actionview (5.1.5) + activesupport (= 5.1.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.1.4) - activesupport (= 5.1.4) + activejob (5.1.5) + activesupport (= 5.1.5) globalid (>= 0.3.6) - activemodel (5.1.4) - activesupport (= 5.1.4) - activerecord (5.1.4) - activemodel (= 5.1.4) - activesupport (= 5.1.4) + 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.4) + activesupport (5.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -48,12 +48,12 @@ GEM safe_yaml (~> 1.0.0) crass (1.0.3) diff-lcs (1.3) - erubi (1.7.0) + erubi (1.7.1) ffi (1.9.18) globalid (0.4.1) activesupport (>= 4.2.0) hashdiff (0.3.7) - i18n (0.9.1) + i18n (0.9.5) concurrent-ruby (~> 1.0) jbuilder (2.7.0) activesupport (>= 4.2.0) @@ -62,7 +62,7 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.1.1) + loofah (2.2.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -70,37 +70,37 @@ GEM method_source (0.9.0) mini_mime (1.0.0) mini_portile2 (2.3.0) - minitest (5.11.1) + minitest (5.11.3) multi_json (1.12.2) nio4r (2.2.0) - nokogiri (1.8.1) + nokogiri (1.8.2) mini_portile2 (~> 2.3.0) pg (0.21.0) public_suffix (3.0.1) puma (3.11.0) - rack (2.0.3) - rack-test (0.8.2) + rack (2.0.4) + rack-test (0.8.3) rack (>= 1.0, < 3) - rails (5.1.4) - actioncable (= 5.1.4) - actionmailer (= 5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) - activemodel (= 5.1.4) - activerecord (= 5.1.4) - activesupport (= 5.1.4) + 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) bundler (>= 1.3.0) - railties (= 5.1.4) + railties (= 5.1.5) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (5.1.4) - actionpack (= 5.1.4) - activesupport (= 5.1.4) + railties (5.1.5) + actionpack (= 5.1.5) + activesupport (= 5.1.5) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) @@ -143,7 +143,7 @@ GEM sprockets (>= 3.0.0) thor (0.20.0) thread_safe (0.3.6) - tzinfo (1.2.4) + tzinfo (1.2.5) thread_safe (~> 0.1) vcr (4.0.0) webmock (3.2.0) @@ -163,7 +163,7 @@ DEPENDENCIES listen pg puma - rails (= 5.1.4) + rails (= 5.1.5) rspec-rails spring spring-commands-rspec diff --git a/bin/rails b/bin/rails index 6065ef0..0739660 100755 --- a/bin/rails +++ b/bin/rails @@ -1,29 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'rails' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path("../bundle", __FILE__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("railties", "rails") +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake index ea0e293..1724048 100755 --- a/bin/rake +++ b/bin/rake @@ -1,29 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'rake' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path("../bundle", __FILE__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("rake", "rake") +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/bin/setup b/bin/setup index e620b4d..104e40c 100755 --- a/bin/setup +++ b/bin/setup @@ -18,6 +18,7 @@ chdir APP_ROOT do system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') # cp 'config/database.yml.sample', 'config/database.yml' diff --git a/bin/update b/bin/update index 365af6c..a8e4462 100755 --- a/bin/update +++ b/bin/update @@ -17,6 +17,7 @@ chdir APP_ROOT do puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + puts "\n== Updating database ==" system! 'bin/rails db:migrate'