Skip to content

Commit

Permalink
Merge pull request #7 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 1.3.1
  • Loading branch information
andyone committed Dec 24, 2015
2 parents 9c425d5 + 975c5e1 commit 884dee4
Show file tree
Hide file tree
Showing 40 changed files with 87 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
- EK_TEST_PORT=8080

before_install:
- go get gopkg.in/check.v1
- go get pkg.re/check.v1

script:
- .travis/script.sh .
Expand Down
31 changes: 31 additions & 0 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,44 @@

########################################################################################

# Main func
#
# *: All arguments passed to script
#
main() {
local dir="$1"

if [[ ! -d $dir ]] ; then
exit 1
fi

makeLink
testWithCover "$dir"
}

# Create links for pkg.re import paths
#
makeLink() {
# TravicCI download last stable version of ek, but it not ok
# remove downloaded version for linking with current version for test
if [[ -e $GOPATH/src/pkg.re/essentialkaos/ek.v1 ]] ; then
echo "Directory pkg.re/essentialkaos/ek.v1 removed"
rm -rf $GOPATH/src/pkg.re/essentialkaos/ek.v1
fi

mkdir -p $GOPATH/src/pkg.re/essentialkaos

echo "Created link $GOPATH/src/pkg.re/essentialkaos/ek.v1 -> $GOPATH/src/github.com/essentialkaos/ek"
ln -sf $GOPATH/src/github.com/essentialkaos/ek $GOPATH/src/pkg.re/essentialkaos/ek.v1
}

# Test packaages and save coverage info to file
#
# 1: Dir with sources (String)
#
testWithCover() {
local dir="$1"

local pkg has_errors

rm -f coverage.tmp coverage.txt &> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion arg/arg.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strconv"
"strings"

"github.com/essentialkaos/ek/mathutil"
"pkg.re/essentialkaos/ek.v1/mathutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion arg/arg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ package arg
// ////////////////////////////////////////////////////////////////////////////////// //

import (
. "gopkg.in/check.v1"
"strings"
"testing"

. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cron/cron_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"io/ioutil"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion crypto/passwd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
"time"

"github.com/essentialkaos/ek/mathutil"
"pkg.re/essentialkaos/ek.v1/mathutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion csv/csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"os"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion easing/ease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package easing
import (
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion errutil/errutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ package errutil

import (
"errors"
. "gopkg.in/check.v1"
"testing"

. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtc/fmtc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"errors"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtutil/fmtutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strconv"
"strings"

"github.com/essentialkaos/ek/mathutil"
"pkg.re/essentialkaos/ek.v1/mathutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtutil/fmtutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package fmtutil
import (
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtutil/separator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package fmtutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
"github.com/essentialkaos/ek/fmtc"
"pkg.re/essentialkaos/ek.v1/fmtc"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtutil/termsize_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package fmtutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"syscall"
"time"

"github.com/essentialkaos/ek/system"
"pkg.re/essentialkaos/ek.v1/system"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion fsutil/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ package fsutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
check "gopkg.in/check.v1"
"os"
"sort"
"testing"

check "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion httputil/httputil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
5 changes: 3 additions & 2 deletions jsonutil/jsonutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ package jsonutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
. "gopkg.in/check.v1"
"io/ioutil"
"testing"

"github.com/essentialkaos/ek/crypto"
. "pkg.re/check.v1"

"pkg.re/essentialkaos/ek.v1/crypto"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion knf/knf.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"strconv"
"strings"

"github.com/essentialkaos/ek/fsutil"
"pkg.re/essentialkaos/ek.v1/fsutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion knf/knf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"os"
"testing"

check "gopkg.in/check.v1"
check "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
4 changes: 2 additions & 2 deletions log/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"testing"
"time"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"

"github.com/essentialkaos/ek/fsutil"
"pkg.re/essentialkaos/ek.v1/fsutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion mathutil/mathutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ package mathutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
. "gopkg.in/check.v1"
"testing"

. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion pid/pid.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strconv"
"strings"

"github.com/essentialkaos/ek/fsutil"
"pkg.re/essentialkaos/ek.v1/fsutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
4 changes: 2 additions & 2 deletions pid/pid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"os"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"

"github.com/essentialkaos/ek/fsutil"
"pkg.re/essentialkaos/ek.v1/fsutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion rand/rand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Currently we support Linux and Mac OS X. Some packages have stubs for Windows (f
### Installation

````
go get github.com/essentialkaos/ek
go get pkg.re/essentialkaos/ek.v1
````

### Packages
Expand Down
4 changes: 2 additions & 2 deletions req/req_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"testing"
"time"

"github.com/essentialkaos/ek/env"
. "pkg.re/check.v1"

. "gopkg.in/check.v1"
"pkg.re/essentialkaos/ek.v1/env"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion sliceutil/sliceutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"errors"
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion sortutil/sortutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ package sortutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
. "gopkg.in/check.v1"
"testing"

. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion spellcheck/spellcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sort"
"strings"

"github.com/essentialkaos/ek/mathutil"
"pkg.re/essentialkaos/ek.v1/mathutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion spellcheck/spellcheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ package spellcheck
// ////////////////////////////////////////////////////////////////////////////////// //

import (
. "gopkg.in/check.v1"
"testing"

. "pkg.re/check.v1"
)

func Test(t *testing.T) { TestingT(t) }
Expand Down
2 changes: 1 addition & 1 deletion strutil/strutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package strutil
import (
"testing"

. "gopkg.in/check.v1"
. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
5 changes: 3 additions & 2 deletions terminal/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import (
"fmt"
"strings"

"github.com/essentialkaos/ek/fmtc"
"github.com/essentialkaos/go.linenoise"
"github.com/GeertJohan/go.linenoise"

"pkg.re/essentialkaos/ek.v1/fmtc"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion timeutil/timeutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
"time"

"github.com/essentialkaos/ek/fmtutil"
"pkg.re/essentialkaos/ek.v1/fmtutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
3 changes: 2 additions & 1 deletion timeutil/timeutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ package timeutil

import (
"bytes"
. "gopkg.in/check.v1"
"testing"
"time"

. "pkg.re/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
Loading

0 comments on commit 884dee4

Please sign in to comment.