New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce install ID, capture anonymous usage stats. #658 #665

Merged
merged 12 commits into from Jun 13, 2017

use .gauge/id instead of .gauge/.gauge_id

  • Loading branch information...
sriv committed Jun 13, 2017
commit 9a3bda8dbc0aa458719f46ef6b2776db55b4f4fa
Copy path View file
@@ -143,7 +143,7 @@ func UniqueID() string {
APILog.Warning("Unable to read config dir, %s", err)
return ""
}
idFile := filepath.Join(configDir, ".gauge_id")
idFile := filepath.Join(configDir, "id")
s, err := ioutil.ReadFile(idFile)
if err != nil {
APILog.Warning("Unable to read %s", idFile)
Copy path View file
@@ -89,7 +89,7 @@ func TestAllowUpdates(t *testing.T) {

func TestReadUniqueID(t *testing.T) {
expected := "foo"
idFile := filepath.Join("_testData", ".gauge_id")
idFile := filepath.Join("_testData", "id")
ioutil.WriteFile(idFile, []byte(expected), common.NewFilePermissions)

s, err := filepath.Abs("_testData")
Copy path View file
@@ -30,7 +30,7 @@ func CreateSkelFilesIfRequired() {
writeFile(filepath.Join(p, "skel", "env", "default.properties"), defaultProperties)
writeFile(filepath.Join(p, "skel", ".gitignore"), gitignore)

idFile := filepath.Join(p, ".gauge_id")
idFile := filepath.Join(p, "id")
if !common.FileExists(idFile) {
writeFile(idFile, uuid.NewV4().String())
}
ProTip! Use n and p to navigate between commits in a pull request.