Rename the app from tracker to fit
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 2m44s
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 2m44s
The directory, the repo and the hostname are all fit; the module path, the image, the namespace and the data file were still tracker. Nothing is deployed yet, so this is free now and would not be later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/scottyah/tracker/internal/store"
|
||||
"github.com/scottyah/fit/internal/store"
|
||||
)
|
||||
|
||||
// gratitudeMax caps one gratitude line. It is a line, not an essay, and a cap
|
||||
@@ -250,7 +250,7 @@ func (s *Server) handleExport(w http.ResponseWriter, r *http.Request) {
|
||||
s.fail(w, http.StatusInternalServerError, "The export did not build: "+err.Error())
|
||||
return
|
||||
}
|
||||
name := "tracker-" + s.today() + ".json"
|
||||
name := "fit-" + s.today() + ".json"
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Header().Set("Content-Disposition", `attachment; filename="`+name+`"`)
|
||||
w.Write(body)
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/scottyah/tracker/internal/config"
|
||||
"github.com/scottyah/tracker/internal/store"
|
||||
"github.com/scottyah/fit/internal/config"
|
||||
"github.com/scottyah/fit/internal/store"
|
||||
)
|
||||
|
||||
//go:embed templates/*.html
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/scottyah/tracker/internal/config"
|
||||
"github.com/scottyah/tracker/internal/store"
|
||||
"github.com/scottyah/fit/internal/config"
|
||||
"github.com/scottyah/fit/internal/store"
|
||||
)
|
||||
|
||||
// newServer builds a server whose "today" is fixed, so the day arithmetic is
|
||||
@@ -22,7 +22,7 @@ func newServer(t *testing.T, today string) (*Server, *store.Store) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
st, err := store.Open(filepath.Join(t.TempDir(), "tracker.json"))
|
||||
st, err := store.Open(filepath.Join(t.TempDir(), "fit.json"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -240,11 +240,11 @@ func TestExportThenImport(t *testing.T) {
|
||||
if rec.Code != http.StatusOK {
|
||||
t.Fatalf("status %d", rec.Code)
|
||||
}
|
||||
if !strings.Contains(rec.Header().Get("Content-Disposition"), "tracker-2026-07-31.json") {
|
||||
if !strings.Contains(rec.Header().Get("Content-Disposition"), "fit-2026-07-31.json") {
|
||||
t.Errorf("download name = %q", rec.Header().Get("Content-Disposition"))
|
||||
}
|
||||
|
||||
fresh, err := store.Open(filepath.Join(t.TempDir(), "tracker.json"))
|
||||
fresh, err := store.Open(filepath.Join(t.TempDir(), "fit.json"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user