From 79df2ffaa5564496899def1a3b3d2b2a5e7d06fe Mon Sep 17 00:00:00 2001 From: Krzysztof Kucharski Date: Fri, 17 Feb 2023 12:24:33 +0100 Subject: [PATCH 1/4] Bump activesupport required version --- comma.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comma.gemspec b/comma.gemspec index 14f4f171..1b944970 100644 --- a/comma.gemspec +++ b/comma.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.licenses = ['MIT'] - s.add_dependency 'activesupport', ['>= 4.2.0', '< 6.1'] + s.add_dependency 'activesupport', ['>= 4.2.0', '< 8'] s.add_development_dependency 'appraisal', ['~> 1.0.0'] s.add_development_dependency 'rake', ['~> 10.5.0'] From 833fbbfdef714a99054c1b55d8151c7bb9f5109a Mon Sep 17 00:00:00 2001 From: mykhi Date: Wed, 5 Jun 2024 16:08:10 +0200 Subject: [PATCH 2/4] FOUND-1705: fix deprecated reorder first warning in rails61 branch --- lib/comma/generator.rb | 2 +- lib/comma/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/comma/generator.rb b/lib/comma/generator.rb index 70938717..e2f91349 100644 --- a/lib/comma/generator.rb +++ b/lib/comma/generator.rb @@ -31,7 +31,7 @@ def run(iterator_method) def append_csv(csv, iterator_method) return '' if @instance.empty? - csv << @instance.first.to_comma_headers(@style, @globals) unless + csv << @instance.take(1).first.to_comma_headers(@style, @globals) unless @options.key?(:write_headers) && !@options[:write_headers] @instance.send(iterator_method) do |object| csv << object.to_comma(@style, @sanitized, @globals) diff --git a/lib/comma/version.rb b/lib/comma/version.rb index 32006353..8f7d7367 100644 --- a/lib/comma/version.rb +++ b/lib/comma/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Comma - VERSION = '4.3.2' + VERSION = '4.3.3' end From 8a9466fa809946340a58e64cc132bb1f5342a794 Mon Sep 17 00:00:00 2001 From: mykhi Date: Wed, 3 Jul 2024 12:26:05 +0200 Subject: [PATCH 3/4] fix tz deprecation warning in rails 7 --- lib/comma/sanitized_extractor.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/comma/sanitized_extractor.rb b/lib/comma/sanitized_extractor.rb index df0d3f77..41a6d4e3 100644 --- a/lib/comma/sanitized_extractor.rb +++ b/lib/comma/sanitized_extractor.rb @@ -46,7 +46,12 @@ def starts_with_special_characters(result) end def sanitize_result(result) - result = result.to_s + if result.is_a?(ActiveSupport::TimeWithZone) + result = result.to_fs + else + result = result.to_s + end + if starts_with_special_characters(result) if check_for_only_digits(result) result From 438cf8a43b7640a20ac2cf028fc8e44c8c123deb Mon Sep 17 00:00:00 2001 From: mykhi Date: Mon, 10 Aug 2026 14:08:46 +0200 Subject: [PATCH 4/4] Loosen activesupport constraint to support Rails 8 --- comma.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comma.gemspec b/comma.gemspec index a99518e5..7d950ed5 100644 --- a/comma.gemspec +++ b/comma.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.licenses = ['MIT'] - s.add_dependency 'activesupport', ['>= 4.2.0', '< 8'] + s.add_dependency 'activesupport', ['>= 4.2.0', '< 9'] s.add_development_dependency 'appraisal', ['~> 1.0.0'] s.add_development_dependency 'rake', ['~> 10.5.0']