<commit_before>['IMAGE_DIR','IMAGER_USER','IMAGER_HOST','DISK_PARTITION','PRISTINE_SOURCE'].each do |env_variable|
  raise "ENV['#{env_variable}'] is not set!" if ENV[env_variable].nil?
end

# export IMAGE_DIR=/Volumes/DeployStudio/Masters/HFS
# export IMAGER_USER=pivotal
# export IMAGER_HOST=bacon
# export DISK_PARTITION=/dev/disk0s2
# export PRISTINE_SOURCE=/Volumes/DeployStudio/Masters/HFS
# export DEPLOYSTUDIO_SSH_KEYFILE=/Users/pivotal/.ssh/id_union_deploy
# export DEPLOYSTUDIO_DESTDIR=/Volumes/PivotLand/DeployStudio/Masters/HFS
# export DEPLOYSTUDIO_USER_HOST=deploy@union

require 'timeout'

module Util
  def on_persistent?
    # sometimes the disks aren't mounted; mount both disks to make sure
    system("ssh #{ENV['IMAGER_USER']}@#{ENV['IMAGER_HOST']} -o ConnectTimeout=5 'sudo hdid /dev/disk0s2; sudo hdid /dev/disk0s3; df' | egrep '/Volumes/NEWLY_IMAGED|/Volumes/bacon'")
  end

  def reboot_to(volume)
    puts("rebooting to #{volume}")
    system("ssh #{ENV['IMAGER_USER']}@#{ENV['IMAGER_HOST']} 'sudo hdiutil attach /dev/disk0'")
    puts("Blessing #{volume}")<commit_msg>removed deprecated DISK_PARTITION environment variable<commit_after>['IMAGE_DIR','IMAGER_USER','IMAGER_HOST','PRISTINE_SOURCE'].each do |env_variable|
  raise "ENV['#{env_variable}'] is not set!" if ENV[env_variable].nil?
end

# export IMAGE_DIR=/Volumes/DeployStudio/Masters/HFS
# export IMAGER_USER=pivotal
# export IMAGER_HOST=bacon
# export PRISTINE_SOURCE=/Volumes/DeployStudio/Masters/HFS
# export DEPLOYSTUDIO_SSH_KEYFILE=/Users/pivotal/.ssh/id_union_deploy
# export DEPLOYSTUDIO_DESTDIR=/Volumes/PivotLand/DeployStudio/Masters/HFS
# export DEPLOYSTUDIO_USER_HOST=deploy@union

require 'timeout'

module Util
  def on_persistent?
    # sometimes the disks aren't mounted; mount both disks to make sure
    system("ssh #{ENV['IMAGER_USER']}@#{ENV['IMAGER_HOST']} -o ConnectTimeout=5 'sudo hdid /dev/disk0s2; sudo hdid /dev/disk0s3; df' | egrep '/Volumes/NEWLY_IMAGED|/Volumes/bacon'")
  end

  def reboot_to(volume)
    puts("rebooting to #{volume}")
    system("ssh #{ENV['IMAGER_USER']}@#{ENV['IMAGER_HOST']} 'sudo hdiutil attach /dev/disk0'")
    puts("Blessing #{volume}")
{'fraction_non_alphanumeric': 0.13918236104731282, 'fraction_numerical': 0.006430868167202572, 'mean_word_length': 6.510344827586207, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7336378', 'n_tokens_mistral': 862, 'n_tokens_neox': 828, 'n_words': 143}