]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5078'
authorTom Hughes <tom@compton.nu>
Wed, 14 Aug 2024 18:02:07 +0000 (19:02 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 14 Aug 2024 18:02:07 +0000 (19:02 +0100)
.github/workflows/tests.yml
Gemfile
Gemfile.lock
config/initializers/gd2.rb [new file with mode: 0644]
test/controllers/api/nodes_controller_test.rb
test/system/user_blocks_test.rb

index 34405f778d0672bf5a350c16e135211d3df67e0d..46ab75482815eb90b5d9aa23f7a8ac8e4418f6f5 100644 (file)
@@ -11,7 +11,7 @@ jobs:
     strategy:
       matrix:
         ubuntu: [20.04, 22.04]
-        ruby: ['3.0', '3.1', '3.2']
+        ruby: ['3.0', '3.1', '3.2', '3.3']
     runs-on: ubuntu-${{ matrix.ubuntu }}
     env:
       RAILS_ENV: test
diff --git a/Gemfile b/Gemfile
index fcf2ceb4d1df6f381344c20479b8aaf45e10b19c..dcdfbe27edf1238e53de61895b6090aba6c19d93 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -180,4 +180,7 @@ end
 
 group :development, :test do
   gem "annotate"
+
+  # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
+  gem "debug", :require => "debug/prelude"
 end
index 4cb7d0729b63bfd0d3633927f202617f799bd5be..e7ec71569b3e5297ad49db2b2dd3e715f04baaaa 100644 (file)
@@ -170,6 +170,9 @@ GEM
       sprockets-rails
       tilt
     date (3.3.4)
+    debug (1.9.2)
+      irb (~> 1.10)
+      reline (>= 0.3.8)
     debug_inspector (1.2.0)
     deep_merge (1.2.2)
     delayed_job (4.1.11)
@@ -627,6 +630,7 @@ DEPENDENCIES
   connection_pool
   dalli
   dartsass-sprockets
+  debug
   debug_inspector
   delayed_job_active_record
   doorkeeper
diff --git a/config/initializers/gd2.rb b/config/initializers/gd2.rb
new file mode 100644 (file)
index 0000000..0005bd8
--- /dev/null
@@ -0,0 +1,15 @@
+module OpenStreetMap
+  module GD2
+    module AnimatedGif
+      def frames_finalizer
+        proc do
+          @frames.each do |frame|
+            ::GD2::GD2FFI.send(:gdFree, frame.ptr)
+          end
+        end
+      end
+    end
+  end
+end
+
+GD2::AnimatedGif.prepend(OpenStreetMap::GD2::AnimatedGif)
index d70c92861e9b563f7df5eab1fb933dfce1ead943..d9fabb012e18b21d0152cb2653e0a7f37e9dc470 100644 (file)
@@ -639,12 +639,5 @@ module Api
       xml.find("//osm/node").first[name] = value.to_s
       xml
     end
-
-    ##
-    # parse some xml
-    def xml_parse(xml)
-      parser = XML::Parser.string(xml)
-      parser.parse
-    end
   end
 end
index f710f74aae655cbcce4b345f6cc14705f93bbcb7..6e4f5b471141548a50d7094c088843c022352b62 100644 (file)
@@ -1,6 +1,6 @@
 require "application_system_test_case"
 
-class ReportNoteTest < ApplicationSystemTestCase
+class UserBlocksSystemTest < ApplicationSystemTestCase
   test "revoke all link is absent for anonymous users when viewed user has active blocks" do
     blocked_user = create(:user)
     create(:user_block, :user => blocked_user)