Skip to content

Commit

Permalink
Merge pull request #4 for v0.3 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm authored Mar 16, 2017
2 parents 003d0b0 + 5f508bc commit c8b0b5a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 33 deletions.
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@ language: go
sudo: false

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

go:
- 1.6
- 1.7
- 1.8
- tip

before_install:
- bash <(curl -s https://aahframework.org/env.txt) "essentials" "v0"

install:
- cd $GOPATH/src/aahframework.org/essentials.v0
- go get -v -t ./...
# - go get -v -t aahframework.org/essentials.v0/...
go_import_path: aahframework.org/essentials.v0

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

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# essentials - aah framework

[![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)
[![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)
[![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)
[![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)

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

`essentials` contain simple & useful utils for go lang. aah framework utilizes essentials (aka `ess`) library across. Essential library complements with handy methods for:
* filepath
Expand All @@ -17,10 +17,16 @@
*`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.*

# Installation
#### Stable - Version
#### Stable Version - Production Ready
```sh
# install the library
go get -u aahframework.org/essentials.v0
```

#### Development Version - Edge
```sh
# install the development version
go get -u aahframework.org/essentials.v0-unstable
```

See official page [TODO]
2 changes: 1 addition & 1 deletion essentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
package ess

// Version no. of go-aah/essentials library
var Version = "0.2"
var Version = "0.3"
2 changes: 1 addition & 1 deletion filepath.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func StripExt(name string) string {
return name
}

idx := strings.IndexByte(name, '.')
idx := strings.LastIndexByte(name, '.')
if idx > 0 {
return name[:idx]
}
Expand Down
12 changes: 0 additions & 12 deletions go.test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestLookExecutable(t *testing.T) {
}

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

assert.Equal(t, false, IsImportPathExists("aahframework.org/unknown"))
}
Expand Down
7 changes: 5 additions & 2 deletions reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package ess

import (
"fmt"
"strings"
"testing"

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

info := GetFunctionInfo(testFunc1)
assert.Equal(t, "aahframework.org/essentials.v0.testFunc1", info.QualifiedName)
assert.True(t, strings.Contains(info.QualifiedName, "aahframework.org/essentials"))
assert.True(t, strings.Contains(info.QualifiedName, "testFunc1"))

info = GetFunctionInfo(SampleStr{})
assert.Equal(t, "", info.Name)
Expand All @@ -30,7 +32,8 @@ func TestGetFunctionInfo(t *testing.T) {
func TestGetCallerInfo(t *testing.T) {
caller := GetCallerInfo()
assert.Equal(t, "TestGetCallerInfo", caller.FunctionName)
assert.Equal(t, "aahframework.org/essentials.v0.TestGetCallerInfo", caller.QualifiedName)
assert.True(t, strings.Contains(caller.QualifiedName, "aahframework.org/essentials"))
assert.True(t, strings.Contains(caller.QualifiedName, "TestGetCallerInfo"))
assert.Equal(t, "reflect_test.go", caller.FileName)
}

Expand Down

0 comments on commit c8b0b5a

Please sign in to comment.