]> git.openstreetmap.org Git - rails.git/commitdiff
Update minimum ruby version to 3.2
authorTom Hughes <tom@compton.nu>
Fri, 21 Feb 2025 19:22:43 +0000 (19:22 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 21 Feb 2025 19:48:23 +0000 (19:48 +0000)
.github/workflows/danger.yml
.github/workflows/lint.yml
.github/workflows/tests.yml
.rubocop.yml
Dockerfile
Gemfile
Gemfile.lock
INSTALL.md
app/helpers/svg_helper.rb
bin/setup
lib/osm.rb

index 66c2aca5113f870efe89bfbb72290a4d3e032dac..8c6680bdc998d3176422c6729b3121c55b0006a4 100644 (file)
@@ -19,7 +19,7 @@ jobs:
       - name: Setup ruby
         uses: ruby/setup-ruby@v1
         with:
-          ruby-version: 3.1
+          ruby-version: 3.2
           rubygems: 3.4.10
           bundler-cache: true
       - name: Create base branch
index 8383068b3f08d9e8893a1692334f51f55f254cdd..433b523f7c866f12defc6717a2807d26fb77dfdc 100644 (file)
@@ -6,7 +6,7 @@ concurrency:
   group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
   cancel-in-progress: true
 env:
-  ruby: '3.1'
+  ruby: '3.2'
 jobs:
   rubocop:
     name: RuboCop
index d1cf73eaefc7d239a7fe5af072007ee702f3d236..841155bf643da3dcdee31b4ae284211dd9ed122a 100644 (file)
@@ -10,7 +10,7 @@ jobs:
     name: Ruby ${{ matrix.ruby }}
     strategy:
       matrix:
-        ruby: ['3.1', '3.2', '3.3', '3.4']
+        ruby: ['3.2', '3.3', '3.4']
     runs-on: ubuntu-latest
     env:
       RAILS_ENV: test
index eedbf47e0d341311dc2abd723cef53a1ef5b803b..c3f4a2bc8b4c8b4181054932567820eb59132a8a 100644 (file)
@@ -12,7 +12,7 @@ require:
   - ./.rubocop/specific_action_names.rb
 
 AllCops:
-  TargetRubyVersion: 3.1
+  TargetRubyVersion: 3.2
   NewCops: enable
   Exclude:
     - 'vendor/**/*'
@@ -108,6 +108,10 @@ Style/MixinUsage:
     - 'bin/setup'
     - 'bin/update'
 
+Style/RaiseArgs:
+  Exclude:
+    - 'lib/osm.rb'
+
 Style/StringLiterals:
   EnforcedStyle: double_quotes
 
index dae25be3fcc3b848d15b02844f3687aaecbf7914..5df13d717e9cd655eec5c639315e282061725b43 100644 (file)
@@ -1,4 +1,4 @@
-FROM debian:bookworm
+FROM ruby:3.2-bookworm
 
 ENV DEBIAN_FRONTEND=noninteractive
 
diff --git a/Gemfile b/Gemfile
index 2765b1ae71fe39b643993629b70adc69dc0bec7a..660ff7f1a2adba56990d17b7b5454c02d5f5b2e5 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -55,7 +55,6 @@ gem "bootstrap_form", "~> 5.0"
 gem "cancancan"
 gem "config"
 gem "delayed_job_active_record"
-gem "dry-schema", "< 1.14.0" # see https://github.com/openstreetmap/openstreetmap-website/issues/5482
 gem "dry-validation"
 gem "frozen_record"
 gem "http_accept_language", "~> 2.1.1"
@@ -139,9 +138,6 @@ gem "image_processing"
 # Used to validate widths
 gem "unicode-display_width"
 
-# Lock some modules to old versions for ruby 3.1 support
-gem "zeitwerk", "< 2.7"
-
 # Gems useful for development
 group :development do
   gem "better_errors"
index c5f6f4b796538c69d49992ce0037c41db4c16b0a..86bfcfac09cf328b5a23e75017673662534514a9 100644 (file)
@@ -231,13 +231,13 @@ GEM
       concurrent-ruby (~> 1.0)
       dry-core (~> 1.1)
       zeitwerk (~> 2.6)
-    dry-schema (1.13.4)
+    dry-schema (1.14.0)
       concurrent-ruby (~> 1.0)
       dry-configurable (~> 1.0, >= 1.0.1)
-      dry-core (~> 1.0, < 2)
-      dry-initializer (~> 3.0)
-      dry-logic (>= 1.4, < 2)
-      dry-types (>= 1.7, < 2)
+      dry-core (~> 1.1)
+      dry-initializer (~> 3.2)
+      dry-logic (~> 1.5)
+      dry-types (~> 1.8)
       zeitwerk (~> 2.6)
     dry-types (1.8.2)
       bigdecimal (~> 3.0)
@@ -671,7 +671,7 @@ GEM
     websocket-extensions (0.1.5)
     xpath (3.2.0)
       nokogiri (~> 1.8)
-    zeitwerk (2.6.18)
+    zeitwerk (2.7.2)
 
 PLATFORMS
   ruby
@@ -708,7 +708,6 @@ DEPENDENCIES
   doorkeeper
   doorkeeper-i18n
   doorkeeper-openid_connect
-  dry-schema (< 1.14.0)
   dry-validation
   erb_lint
   factory_bot_rails
@@ -782,7 +781,6 @@ DEPENDENCIES
   validates_email_format_of (>= 1.5.1)
   vendorer
   webmock
-  zeitwerk (< 2.7)
 
 BUNDLED WITH
    2.5.22
index 8667fb5129161efca38295559202e64fd86475b4..cb54cb5433af361824a542220ae8850636ea36db 100644 (file)
@@ -22,7 +22,7 @@ of packages required before you can get the various gems installed.
 
 ## Minimum requirements
 
-* Ruby 3.1+
+* Ruby 3.2+
 * PostgreSQL 13+
 * Bundler (see note below about [developer Ruby setup](#rbenv))
 * Javascript Runtime
index b04ab1b0d56439a7b921c341bc2a4e731c365e12..7fb6b4321fcafe96deb631d9fa4699b224779d3e 100644 (file)
@@ -5,12 +5,12 @@ module SvgHelper
     tag.svg path_tag, :width => 16, :height => 16
   end
 
-  def previous_page_svg_tag(**options)
-    adjacent_page_svg_tag(dir == "rtl" ? 1 : -1, **options)
+  def previous_page_svg_tag(**)
+    adjacent_page_svg_tag(dir == "rtl" ? 1 : -1, **)
   end
 
-  def next_page_svg_tag(**options)
-    adjacent_page_svg_tag(dir == "rtl" ? -1 : 1, **options)
+  def next_page_svg_tag(**)
+    adjacent_page_svg_tag(dir == "rtl" ? -1 : 1, **)
   end
 
   def key_svg_tag(**options)
index ff6a47532311f69c591687838c96795d49608cde..ced1ba3708f5024f01e48454ba2f15d9eac89a82 100755 (executable)
--- a/bin/setup
+++ b/bin/setup
@@ -4,8 +4,8 @@ require "fileutils"
 APP_ROOT = File.expand_path("..", __dir__)
 APP_NAME = "openstreetmap".freeze
 
-def system!(*args)
-  system(*args, :exception => true)
+def system!(*)
+  system(*, :exception => true)
 end
 
 FileUtils.chdir APP_ROOT do
index 6710ee88e02b947c1294bb97d309e0d1e60b4118..b0c314cbc8258c2b3010377776c4990434229d99 100644 (file)
@@ -506,10 +506,10 @@ module OSM
   end
 
   # Parse a float, raising a specified exception on failure
-  def self.parse_float(str, klass, *args)
+  def self.parse_float(str, klass, *)
     Float(str)
   rescue StandardError
-    raise klass.new(*args)
+    raise klass.new(*)
   end
 
   # Construct a random token of a given length