From ddc213eac427dfaa63b58e60e10e9d06f0e0b2c5 Mon Sep 17 00:00:00 2001 From: Jordan Shefner Date: Mon, 6 Jan 2020 17:38:56 +0200 Subject: [PATCH] Update redis version from 3.2 to 4.1.0 --- app/assets/config/manifest.js | 1 + dashing.gemspec | 2 +- spec/dummy/app/assets/config/manifest.js | 1 + spec/dummy/bin/rails | 2 +- spec/dummy/bin/setup | 33 ++++++++++++++++++++++++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 app/assets/config/manifest.js create mode 100644 spec/dummy/app/assets/config/manifest.js create mode 100755 spec/dummy/bin/setup diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1 @@ +{} diff --git a/dashing.gemspec b/dashing.gemspec index fdf0e23..76a6980 100644 --- a/dashing.gemspec +++ b/dashing.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'jquery-rails', '>= 3.0' spec.add_dependency 'coffee-script', '>= 2.0' spec.add_dependency 'rufus-scheduler', '~> 3.2' - spec.add_dependency 'redis', '~> 3.2' + spec.add_dependency 'redis', '~> 4.1.0' spec.add_dependency 'connection_pool', '~> 2.2' spec.add_development_dependency 'bundler', '>= 1.8' diff --git a/spec/dummy/app/assets/config/manifest.js b/spec/dummy/app/assets/config/manifest.js new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/spec/dummy/app/assets/config/manifest.js @@ -0,0 +1 @@ +{} diff --git a/spec/dummy/bin/rails b/spec/dummy/bin/rails index 728cd85..0739660 100755 --- a/spec/dummy/bin/rails +++ b/spec/dummy/bin/rails @@ -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' diff --git a/spec/dummy/bin/setup b/spec/dummy/bin/setup new file mode 100755 index 0000000..0e39e8c --- /dev/null +++ b/spec/dummy/bin/setup @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +require 'fileutils' + +# path to your application root. +APP_ROOT = File.expand_path('..', __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +FileUtils.chdir APP_ROOT do + # This script is a way to setup or update your development environment automatically. + # This script is idempotent, so that you can run it at anytime and get an expectable outcome. + # Add necessary setup steps to this file. + + 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') + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:prepare' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end