Skip to content

Commit ab75561

Browse files
Fix ruby preview version compatibility
1 parent 5edcd9b commit ab75561

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
source "http://rubygems.org"
2-
ruby RUBY_VERSION
32
# Specify your gem's dependencies in cloudinary.gemspec
43
gemspec

spec/cloudinary_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
Cloudinary.user_platform = @user_platform
1010
end
1111

12-
CLOUDINARY_USER_AGENT_REGEXP = %r"^CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p\d+\)$"
13-
CLOUDINARY_USER_PLATFORM_REGEXP = %r"^Rails\/[\d.]+ CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p\d+\)$"
12+
CLOUDINARY_USER_AGENT_REGEXP = %r"^CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p-?\d+\)$"
13+
CLOUDINARY_USER_PLATFORM_REGEXP = %r"^Rails\/[\d.]+ CloudinaryRuby\/[\d.]+ \(Ruby [\d\.]+-p-?\d+\)$"
1414

1515
it "should return the USER_AGENT without user_platform if there's no Rails or set to empty" do
1616
Cloudinary.user_platform = ""

0 commit comments

Comments
 (0)