<commit_before>require 's3_image_optimizer/version'
require 's3_image_optimizer/client'
require 's3_image_optimizer/bucket'
require 'aws-sdk'

module S3ImageOptimizer
  class << self
    DEFAULT_OPTIONS = {
      bucket: ENV['AWS_BUCKET'],
      dir: nil
    }
    def optimize_bucket!(options = {})
      options = DEFAULT_OPTIONS.merge(options)
      client = S3ImageOptimizer::Client.new(options)
      client.optimize!
    end
  end
end
<commit_msg>update client<commit_after>require 's3_image_optimizer/version'
require 's3_image_optimizer/client'
require 's3_image_optimizer/bucket'
require 'aws-sdk'

module S3ImageOptimizer
  class << self
    DEFAULT_OPTIONS = {
      bucket: ENV['AWS_BUCKET'],
      dir: ENV['AWS_BUCKET_DIR']
    }
    def optimize_bucket!(options = {})
      options = DEFAULT_OPTIONS.merge(options)
      client = S3ImageOptimizer::Client.new(options)
      client.optimize!
    end
  end
end

{'fraction_non_alphanumeric': 0.10173160173160173, 'fraction_numerical': 0.010822510822510822, 'mean_word_length': 3.9202127659574466, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '3711468', 'n_tokens_mistral': 318, 'n_tokens_neox': 320, 'n_words': 55}