Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit 6bc5875

Browse files
committed
2.0.0
1 parent 2a83955 commit 6bc5875

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1888
-1103
lines changed

.travis.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@ go:
44
- 1.8
55
- tip
66

7-
addons:
8-
apt:
9-
packages:
10-
- xclip # So we can run the clipboard tests
11-
127
cache:
138
directories:
149
- vendor
1510

16-
before_install:
17-
# So we can run the clipboard tests
18-
- export DISPLAY=:99.0
19-
- sh -e /etc/init.d/xvfb start
11+
env:
12+
global:
13+
# coveralls repo token
14+
- secure: N9SmiHqmT62JBF4+ChXXrYKdIfTZ7nHkcQHnSRzyZ4ii00uY9g9w/8nWPGaGBJ4WGoaCUJx+VkVCS1UOf/UbZ8CqST89LE5EFc2N4AnqFSA3iRA3BlTb1OehppdYSA9GdrmX+NbaDJNdaqgOiz+JpBvbno2+hP0jXQPPqEhQKlRlP+I4QlwYtWiHm+iwoNP88kmunBj+G/qe79kq0qflQOFcZQIujORWjNLGNKepA06Bnb3Yi42EihXCQP7BbXWgKhp3SVTvIAL7wfEYjTOmPRXvU+bs8O7DI/C002CfnyiE00/KzKNaD+ICRiBh33ew3wD3FraLuXlWJ9BDNXKjfv04y0Mif/oERHc2Y08BNuQAFnlD2QCMrze6bRrJRf0Z5wD9tQn52BhP6w9qnxmMXitDu+j9uUj81wNz9uiEdFm+bZvn0HKHcgMzye9VCsPXRhmAABlr9XlGY+vjiiaguiWM/d6x87CtTBZva9FVZkfd3UY61X2L4vSIYuGOQe86GJFb4w8u71iD1Do4lnp/mKXRymeUgMTWIyF2meZK/7gF1TwLxskmvgeEBZ7uTSpsU+iNuIV4hzmPn5IAQgQQc4RqFPOHP7ZqvRvA++cImTHk5IW78KW0B2Ca2QPJHXNekHuAMJV65VSnhh4h4r3GpLh15rAMqx+Ud2BFsRzWxuY=
2015

2116
before_script:
2217
- make install-env-deps
@@ -26,7 +21,7 @@ before_script:
2621

2722
script:
2823
- make lint
29-
- make test
24+
- make test && make coverage
3025
- make build && make clean
3126

3227
after_success:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
# 2.0.0
4+
5+
Rewrite all the things
6+
37
# 1.0.0
48

59
First release

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Please report issues via the issue tracker on [GitHub](https://github.com/mike18
1212

1313
- **Lint changes** - Make sure you run `make lint` before committing your code.
1414

15-
- **Add tests where appropriate** - Make sure new features or bug fixes are covered by a test/
15+
- **Add tests where appropriate** - Make sure new features or bug fixes are covered by a test.
1616

1717
- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date.
1818

Gopkg.lock

Lines changed: 182 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
# Gopkg.toml example
3+
#
4+
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
5+
# for detailed Gopkg.toml documentation.
6+
#
7+
# required = ["github.com/user/thing/cmd/thing"]
8+
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
9+
#
10+
# [[constraint]]
11+
# name = "github.com/user/project"
12+
# version = "1.0.0"
13+
#
14+
# [[constraint]]
15+
# name = "github.com/user/project2"
16+
# branch = "dev"
17+
# source = "github.com/myfork/project2"
18+
#
19+
# [[override]]
20+
# name = "github.com/x/y"
21+
# version = "2.4.0"
22+
23+
24+
[[constraint]]
25+
name = "github.com/ararog/timeago"
26+
version = "0.0.1"
27+
28+
[[constraint]]
29+
branch = "master"
30+
name = "github.com/atotto/clipboard"
31+
32+
[[constraint]]
33+
name = "github.com/boltdb/bolt"
34+
version = "1.3.0"
35+
36+
[[constraint]]
37+
name = "github.com/briandowns/spinner"
38+
version = "1.0.0"
39+
40+
[[constraint]]
41+
name = "github.com/fatih/color"
42+
version = "1.5.0"
43+
44+
[[constraint]]
45+
name = "github.com/parnurzeal/gorequest"
46+
version = "0.2.15"
47+
48+
[[constraint]]
49+
name = "github.com/segmentio/go-prompt"
50+
revision = "f0d19b6901ade831d5a3204edc0d6a7d6457fbb2"
51+
52+
[[constraint]]
53+
branch = "master"
54+
name = "github.com/spf13/afero"
55+
56+
[[constraint]]
57+
branch = "master"
58+
name = "github.com/spf13/cobra"
59+
60+
[[constraint]]
61+
branch = "master"
62+
name = "golang.org/x/oauth2"

Makefile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
BIN=snpt
22
BUILD_DIR=./build
3-
SRC_DIR=./src
3+
ENTRYPOINT=./cmd/snpt
44

55
.PHONY: default
66
default: build
77

88
.PHONY: test
99
test:
10-
go test -v $(SRC_DIR)/...
10+
go test -cover -v ./internal/...
11+
12+
.PHONY: coverage
13+
coverage:
14+
goveralls -package=./internal/...
1115

1216
.PHONY: lint
1317
lint:
1418
gometalinter \
15-
--disable=errcheck \
16-
--disable=gotype \
1719
--enable=gofmt \
20+
--enable=misspell \
1821
--vendor \
19-
$(SRC_DIR)/...
22+
--deadline=180s \
23+
--exclude=internal/platform/storage/test.go \
24+
./internal/... ./cmd/...
2025

2126
.PHONY: build
2227
build:
23-
go build -o $(BUILD_DIR)/$(BIN) $(SRC_DIR)
28+
go build -o $(BUILD_DIR)/$(BIN) $(ENTRYPOINT)
2429

2530
.PHONY: build-all
2631
build-all:
27-
gox -output "$(BUILD_DIR)/$(BIN)-$(TRAVIS_TAG)-{{.OS}}-{{.Arch}}/$(BIN)" -os="darwin windows linux" -arch="amd64" $(SRC_DIR)/...
32+
gox -output "$(BUILD_DIR)/$(BIN)-$(TRAVIS_TAG)-{{.OS}}-{{.Arch}}/$(BIN)" -os="darwin windows linux" -arch="amd64" $(ENTRYPOINT)
2833

2934
.PHONY: package
3035
package:
@@ -40,15 +45,16 @@ clean-all: clean
4045

4146
.PHONY: install
4247
install:
43-
glide install
48+
dep ensure
4449

4550
.PHONY: install-env-deps
4651
install-env-deps:
4752
go get -u github.com/mitchellh/gox
4853
go get -u github.com/alecthomas/gometalinter
49-
go get -u github.com/Masterminds/glide
54+
go get -u github.com/golang/dep/cmd/dep
55+
go get -u github.com/mattn/goveralls
5056
gometalinter --install
5157

5258
.PHONY: fmt
5359
fmt:
54-
go fmt $(SRC_DIR)/...
60+
go fmt ./internal/... ./cmd/...

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
[![Version](https://img.shields.io/github/release/mike182uk/snpt.svg?style=flat-square)](https://github.com/mike182uk/snpt)
44
[![Build Status](https://img.shields.io/travis/mike182uk/snpt.svg?style=flat-square)](http://travis-ci.org/mike182uk/snpt)
5-
[![Downloads](https://img.shields.io/github/downloads/mike182uk/snpt/total.svg?style=flat-square)](https://github.com/mike182uk/snpt)
5+
[![Coveralls](https://img.shields.io/coveralls/mike182uk/snpt/master.svg?style=flat-square)](https://coveralls.io/r/mike182uk/snpt)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/mike182uk/snpt)](https://goreportcard.com/report/github.com/mike182uk/snpt)
67
[![License](https://img.shields.io/github/license/mike182uk/snpt.svg?style=flat-square)](https://github.com/mike182uk/snpt)
78

89
A [gist](https://gist.github.com/) powered CLI snippet retriever.

bash_completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
_snpt()
22
{
33
local cur=${COMP_WORDS[COMP_CWORD]}
4-
COMPREPLY=( $(compgen -W "cp ls token sync write" -- $cur) )
4+
COMPREPLY=( $(compgen -W "cp copy ls list token sync write version" -- $cur) )
55
}
66
complete -F _snpt snpt

0 commit comments

Comments
 (0)