Przeglądaj źródła

fix Sirupsen import

also change to use forked version of env and fs
tags/v0.10.0
John Robinson 4 lat temu
rodzic
commit
dd85ae520c
Brak konta powiązanego z adresem e-mail autora
11 zmienionych plików z 25 dodań i 25 usunięć
  1. +2
    -2
      cmd/rex/new.go
  2. +5
    -5
      cmd/rex/run.go
  3. +3
    -3
      example/main.go
  4. +1
    -1
      middleware/cache_test.go
  5. +1
    -1
      middleware/compress_test.go
  6. +1
    -1
      middleware/header_test.go
  7. +1
    -1
      middleware/logger.go
  8. +1
    -1
      middleware/static_test.go
  9. +2
    -2
      rex.go
  10. +4
    -4
      server.go
  11. +4
    -4
      server_test.go

+ 2
- 2
cmd/rex/new.go Wyświetl plik

@@ -9,14 +9,14 @@ import (
"regexp"
"runtime"

log "github.com/Sirupsen/logrus"
"github.com/codegangsta/cli"
log "github.com/sirupsen/logrus"

"github.com/goanywhere/cmd"
"github.com/goanywhere/crypto"
)

const endpoint = "https://github.com/goanywhere/rex"
const endpoint = "https://git.thevis.us/skepto/rex"

var secrets = []rune("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*(-_+)")


+ 5
- 5
cmd/rex/run.go Wyświetl plik

@@ -11,15 +11,15 @@ import (
"runtime"
"syscall"

log "github.com/Sirupsen/logrus"
"github.com/codegangsta/cli"
log "github.com/sirupsen/logrus"

"github.com/goanywhere/rex/internal"
"github.com/goanywhere/rex/livereload"
"git.thevis.us/skepto/rex/internal"
"git.thevis.us/skepto/rex/livereload"

"git.thevis.us/skepto/env"
"git.thevis.us/skepto/fs"
"github.com/goanywhere/cmd"
"github.com/goanywhere/env"
"github.com/goanywhere/fs"
)

var (

+ 3
- 3
example/main.go Wyświetl plik

@@ -7,9 +7,9 @@ import (
"net/http"
"path/filepath"

"github.com/goanywhere/env"
"github.com/goanywhere/rex"
"github.com/goanywhere/rex/livereload"
"git.thevis.us/skepto/env"
"git.thevis.us/skepto/rex"
"git.thevis.us/skepto/rex/livereload"
)

type User struct {

+ 1
- 1
middleware/cache_test.go Wyświetl plik

@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/goanywhere/rex"
"git.thevis.us/skepto/rex"
. "github.com/smartystreets/goconvey/convey"
)


+ 1
- 1
middleware/compress_test.go Wyświetl plik

@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/goanywhere/rex"
"git.thevis.us/skepto/rex"
. "github.com/smartystreets/goconvey/convey"
)


+ 1
- 1
middleware/header_test.go Wyświetl plik

@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/goanywhere/rex"
"git.thevis.us/skepto/rex"
. "github.com/smartystreets/goconvey/convey"
)


+ 1
- 1
middleware/logger.go Wyświetl plik

@@ -4,7 +4,7 @@ import (
"net/http"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// Logger renders the simple HTTP accesses logs for the upcoming http.Handler.

+ 1
- 1
middleware/static_test.go Wyświetl plik

@@ -8,7 +8,7 @@ import (
"path"
"testing"

"github.com/goanywhere/rex"
"git.thevis.us/skepto/rex"
. "github.com/smartystreets/goconvey/convey"
)


+ 2
- 2
rex.go Wyświetl plik

@@ -6,8 +6,8 @@ import (
"net/http"
"path"

"github.com/goanywhere/env"
"github.com/goanywhere/fs"
"git.thevis.us/skepto/env"
"git.thevis.us/skepto/fs"
)

// Shortcut for string based map.

+ 4
- 4
server.go Wyświetl plik

@@ -10,9 +10,9 @@ import (
"sync"
"time"

log "github.com/Sirupsen/logrus"
"github.com/goanywhere/env"
"git.thevis.us/skepto/env"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
)

var (
@@ -105,8 +105,8 @@ func (self *server) Group(prefix string) *server {
// Host creates a new application group under the given (sub)domain.
func (self *server) Host(domain string) *server {
var middleware = new(middleware)
self.mux.Host(domain).Handler(middleware)
var mux = self.mux.Host(domain).Subrouter()
self.mux.Host(domain).Handler(middleware)
var mux = self.mux.Host(domain).Subrouter()

server := &server{middleware: middleware, mux: mux}
self.subservers = append(self.subservers, server)

+ 4
- 4
server_test.go Wyświetl plik

@@ -8,8 +8,8 @@ import (
"path"
"testing"

"github.com/goanywhere/env"
mw "github.com/goanywhere/rex/middleware"
"git.thevis.us/skepto/env"
mw "git.thevis.us/skepto/rex/middleware"
. "github.com/smartystreets/goconvey/convey"
)

@@ -294,13 +294,13 @@ func TestHost(t *testing.T) {
w.Header().Set("X-Powered-By", "base")
})

user := app.Host("localhost")
user := app.Host("localhost")
user.Get("/", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Powered-By", "rex")
})

Convey("rex.Host", t, func() {
request, _ := http.NewRequest("GET", "http://localhost/", nil)
request, _ := http.NewRequest("GET", "http://localhost/", nil)
response := httptest.NewRecorder()

app.ServeHTTP(response, request)

Ładowanie…
Anuluj
Zapisz