Skip to content

Commit

Permalink
Starts adding cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciro S. Costa committed Jul 2, 2018
1 parent 600e4a6 commit 9dc9d8d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
28 changes: 28 additions & 0 deletions cast/cast.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package cast

import (
_ "encoding/json"
)

type Header struct {
Version uint8 `json:"version,omitempty"`
Width uint `json:"width,omitempty"`
Height uint `json:"height,omitempty"`
Timestamp uint `json:"timestamp,omitempty"`
Title string `json:"title,omitempty"`
Env struct {
Shell string `json:"SHELL,omitempty"`
Term string `json:"TERM,omitempty"`
} `json:"env,omitempty"`
}

type Event struct {
Time float64
Type string
Data string
}

type Cast struct {
Header Header
EventStream []*Event
}
13 changes: 13 additions & 0 deletions cast/cast_suite_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package cast_test

import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

func TestCast(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Cast Suite")
}
12 changes: 12 additions & 0 deletions cast/cast_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package cast_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

. "github.com/cirocosta/asciinema-edit/cast"
)

var _ = Describe("Cast", func() {

})
7 changes: 6 additions & 1 deletion editor/editor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ import (
)

var _ = Describe("Editor", func() {

Describe("Cut", func() {
Context("without cast", func() {
It("fails", func() {
})
})
})
})

0 comments on commit 9dc9d8d

Please sign in to comment.