<commit_before>require "fog"
require "open-uri"

class PgbackupsArchive::Storage

  def initialize(key, file)
    @key = key
    @file = file
  end

  def connection
    Fog::Storage.new({
      provider:              "AWS",
      aws_access_key_id:     ENV["PGBACKUPS_AWS_ACCESS_KEY_ID"],
      aws_secret_access_key: ENV["PGBACKUPS_AWS_SECRET_ACCESS_KEY"],
      region:                ENV["PGBACKUPS_REGION"],
      persistent:            false
    })
  end

  def bucket
    connection.directories.get ENV["PGBACKUPS_BUCKET"]
  end

  def store
    bucket.files.create key: @key, body: @file, :public => false
  end

end<commit_msg>Use Ruby 1.8-compatible hash syntax<commit_after>require "fog"
require "open-uri"

class PgbackupsArchive::Storage

  def initialize(key, file)
    @key = key
    @file = file
  end

  def connection
    Fog::Storage.new({
      :provider              => "AWS",
      :aws_access_key_id     => ENV["PGBACKUPS_AWS_ACCESS_KEY_ID"],
      :aws_secret_access_key => ENV["PGBACKUPS_AWS_SECRET_ACCESS_KEY"],
      :region                => ENV["PGBACKUPS_REGION"],
      :persistent            => false
    })
  end

  def bucket
    connection.directories.get ENV["PGBACKUPS_BUCKET"]
  end

  def store
    bucket.files.create :key => @key, :body => @file, :public => false
  end

end
{'fraction_non_alphanumeric': 0.10950570342205324, 'fraction_numerical': 0.001520912547528517, 'mean_word_length': 2.6759776536312847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '104426', 'n_tokens_mistral': 472, 'n_tokens_neox': 461, 'n_words': 91}