<commit_before>package integration_test

import (
	"io/ioutil"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"regexp"

	"github.com/concourse/atc"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
	"github.com/onsi/gomega/gexec"
	"github.com/onsi/gomega/ghttp"
	"gopkg.in/yaml.v2"
)

var _ = Describe("Fly CLI", func() {
	var flyrc string
	var stockYAML = `
targets:
  some-target-name:
    some-target-key: some-existing-text
`

	BeforeEach(func() {
		flyrc = filepath.Join(userHomeDir(), ".flyrc")
	})

	AfterEach(func() {
		theFile, _ := os.Open(flyrc)
		theFile.Close()
		os.Remove(flyrc)<commit_msg>Gross, but setting up tmp dirs for each save-target run<commit_after>package integration_test

import (
	"io/ioutil"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"regexp"

	"github.com/concourse/atc"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
	"github.com/onsi/gomega/gexec"
	"github.com/onsi/gomega/ghttp"
	"gopkg.in/yaml.v2"
)

var _ = Describe("Fly CLI", func() {
	var flyrc string
	var stockYAML = `
targets:
  some-target-name:
    some-target-key: some-existing-text
`

	BeforeEach(func() {
		tmpDir, _ := ioutil.TempDir("", "fly-test")
		os.Setenv("HOME", tmpDir)
		os.Setenv("HOMEPATH", tmpDir)
		os.Unsetenv("HOMEDRIVE")
		flyrc = filepath.Join(userHomeDir(), ".flyrc")
	})

	AfterEach(func() {
		theFile, _ := os.Open(flyrc)
		theFile.Close()
		os.Remove(flyrc)
		os.Unsetenv("HOME")
		os.Unsetenv("HOMEPATH")
{'fraction_non_alphanumeric': 0.17670416942422237, 'fraction_numerical': 0.0013236267372600927, 'mean_word_length': 3.973684210526316, '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': '205001', 'n_tokens_mistral': 689, 'n_tokens_neox': 667, 'n_words': 94}