From 3e738a385dd55adcebdf78382aade71145a26e61 Mon Sep 17 00:00:00 2001 From: Nic Duke Date: Thu, 23 Jan 2025 20:10:47 +1100 Subject: [PATCH] Reverts previously reverted Ruby 3.3.5 upgrade change This reverts commit 749ac9e97c94d15bd1f64502f71af204aa49226c. --- .circleci/config.yml | 6 +++--- Dockerfile | 20 -------------------- Gemfile | 3 +-- Gemfile.lock | 43 +++++++++++++++++++++---------------------- README.md | 2 +- docker-compose.yml | 11 +++++------ 6 files changed, 31 insertions(+), 54 deletions(-) delete mode 100644 Dockerfile diff --git a/.circleci/config.yml b/.circleci/config.yml index 0105e27..026bb87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,18 +4,18 @@ version: 2.1 orbs: - ruby: circleci/ruby@1.1.1 + ruby: circleci/ruby@2.2.1 jobs: build: docker: - - image: circleci/ruby:3.0.0-node-browsers + - image: cimg/ruby:3.3.5-browsers environment: - RACK_ENV=test - RAILS_ENV=test - DATABASE_URL=postgres://testuser:testpass@127.0.0.1:5432/mahbucket_test - SKIP_AUTH=true - - image: circleci/postgres:10-alpine-ram + - image: cimg/postgres:10.20 environment: - POSTGRES_USER=testuser - POSTGRES_PASSWORD=testpass diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 92a3c7d..0000000 --- a/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# This Dockerfile uses a circleci image for convenience. - -FROM circleci/ruby:3.0.0-node-browsers - -USER root -RUN mkdir /app -WORKDIR /app - -# As this is a dev container we are keeping the installation of app -# dependencies (via bundle and yarn), and the mounting of the source -# code external to the container build -#ENV PATH="/usr/local/lib/ruby/gems/bin:${PATH}" -RUN mkdir /bundle -ENV BUNDLE_PATH=/bundle -ENV GEM_HOME=/bundle -RUN bundle config set path '/bundle' - -RUN mkdir -p /tmp/sockets - -CMD bundle check || bundle install && bundle exec puma -C ./config/puma.rb diff --git a/Gemfile b/Gemfile index 25714df..34be5c3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.0.0" +ruby "3.3.5" source 'https://rubygems.org' do gem 'rails', '~> 6.1.7' @@ -80,6 +80,5 @@ source 'https://rubygems.org' do gem 'rspec' gem 'rspec_junit_formatter' gem 'selenium-webdriver' - gem 'webdrivers', '~> 4.4' end end diff --git a/Gemfile.lock b/Gemfile.lock index 436f4c7..41a8d0a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,8 +72,8 @@ GEM zeitwerk (~> 2.3) acts-as-taggable-on (9.0.1) activerecord (>= 6.0, < 7.1) - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) aws-eventstream (1.2.0) aws-partitions (1.720.0) @@ -91,16 +91,17 @@ GEM aws-sigv4 (~> 1.4) aws-sigv4 (1.5.2) aws-eventstream (~> 1, >= 1.0.2) + base64 (0.2.0) brakeman (5.4.1) builder (3.2.4) bundler-audit (0.9.1) bundler (>= 1.2.0, < 3) thor (~> 1.0) - capybara (3.38.0) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) @@ -171,6 +172,7 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -185,8 +187,8 @@ GEM mime-types (3.4.1) mime-types-data (~> 3.2015) mime-types-data (3.2023.0218.1) - mini_mime (1.1.2) - mini_portile2 (2.8.5) + mini_mime (1.1.5) + mini_portile2 (2.8.8) minitest (5.18.1) multi_xml (0.6.0) net-imap (0.3.6) @@ -200,10 +202,10 @@ GEM net-protocol newrelic_rpm (9.0.0) nio4r (2.7.3) - nokogiri (1.16.2) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.2-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) @@ -236,11 +238,11 @@ GEM method_source (~> 1.0) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (5.0.1) + public_suffix (6.0.1) puma (5.6.9) nio4r (~> 2.0) - racc (1.7.3) - rack (2.2.7) + racc (1.8.1) + rack (2.2.10) rack-protection (3.0.5) rack rack-test (2.1.0) @@ -283,9 +285,9 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.7.0) + regexp_parser (2.9.3) repost (0.4.1) - rexml (3.2.5) + rexml (3.3.9) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -348,7 +350,9 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (4.8.1) + selenium-webdriver (4.27.0) + base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -387,11 +391,7 @@ GEM execjs (>= 0.3.0, < 3) unicode-display_width (2.4.2) version_gem (1.1.1) - webdrivers (4.7.0) - nokogiri (~> 1.6) - rubyzip (>= 1.3.0) - selenium-webdriver (> 3.141, < 5.0) - websocket (1.2.9) + websocket (1.2.11) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -442,10 +442,9 @@ DEPENDENCIES sentry-ruby! turbolinks! uglifier! - webdrivers (~> 4.4)! RUBY VERSION - ruby 3.0.0p0 + ruby 3.3.5p100 BUNDLED WITH - 2.2.17 + 2.5.23 diff --git a/README.md b/README.md index 409601c..88be9c6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ should hopefully be useful (or at least usable) for other file types too. ## Ruby and Rails versions Mah Bucket was initially developed using Ruby 2.3.1 and Rails 5.0.1, and is -currently using Ruby 2.7.1 and Rails 6.0.3 - so it should have a fairly wide +currently using Ruby 3.3.5 and Rails ~>6.1.7 - so it should have a fairly wide compatibility range. If you find a version of either that it won't run with, please let me know. diff --git a/docker-compose.yml b/docker-compose.yml index 87a5aac..a71d3dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' x-service-fragments: ##### Abstract services for common setup ##### app: &app - image: ruby + image: cimg/ruby:3.3.5-browsers networks: - default volumes: @@ -19,7 +19,7 @@ x-service-fragments: services: ##### Concrete services ##### postgres: - image: 'postgres:9.6-alpine' + image: 'cimg/postgres:10.20' environment: # The Postgres image uses these to create a db user - note the user/pass here should match that in your env file! - POSTGRES_USER=user @@ -30,9 +30,9 @@ services: web: <<: *app - build: - dockerfile: Dockerfile - context: . + volumes: + - '.:/usr/src/app:cached' + working_dir: /usr/src/app ports: # Use a default port of 3005, but allow it to be overriden by an env variable # E.g. `PORT=3001 docker-compose up` @@ -49,7 +49,6 @@ services: - SKIP_AUTH=true command: sh -c 'bundle check || bundle install && rm -f /tmp/.X99-lock && bundle exec rails db:create db:environment:set db:schema:load && bundle exec rubocop && bundle exec rspec && bundle exec puma -C ./config/puma.rb' - volumes: postgres: bundle_cache: