Skip to content

Commit c8b0b5a

Browse files
authored
Merge pull request #4 for v0.3 Release
2 parents 003d0b0 + 5f508bc commit c8b0b5a

File tree

7 files changed

+25
-33
lines changed

7 files changed

+25
-33
lines changed

.travis.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,22 @@ language: go
33
sudo: false
44

55
branches:
6-
only:
7-
# - master
8-
# - integration
6+
except:
7+
# skip tags build, we are building branch and master that is enough for
8+
# consistenty check and release. Let's use Travis CI resources optimally
9+
# for aah framework.
10+
- /^v[0-9]\.[0-9]/
911

1012
go:
1113
- 1.6
1214
- 1.7
1315
- 1.8
1416
- tip
1517

16-
before_install:
17-
- bash <(curl -s https://aahframework.org/env.txt) "essentials" "v0"
18-
19-
install:
20-
- cd $GOPATH/src/aahframework.org/essentials.v0
21-
- go get -v -t ./...
22-
# - go get -v -t aahframework.org/essentials.v0/...
18+
go_import_path: aahframework.org/essentials.v0
2319

2420
script:
25-
# - cd $GOPATH/src/aahframework.org/essentials.v0
26-
- bash go.test.sh
21+
- bash <(curl -s https://aahframework.org/go-test)
2722

2823
after_success:
2924
- bash <(curl -s https://codecov.io/bash)

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# essentials - aah framework
22

3-
[![Build Status](https://travis-ci.org/go-aah/essentials.svg?branch=master)](https://travis-ci.org/go-aah/essentials) [![codecov](https://codecov.io/gh/go-aah/essentials/branch/master/graph/badge.svg)](https://codecov.io/gh/go-aah/essentials/branch/master) [![Go Report Card](https://goreportcard.com/badge/aahframework.org/essentials)](https://goreportcard.com/report/aahframework.org/essentials)
4-
[![Version](https://img.shields.io/badge/version-0.2-blue.svg)](https://github.com/go-aah/essentials/releases/latest) [![GoDoc](https://godoc.org/aahframework.org/essentials?status.svg)](https://godoc.org/aahframework.org/essentials) [![License](https://img.shields.io/github/license/go-aah/essentials.svg)](LICENSE)
3+
[![Build Status](https://travis-ci.org/go-aah/essentials.svg?branch=master)](https://travis-ci.org/go-aah/essentials) [![codecov](https://codecov.io/gh/go-aah/essentials/branch/master/graph/badge.svg)](https://codecov.io/gh/go-aah/essentials/branch/master) [![Go Report Card](https://goreportcard.com/badge/aahframework.org/essentials.v0)](https://goreportcard.com/report/aahframework.org/essentials.v0)
4+
[![Version](https://img.shields.io/badge/version-0.3-blue.svg)](https://github.com/go-aah/essentials/releases/latest) [![GoDoc](https://godoc.org/aahframework.org/essentials.v0?status.svg)](https://godoc.org/aahframework.org/essentials.v0) [![License](https://img.shields.io/github/license/go-aah/essentials.svg)](LICENSE)
55

6-
***v0.2 [released](https://github.com/go-aah/essentials/releases/latest) and tagged on Mar 03, 2017***
6+
***v0.3 [released](https://github.com/go-aah/essentials/releases/latest) and tagged on Mar 16, 2017***
77

88
`essentials` contain simple & useful utils for go lang. aah framework utilizes essentials (aka `ess`) library across. Essential library complements with handy methods for:
99
* filepath
@@ -17,10 +17,16 @@
1717
*`essentials` developed for aah framework. However, it's an independent library, can be used separately with any `Go` language project. Feel free to use it.*
1818

1919
# Installation
20-
#### Stable - Version
20+
#### Stable Version - Production Ready
2121
```sh
2222
# install the library
2323
go get -u aahframework.org/essentials.v0
2424
```
2525

26+
#### Development Version - Edge
27+
```sh
28+
# install the development version
29+
go get -u aahframework.org/essentials.v0-unstable
30+
```
31+
2632
See official page [TODO]

essentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
package ess
88

99
// Version no. of go-aah/essentials library
10-
var Version = "0.2"
10+
var Version = "0.3"

filepath.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func StripExt(name string) string {
328328
return name
329329
}
330330

331-
idx := strings.IndexByte(name, '.')
331+
idx := strings.LastIndexByte(name, '.')
332332
if idx > 0 {
333333
return name[:idx]
334334
}

go.test.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

go_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestLookExecutable(t *testing.T) {
1919
}
2020

2121
func TestIsImportPathExists(t *testing.T) {
22-
assert.Equal(t, true, IsImportPathExists("aahframework.org/essentials.v0"))
22+
assert.Equal(t, true, IsImportPathExists("aahframework.org/test.v0"))
2323

2424
assert.Equal(t, false, IsImportPathExists("aahframework.org/unknown"))
2525
}

reflect_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package ess
66

77
import (
88
"fmt"
9+
"strings"
910
"testing"
1011

1112
"aahframework.org/test.v0/assert"
@@ -17,7 +18,8 @@ func TestGetFunctionInfo(t *testing.T) {
1718
}
1819

1920
info := GetFunctionInfo(testFunc1)
20-
assert.Equal(t, "aahframework.org/essentials.v0.testFunc1", info.QualifiedName)
21+
assert.True(t, strings.Contains(info.QualifiedName, "aahframework.org/essentials"))
22+
assert.True(t, strings.Contains(info.QualifiedName, "testFunc1"))
2123

2224
info = GetFunctionInfo(SampleStr{})
2325
assert.Equal(t, "", info.Name)
@@ -30,7 +32,8 @@ func TestGetFunctionInfo(t *testing.T) {
3032
func TestGetCallerInfo(t *testing.T) {
3133
caller := GetCallerInfo()
3234
assert.Equal(t, "TestGetCallerInfo", caller.FunctionName)
33-
assert.Equal(t, "aahframework.org/essentials.v0.TestGetCallerInfo", caller.QualifiedName)
35+
assert.True(t, strings.Contains(caller.QualifiedName, "aahframework.org/essentials"))
36+
assert.True(t, strings.Contains(caller.QualifiedName, "TestGetCallerInfo"))
3437
assert.Equal(t, "reflect_test.go", caller.FileName)
3538
}
3639

0 commit comments

Comments
 (0)