From 1eb3bee3cf3bcac042f910ed24c91bd9f3e80abc Mon Sep 17 00:00:00 2001 From: Andrey Novikov Date: Tue, 4 Feb 2020 14:36:28 +0300 Subject: [PATCH 1/3] Upgrade Ruby, Rails, Redis, and (sure) AnyCable to latest versions --- Dockerfile | 2 +- Gemfile | 8 +- Gemfile.lock | 316 ++++++++++++++++-------------- config/environments/production.rb | 2 +- db/schema.rb | 34 ++-- docker-compose.yml | 6 +- 6 files changed, 193 insertions(+), 175 deletions(-) diff --git a/Dockerfile b/Dockerfile index ad8adb5..5b6ae79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.5.1 +FROM ruby:2.6.5 RUN apt-get update && apt-get install -y build-essential RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - diff --git a/Gemfile b/Gemfile index c528f35..a6e1d3c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,13 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.1' +gem 'rails', '~> 6.0' # Use sqlite3 -gem 'sqlite3', group: [:development, :test] +gem 'sqlite3', '~> 1.4', group: [:development, :test] gem 'pg', group: :production # Use Puma as the app server -gem 'puma', '~> 3.12' +gem 'puma', '~> 4.0' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' @@ -32,7 +32,7 @@ if ENV["LOCAL_CABLE"] gem 'anycable', path: '../anycable' gem 'anycable-rails', path: '../anycable-rails' else - gem 'anycable-rails', '~> 0.6.2' + gem 'anycable-rails', '~> 0.6.4' end gem 'anycable-rack-server', require: ENV["ANYCABLE_RACK"] ? "anycable-rack-server" : false diff --git a/Gemfile.lock b/Gemfile.lock index bf6936f..e4800c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,91 +1,104 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.1) - actionpack (= 5.2.1) + actioncable (6.0.2.2) + actionpack (= 6.0.2.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.1) - actionpack (= 5.2.1) - actionview (= 5.2.1) - activejob (= 5.2.1) + actionmailbox (6.0.2.2) + actionpack (= 6.0.2.2) + activejob (= 6.0.2.2) + activerecord (= 6.0.2.2) + activestorage (= 6.0.2.2) + activesupport (= 6.0.2.2) + mail (>= 2.7.1) + actionmailer (6.0.2.2) + actionpack (= 6.0.2.2) + actionview (= 6.0.2.2) + activejob (= 6.0.2.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.1) - actionview (= 5.2.1) - activesupport (= 5.2.1) - rack (~> 2.0) + actionpack (6.0.2.2) + actionview (= 6.0.2.2) + activesupport (= 6.0.2.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.2.1) - activesupport (= 5.2.1) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.0.2.2) + actionpack (= 6.0.2.2) + activerecord (= 6.0.2.2) + activestorage (= 6.0.2.2) + activesupport (= 6.0.2.2) + nokogiri (>= 1.8.5) + actionview (6.0.2.2) + activesupport (= 6.0.2.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_model_serializers (0.10.8) - actionpack (>= 4.1, < 6) - activemodel (>= 4.1, < 6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + active_model_serializers (0.10.10) + actionpack (>= 4.1, < 6.1) + activemodel (>= 4.1, < 6.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (5.2.1) - activesupport (= 5.2.1) + activejob (6.0.2.2) + activesupport (= 6.0.2.2) globalid (>= 0.3.6) - activemodel (5.2.1) - activesupport (= 5.2.1) - activerecord (5.2.1) - activemodel (= 5.2.1) - activesupport (= 5.2.1) - arel (>= 9.0) - activestorage (5.2.1) - actionpack (= 5.2.1) - activerecord (= 5.2.1) + activemodel (6.0.2.2) + activesupport (= 6.0.2.2) + activerecord (6.0.2.2) + activemodel (= 6.0.2.2) + activesupport (= 6.0.2.2) + activestorage (6.0.2.2) + actionpack (= 6.0.2.2) + activejob (= 6.0.2.2) + activerecord (= 6.0.2.2) marcel (~> 0.3.1) - activesupport (5.2.1) + activesupport (6.0.2.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - anycable (0.6.1) - anyway_config (~> 1.4.2) + zeitwerk (~> 2.2) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + anycable (0.6.5) + anyway_config (>= 1.4.2) grpc (~> 1.17) anycable-rack-server (0.1.0) anycable (~> 0.6) redis (~> 4) websocket (~> 1.2) - anycable-rails (0.6.2) + anycable-rails (0.6.5) anycable (~> 0.6.0) rails (>= 5) - anyway_config (1.4.2) + anyway_config (2.0.2) + ruby-next-core (>= 0.5.1) archive-zip (0.12.0) io-like (~> 0.3.0) - arel (9.0.0) ast (2.4.0) - autoprefixer-rails (9.3.1) + autoprefixer-rails (9.7.6) execjs - better_errors (2.5.0) + better_errors (2.7.0) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) - builder (3.2.3) - byebug (10.0.2) - capybara (3.10.1) + builder (3.2.4) + byebug (11.1.3) + capybara (3.32.1) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.2) + regexp_parser (~> 1.5) xpath (~> 3.2) case_transform (0.2) activesupport - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (3.0.0) chromedriver-helper (2.1.1) archive-zip (~> 0.10) nokogiri (~> 1.8) @@ -97,15 +110,15 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.3) - crass (1.0.5) - csso-rails (0.8.1) + concurrent-ruby (1.1.6) + crass (1.0.6) + csso-rails (0.8.2) execjs (>= 1) - database_cleaner (1.7.0) + database_cleaner (1.8.4) debug_inspector (0.0.3) diff-lcs (1.3) - dry-initializer (2.5.0) - erubi (1.7.1) + dry-initializer (3.0.3) + erubi (1.9.0) execjs (2.7.0) factory_girl (4.9.0) activesupport (>= 3.0.0) @@ -114,38 +127,39 @@ GEM railties (>= 3.0.0) faker (1.8.7) i18n (>= 0.7) - ffi (1.9.25) - fuubar (2.3.2) + ffi (1.12.2) + fuubar (2.5.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) - globalid (0.4.1) + globalid (0.4.2) activesupport (>= 4.2.0) - gon (6.2.1) - actionpack (>= 3.0) + gon (6.3.2) + actionpack (>= 3.0.20) + i18n (>= 0.7) multi_json request_store (>= 1.0) - google-protobuf (3.6.1) - googleapis-common-protos-types (1.0.2) - google-protobuf (~> 3.0) - grpc (1.17.1) - google-protobuf (~> 3.1) - googleapis-common-protos-types (~> 1.0.0) - i18n (1.1.1) + google-protobuf (3.11.4) + googleapis-common-protos-types (1.0.5) + google-protobuf (~> 3.11) + grpc (1.28.0) + google-protobuf (~> 3.11) + googleapis-common-protos-types (~> 1.0) + i18n (1.8.2) concurrent-ruby (~> 1.0) - io-like (0.3.0) - jaro_winkler (1.5.1) - jquery-rails (4.3.3) + io-like (0.3.1) + jaro_winkler (1.5.4) + jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) - jsonapi-renderer (0.2.0) + jsonapi-renderer (0.2.2) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.3.1) + loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -154,76 +168,78 @@ GEM mimemagic (~> 0.3.2) material_icons (2.2.1) railties (>= 3.2) - materialize-sass (0.100.2) + materialize-sass (0.100.2.1) sass (~> 3.3) - method_source (0.9.2) - mimemagic (0.3.2) - mini_mime (1.0.1) + method_source (1.0.0) + mimemagic (0.3.4) + mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.11.3) - multi_json (1.13.1) + minitest (5.14.0) + multi_json (1.14.1) nenv (0.3.0) - nio4r (2.3.1) - nokogiri (1.10.8) + nio4r (2.5.2) + nokogiri (1.10.9) mini_portile2 (~> 2.4.0) - parallel (1.12.1) - parser (2.5.3.0) + parallel (1.19.1) + parser (2.7.1.1) ast (~> 2.4.0) - pg (1.1.3) - powerpack (0.1.2) - prometheus-client (0.8.0) - quantile (~> 0.2.1) - pry (0.12.0) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry-byebug (3.6.0) - byebug (~> 10.0) - pry (~> 0.10) - pry-rails (0.3.7) + pg (1.2.3) + prometheus-client (2.0.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) + byebug (~> 11.0) + pry (~> 0.13.0) + pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (3.0.3) - puma (3.12.4) - quantile (0.2.1) + public_suffix (4.0.4) + puma (4.3.3) + nio4r (~> 2.0) rack (2.2.2) - rack-cors (1.0.2) + rack-cors (1.1.1) + rack (>= 2.0.0) rack-test (1.1.0) rack (>= 1.0, < 3) rack_session_access (0.2.0) builder (>= 2.0.0) rack (>= 1.0.0) - rails (5.2.1) - actioncable (= 5.2.1) - actionmailer (= 5.2.1) - actionpack (= 5.2.1) - actionview (= 5.2.1) - activejob (= 5.2.1) - activemodel (= 5.2.1) - activerecord (= 5.2.1) - activestorage (= 5.2.1) - activesupport (= 5.2.1) + rails (6.0.2.2) + actioncable (= 6.0.2.2) + actionmailbox (= 6.0.2.2) + actionmailer (= 6.0.2.2) + actionpack (= 6.0.2.2) + actiontext (= 6.0.2.2) + actionview (= 6.0.2.2) + activejob (= 6.0.2.2) + activemodel (= 6.0.2.2) + activerecord (= 6.0.2.2) + activestorage (= 6.0.2.2) + activesupport (= 6.0.2.2) bundler (>= 1.3.0) - railties (= 5.2.1) + railties (= 6.0.2.2) sprockets-rails (>= 2.0.0) 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 (5.2.1) - actionpack (= 5.2.1) - activesupport (= 5.2.1) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (6.0.2.2) + actionpack (= 6.0.2.2) + activesupport (= 6.0.2.2) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (13.0.1) rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) - redis (4.0.3) - regexp_parser (1.2.0) - request_store (1.4.1) + rb-inotify (0.10.1) + ffi (~> 1.0) + redis (4.1.3) + regexp_parser (1.7.0) + request_store (1.5.0) rack (>= 1.4) + rexml (3.2.4) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) @@ -247,33 +263,34 @@ GEM rspec-support (3.5.0) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.60.0) + rubocop (0.82.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) + parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) + rexml ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.4.0) - ruby-progressbar (1.10.0) - rubyzip (1.3.0) - sass (3.7.0) + unicode-display_width (>= 1.4.0, < 2.0) + ruby-next-core (0.6.0) + ruby-progressbar (1.10.1) + rubyzip (2.3.0) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) + sass-rails (5.1.0) + railties (>= 5.2.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - selenium-webdriver (3.141.0) - childprocess (~> 0.5) - rubyzip (~> 1.2, >= 1.2.2) - shoulda-matchers (3.1.2) - activesupport (>= 4.0.0) - show_me_the_cookies (4.0.0) + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) + shoulda-matchers (4.3.0) + activesupport (>= 4.2.0) + show_me_the_cookies (5.0.0) capybara (>= 2, < 4) skim (0.10.0) coffee-script @@ -287,8 +304,7 @@ GEM actionpack (>= 3.1) railties (>= 3.1) slim (>= 3.0, < 5.0) - spring (2.0.2) - activesupport (>= 4.2) + spring (2.1.0) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) @@ -299,30 +315,32 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.13) - temple (0.8.0) - thor (0.20.3) + sqlite3 (1.4.2) + temple (0.8.2) + thor (1.0.1) thread_safe (0.3.6) - tilt (2.0.8) + tilt (2.0.10) timecop (0.9.1) - tzinfo (1.2.5) + tzinfo (1.2.7) thread_safe (~> 0.1) - tzinfo-data (1.2018.7) + tzinfo-data (1.2020.1) tzinfo (>= 1.0.0) - uglifier (4.1.19) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.0) + unicode-display_width (1.7.0) websocket (1.2.8) - websocket-driver (0.7.0) + websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) + websocket-extensions (0.1.4) xpath (3.2.0) nokogiri (~> 1.8) - yabeda (0.1.2) + yabeda (0.5.0) concurrent-ruby dry-initializer - yabeda-prometheus (0.1.4) - yabeda + yabeda-prometheus (0.6.0) + prometheus-client (>= 0.10, < 3.0) + yabeda (~> 0.5) + zeitwerk (2.3.0) zonebie (0.6.1) PLATFORMS @@ -331,7 +349,7 @@ PLATFORMS DEPENDENCIES active_model_serializers anycable-rack-server - anycable-rails (~> 0.6.2) + anycable-rails (~> 0.6.4) autoprefixer-rails better_errors binding_of_caller @@ -355,10 +373,10 @@ DEPENDENCIES pry pry-byebug pry-rails - puma (~> 3.12) + puma (~> 4.0) rack-cors rack_session_access - rails (~> 5.1) + rails (~> 6.0) redis (~> 4.0) rspec-rails (~> 3.5.0) rspec_junit_formatter @@ -371,7 +389,7 @@ DEPENDENCIES slim-rails spring spring-watcher-listen (~> 2.0.0) - sqlite3 + sqlite3 (~> 1.4) timecop tzinfo tzinfo-data @@ -381,4 +399,4 @@ DEPENDENCIES zonebie BUNDLED WITH - 1.17.1 + 2.1.2 diff --git a/config/environments/production.rb b/config/environments/production.rb index e65e4da..0a90171 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -53,7 +53,7 @@ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true + config.i18n.fallbacks = [I18n.default_locale] # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify diff --git a/db/schema.rb b/db/schema.rb index ece1c44..f2c6194 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,31 +2,31 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). +# This file is the source Rails uses to define your schema when running `rails +# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160621123902) do +ActiveRecord::Schema.define(version: 2016_06_21_123902) do create_table "baskets", force: :cascade do |t| - t.string "name" - t.string "logo_path" - t.string "owner" - t.text "description" - t.integer "items_count", default: 0, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "logo_path" + t.string "owner" + t.text "description" + t.integer "items_count", default: 0, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "products", force: :cascade do |t| - t.string "name" - t.string "icon_path" - t.string "category" - t.integer "basket_id" + t.string "name" + t.string "icon_path" + t.string "category" + t.integer "basket_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["basket_id"], name: "index_products_on_basket_id" diff --git a/docker-compose.yml b/docker-compose.yml index 95b2092..248890b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: . dockerfile: ./Dockerfile - image: anycable-demo:0.6.0 + image: anycable-demo:0.6.4 volumes: - .:/app:cached tmpfs: @@ -42,13 +42,13 @@ services: <<: *backend command: anycable redis: - image: redis:3.2-alpine + image: redis:5.0-alpine volumes: - redis:/data ports: - 6379 ws: - image: 'anycable/anycable-go:v0.6.0' + image: 'anycable/anycable-go:v0.6.4' ports: - "8080:8080" environment: From 66170eb9434e2eb84c70d0636ee28d47b11425d2 Mon Sep 17 00:00:00 2001 From: Andrey Novikov Date: Tue, 4 Feb 2020 16:14:30 +0300 Subject: [PATCH 2/3] Upgrade continued: upgrade rspec and regenerate binstubs --- Gemfile | 8 ++--- Gemfile.lock | 66 +++++++++++++++++++++------------------ bin/setup | 10 +++--- spec/factories/baskets.rb | 2 +- spec/rails_helper.rb | 4 +-- 5 files changed, 47 insertions(+), 43 deletions(-) diff --git a/Gemfile b/Gemfile index a6e1d3c..ed85390 100644 --- a/Gemfile +++ b/Gemfile @@ -9,9 +9,9 @@ gem 'pg', group: :production # Use Puma as the app server gem 'puma', '~> 4.0' -gem 'sass-rails', '~> 5.0' +gem 'sass-rails' gem 'uglifier', '>= 1.3.0' -gem 'coffee-rails', '~> 4.2.0' +gem 'coffee-rails' gem 'slim-rails' gem 'autoprefixer-rails' gem 'csso-rails' @@ -47,7 +47,7 @@ gem 'tzinfo-data' gem 'active_model_serializers' -gem 'factory_girl_rails', '~> 4.0' +gem 'factory_bot_rails', '~> 4.0' gem "faker", "~> 1.8.4" @@ -72,7 +72,7 @@ end group :test do # RSpec tools - gem 'rspec-rails', '~> 3.5.0' + gem 'rspec-rails', '~> 3.9.0' gem "rspec_junit_formatter" # For CircleCI reports gem 'capybara' gem 'fuubar' diff --git a/Gemfile.lock b/Gemfile.lock index e4800c3..3d75ca1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,9 +103,9 @@ GEM archive-zip (~> 0.10) nokogiri (~> 1.8) 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 @@ -120,10 +120,10 @@ GEM dry-initializer (3.0.3) erubi (1.9.0) execjs (2.7.0) - factory_girl (4.9.0) + factory_bot (4.11.1) activesupport (>= 3.0.0) - factory_girl_rails (4.9.0) - factory_girl (~> 4.9.0) + factory_bot_rails (4.11.1) + factory_bot (~> 4.11.1) railties (>= 3.0.0) faker (1.8.7) i18n (>= 0.7) @@ -240,27 +240,27 @@ GEM request_store (1.5.0) rack (>= 1.4) rexml (3.2.4) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.1) + rspec-support (~> 3.9.1) + rspec-expectations (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.2) + rspec-support (~> 3.9.0) + rspec-rails (3.9.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.2) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) rubocop (0.82.0) @@ -279,12 +279,16 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.1.0) - railties (>= 5.2.0) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) + sass-rails (6.0.0) + sassc-rails (~> 2.1, >= 2.1.1) + sassc (2.3.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) @@ -355,10 +359,10 @@ DEPENDENCIES binding_of_caller capybara chromedriver-helper - coffee-rails (~> 4.2.0) + coffee-rails csso-rails database_cleaner - factory_girl_rails (~> 4.0) + factory_bot_rails (~> 4.0) faker (~> 1.8.4) fuubar gon @@ -378,10 +382,10 @@ DEPENDENCIES rack_session_access rails (~> 6.0) redis (~> 4.0) - rspec-rails (~> 3.5.0) + rspec-rails (~> 3.9.0) rspec_junit_formatter rubocop - sass-rails (~> 5.0) + sass-rails selenium-webdriver shoulda-matchers show_me_the_cookies diff --git a/bin/setup b/bin/setup index 94fd4d7..d07552f 100755 --- a/bin/setup +++ b/bin/setup @@ -1,6 +1,5 @@ #!/usr/bin/env ruby require 'fileutils' -include FileUtils # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,8 +8,9 @@ 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. +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 ==' @@ -22,11 +22,11 @@ chdir APP_ROOT do # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system! 'bin/rails db:setup' + system! 'bin/rails db:prepare' puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' diff --git a/spec/factories/baskets.rb b/spec/factories/baskets.rb index 41ff2d4..93efe8a 100644 --- a/spec/factories/baskets.rb +++ b/spec/factories/baskets.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -FactoryGirl.define do +FactoryBot.define do factory :basket do end end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 4eea1b0..67cedd2 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -7,7 +7,7 @@ abort("The Rails environment is running in production mode!") if Rails.env.production? require 'spec_helper' require 'rspec/rails' -require 'factory_girl_rails' +require 'factory_bot_rails' require "faker/food" Shoulda::Matchers.configure do |config| @@ -26,7 +26,7 @@ Rails.logger = ActionCable.server.config.logger = ActiveRecord::Base.logger = Logger.new(STDOUT) if Nenv.log? RSpec.configure do |config| - config.include FactoryGirl::Syntax::Methods + config.include FactoryBot::Syntax::Methods config.before(:suite) do DatabaseCleaner.clean_with :truncation From 93f95cee11061f62fb49509bcbb3ac1deb2a27c0 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Tue, 28 Apr 2020 15:43:03 +0300 Subject: [PATCH 3/3] gemfile: use anycable 1.0.0 --- Gemfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index ed85390..75eac65 100644 --- a/Gemfile +++ b/Gemfile @@ -32,10 +32,11 @@ if ENV["LOCAL_CABLE"] gem 'anycable', path: '../anycable' gem 'anycable-rails', path: '../anycable-rails' else - gem 'anycable-rails', '~> 0.6.4' + gem 'anycable-rails', '1.0.0.preview2' end -gem 'anycable-rack-server', require: ENV["ANYCABLE_RACK"] ? "anycable-rack-server" : false +# Not support by 1.0.0 yet +# gem 'anycable-rack-server', require: ENV["ANYCABLE_RACK"] ? "anycable-rack-server" : false gem 'yabeda'