From 12598229a7778375eec8a5bd1967500afa3b960d Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 20 Feb 2024 16:32:39 +0100 Subject: [PATCH] chore(browser): mark samsung browser as supported browser --- app/services/browser_support.rb | 3 ++- .../samsung_browser_is_supported_task.rb | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 app/tasks/maintenance/samsung_browser_is_supported_task.rb diff --git a/app/services/browser_support.rb b/app/services/browser_support.rb index 35ef6f423..399c2bb6d 100644 --- a/app/services/browser_support.rb +++ b/app/services/browser_support.rb @@ -6,7 +6,8 @@ class BrowserSupport browser.firefox? && browser.version.to_i >= 67 && !browser.platform.ios?, browser.opera? && browser.version.to_i >= 50, browser.safari? && browser.version.to_i >= 12, - browser.platform.ios? && browser.platform.version.to_i >= 12 + browser.platform.ios? && browser.platform.version.to_i >= 12, + browser.samsung_browser? && browser.version.to_i >= 12 ].any? end end diff --git a/app/tasks/maintenance/samsung_browser_is_supported_task.rb b/app/tasks/maintenance/samsung_browser_is_supported_task.rb new file mode 100644 index 000000000..988e3c010 --- /dev/null +++ b/app/tasks/maintenance/samsung_browser_is_supported_task.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Maintenance + class SamsungBrowserIsSupportedTask < MaintenanceTasks::Task + def collection + Traitement.where(browser_name: 'Samsung Browser', browser_version: 12..) + end + + def process(traitement) + traitement.update_column(:browser_supported, true) + end + end +end