<commit_before>module Spree
  class SliderImage < Asset
    
    #attr_accessible :alt, :attachment, :position, :viewable_type, :viewable_id

    has_attached_file :attachment,
                      styles: { mini: '114x50>', small: '182x80>', primary: '342x150>', large: '684x300>', banner: '1140x500>' },
                      default_style: :primary,
                      url: '/spree/slider_images/:id/:style/:basename.:extension',
                      path: 'slider_images/:id/:style/:basename.:extension',
                      convert_options: { all: '-strip -auto-orient -colorspace RGB' }

    validates_attachment_presence :attachment
    validate :no_attachment_errors

    # save the w,h of the original image (from which others can be calculated)
    # we need to look at the write-queue for images which have not been saved yet
    after_post_process :find_dimensions<commit_msg>- remove -colorspace RGB in slider image issues #1459<commit_after>module Spree
  class SliderImage < Asset
    
    #attr_accessible :alt, :attachment, :position, :viewable_type, :viewable_id

    has_attached_file :attachment,
                      styles: { mini: '114x50>', small: '182x80>', primary: '342x150>', large: '684x300>', banner: '1140x500>' },
                      default_style: :primary,
                      url: '/spree/slider_images/:id/:style/:basename.:extension',
                      path: 'slider_images/:id/:style/:basename.:extension',
                      convert_options: { all: '-strip -auto-orient' }

    validates_attachment_presence :attachment
    validate :no_attachment_errors

    # save the w,h of the original image (from which others can be calculated)
    # we need to look at the write-queue for images which have not been saved yet
    after_post_process :find_dimensions
{'fraction_non_alphanumeric': 0.10253583241455347, 'fraction_numerical': 0.034178610804851156, 'mean_word_length': 2.734567901234568, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7566521', 'n_tokens_mistral': 554, 'n_tokens_neox': 509, 'n_words': 145}