diff --git a/lib/svg_sprite.rb b/lib/svg_sprite.rb index ba1c59b7c63..5e80cdbf0c1 100644 --- a/lib/svg_sprite.rb +++ b/lib/svg_sprite.rb @@ -244,7 +244,7 @@ module SvgSprite THEME_SPRITE_VAR_NAME = "icons-sprite" - MAX_THEME_SPRITE_SIZE = 512.kilobytes + MAX_THEME_SPRITE_SIZE = 1024.kilobytes def self.preload settings_icons diff --git a/spec/lib/svg_sprite/svg_sprite_spec.rb b/spec/lib/svg_sprite/svg_sprite_spec.rb index 4d7747c8617..658bee1d174 100644 --- a/spec/lib/svg_sprite/svg_sprite_spec.rb +++ b/spec/lib/svg_sprite/svg_sprite_spec.rb @@ -339,7 +339,8 @@ RSpec.describe SvgSprite do fname = "theme-icon-sprite.svg" symbols = "" - 1500.times do |i| + # should exceed MAX_THEME_SPRITE_SIZE + 3500.times do |i| id = "icon-id-#{i}" path = "M#{rand(1..100)} 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 .008z" diff --git a/spec/models/theme_field_spec.rb b/spec/models/theme_field_spec.rb index 550de9a6b84..020b24e793d 100644 --- a/spec/models/theme_field_spec.rb +++ b/spec/models/theme_field_spec.rb @@ -671,7 +671,7 @@ HTML fname = "theme-icon-sprite.svg" symbols = "" - 1500.times do |i| + 3500.times do |i| id = "icon-id-#{i}" path = "M#{rand(1..100)} 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 .008z"