From abd0c7cf5f382983ea541d2eee573c1c5fb56612 Mon Sep 17 00:00:00 2001 From: Constantine Nathanson Date: Tue, 23 Dec 2025 02:46:54 +0200 Subject: [PATCH] Fix ruby preview version compatibility --- Gemfile | 1 - spec/cloudinary_spec.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 812449db..ed3cdc44 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,3 @@ source "http://rubygems.org" -ruby RUBY_VERSION # Specify your gem's dependencies in cloudinary.gemspec gemspec diff --git a/spec/cloudinary_spec.rb b/spec/cloudinary_spec.rb index c582c158..e318b7ba 100644 --- a/spec/cloudinary_spec.rb +++ b/spec/cloudinary_spec.rb @@ -9,8 +9,8 @@ Cloudinary.user_platform = @user_platform end - CLOUDINARY_USER_AGENT_REGEXP = %r"^CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p\d+\)$" - CLOUDINARY_USER_PLATFORM_REGEXP = %r"^Rails\/[\d.]+ CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p\d+\)$" + CLOUDINARY_USER_AGENT_REGEXP = %r"^CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p-?\d+\)$" + CLOUDINARY_USER_PLATFORM_REGEXP = %r"^Rails\/[\d.]+ CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p-?\d+\)$" it "should return the USER_AGENT without user_platform if there's no Rails or set to empty" do Cloudinary.user_platform = ""