bee_go 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/build/README +1 -1
- data/go.yml +14 -8
- metadata +4 -4
data/build/README
CHANGED
data/go.yml
CHANGED
@@ -19,6 +19,9 @@
|
|
19
19
|
go_src_dir: "src"
|
20
20
|
go_main: "#{go_src_dir}/#{go_package}/#{name}/main.go"
|
21
21
|
go_args: ""
|
22
|
+
go_bin_opt: ""
|
23
|
+
go_test_opt: ""
|
24
|
+
go_cov_file: "#{go_build_dir}/coverage.out"
|
22
25
|
# test coverage mode:
|
23
26
|
# - set: indicates which statement was run
|
24
27
|
# - count: counts the numbers of runs on a statement
|
@@ -35,7 +38,7 @@
|
|
35
38
|
description: Make binary executable
|
36
39
|
script:
|
37
40
|
- print: "Building project #{name}..."
|
38
|
-
- "go build -o #{go_bin_dir}/#{name} #{go_main}"
|
41
|
+
- "go build #{go_bin_opt} -o #{go_bin_dir}/#{name} #{go_main}"
|
39
42
|
|
40
43
|
- target: go_run
|
41
44
|
depends: go_bin
|
@@ -47,22 +50,25 @@
|
|
47
50
|
depends: go_env
|
48
51
|
description: Run unit tests
|
49
52
|
script:
|
50
|
-
- "go test #{go_package}/..."
|
53
|
+
- "go test #{go_test_opt} #{go_package}/..."
|
51
54
|
|
52
55
|
- target: go_cover
|
53
56
|
depends: go_clean
|
54
57
|
description: Generate coverage report
|
55
58
|
script:
|
56
59
|
- mkdir: :go_build_dir
|
57
|
-
- "
|
60
|
+
- print: "Generating coverage reports..."
|
58
61
|
- for: _dir
|
59
62
|
in: 'Dir.glob("#{go_src_dir}/#{go_package}/#{name}/**/*").select{|f| File.directory? f}'
|
60
63
|
do:
|
61
|
-
- rb:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
64
|
+
- rb: |
|
65
|
+
_pkg = _dir[go_src_dir.length+1..-1]
|
66
|
+
_name = _pkg[_pkg.rindex('/')+1..-1]
|
67
|
+
- "go test -covermode=#{go_cover_mode} -coverprofile=#{go_cov_file} #{_pkg} > /dev/null"
|
68
|
+
- "go tool cover -html=#{go_cov_file} -o #{go_build_dir}/#{_name}.html"
|
69
|
+
- "go test -cover #{go_package}/..."
|
70
|
+
- rm: :go_cov_file
|
71
|
+
- print: "Test coverage reports generated in directory '#{go_build_dir}'"
|
66
72
|
|
67
73
|
- target: go_doc
|
68
74
|
description: Generate code documentation
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bee_go
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michel Casabianca
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2014-
|
18
|
+
date: 2014-07-09 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bee
|