lib/raygun/breadcrumbs/store.rb in raygun4ruby-3.1.1 vs lib/raygun/breadcrumbs/store.rb in raygun4ruby-3.2.0

- old
+ new

@@ -45,9 +45,19 @@ def self.any? stored != nil && stored.length > 0 end + def self.take_until_size(size) + breadcrumb_size = 0 + + stored.reverse.take_while do |crumb| + breadcrumb_size += crumb.size + + breadcrumb_size < size + end.reverse + end + private def self.should_record?(crumb) if stored.nil? if Raygun.configuration.debug