| @@ -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!@#$%^&*(-_+)") | |||
| @@ -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 ( | |||
| @@ -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 { | |||
| @@ -6,7 +6,7 @@ import ( | |||
| "net/http/httptest" | |||
| "testing" | |||
| "github.com/goanywhere/rex" | |||
| "git.thevis.us/skepto/rex" | |||
| . "github.com/smartystreets/goconvey/convey" | |||
| ) | |||
| @@ -6,7 +6,7 @@ import ( | |||
| "net/http/httptest" | |||
| "testing" | |||
| "github.com/goanywhere/rex" | |||
| "git.thevis.us/skepto/rex" | |||
| . "github.com/smartystreets/goconvey/convey" | |||
| ) | |||
| @@ -6,7 +6,7 @@ import ( | |||
| "net/http/httptest" | |||
| "testing" | |||
| "github.com/goanywhere/rex" | |||
| "git.thevis.us/skepto/rex" | |||
| . "github.com/smartystreets/goconvey/convey" | |||
| ) | |||
| @@ -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. | |||
| @@ -8,7 +8,7 @@ import ( | |||
| "path" | |||
| "testing" | |||
| "github.com/goanywhere/rex" | |||
| "git.thevis.us/skepto/rex" | |||
| . "github.com/smartystreets/goconvey/convey" | |||
| ) | |||
| @@ -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. | |||
| @@ -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) | |||
| @@ -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) | |||