minke-generator-go 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +14 -30
- data/lib/generators/gomicroservice/scaffold/_build/config.yml.erb +16 -18
- data/lib/generators/gomicroservice/scaffold/_build/dockercompose/<%= application_name %>/docker-compose.yml.erb +0 -6
- data/lib/generators/gomicroservice/scaffold/_build/dockercompose/<%= application_name %>/docker-no-server.yml.erb +0 -6
- data/lib/generators/gomicroservice/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDBjZDMxZTQwNjI5NGFlZGE3OGU0YmYwZmMyNDk2ZTkwZmM4MzkxMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjBkZTYzMGQ2YjAzODBhOGUxMDY2MjgzOWI4MDBlYTM5ZTU5YmRlNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2E5YTNlMWU2NDNlZjBmMDI1YjczNTAyOWMxMDBhYzRlYzYyMWEwN2NhYzg1
|
10
|
+
YzYyMjJlNjM1YjIxNjdkZmI2M2MwZDlkYTNmY2UzM2EwZTZkMTFkMzQ1M2Rk
|
11
|
+
YmMyZWQ0YTc5NWY0MGYzMmQ1MTFmNzNjNTUzZDUzYjJkOTQ1ZmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzkwZDU2ZjA5NWRhNWVmNmU1ODU0YmQ5MjQwYjUxYzhhYTVhODhiNDMzMGRl
|
14
|
+
ZGIzM2M5ZmQ5ZGE5ZGRhZmQwZDM5NmQ3YTUwMzVjMTc1ZTQ2ODhhNmQxMWMy
|
15
|
+
NGQxYjVlYmE2ZDZjODcxZTI5MzkyY2ExMzkwODRiZWQzZjFhZjg=
|
data/README.md
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
![Minke](http://minke.rocks/img/minke_logo.png)
|
1
2
|
# Minke::Generators::GoMicroservice
|
2
3
|
|
3
4
|
[![Build Status](https://travis-ci.org/nicholasjackson/minke-generator-go.svg?branch=master)](https://travis-ci.org/nicholasjackson/minke-generator-go)
|
@@ -8,40 +9,23 @@ For information on Minke please see the documentation [http://nicholasjackson.gi
|
|
8
9
|
|
9
10
|
## Available variables for templates (erb style)
|
10
11
|
| Variable | Description |
|
11
|
-
| ----------------------- |
|
12
|
+
| ----------------------- | -------------------------------------- |
|
12
13
|
| <%= application_name %> | The name of the application executable |
|
13
14
|
| <%= namespace %> | Namespace of the application |
|
14
15
|
| <%= src_root %> | Source root of the application |
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
gem 'minke'
|
22
|
-
gem 'minke-generator-go'
|
23
|
-
```
|
24
|
-
|
25
|
-
And then execute:
|
26
|
-
|
27
|
-
$ bundle
|
28
|
-
|
29
|
-
Or install it yourself:
|
30
|
-
|
31
|
-
```
|
32
|
-
$ gem install minke
|
33
|
-
$ gem install minke-generator-go
|
34
|
-
|
17
|
+
### Generate a new service
|
18
|
+
```bash
|
19
|
+
$ mkdir service
|
20
|
+
$ cd service
|
21
|
+
$ curl -L -s get.minke.rocks | bash -s ' -g minke-generator-go -o $(pwd) -n nicholasjackson/service -a service'
|
35
22
|
```
|
36
23
|
|
37
|
-
|
24
|
+
**NOTE:** replace *nicholasjackson/service* with your github user and application name this needs to correspond to the input namespace you would use in your go code.
|
38
25
|
|
39
|
-
|
26
|
+
You do not need to create this folder inside your GOPATH as all builds are run localised in a Docker container however for an effective workflow. It is very beneficial to follow the standard go conventions.
|
40
27
|
|
41
|
-
|
42
|
-
$ minke -g minke-generator-go -o $GOPATH/src/github.com/nicholasjackson/helloworld
|
43
|
-
-a helloworld -n github.com/nicholasjackson
|
44
|
-
```
|
28
|
+
The generator uses GO vendoring and all sub packages will be cached in the vendor folder.
|
45
29
|
|
46
30
|
## Build and test with Docker
|
47
31
|
To run a build with a Docker container, to execute the functional and unit tests you can use the following commands. Please see the main Minke documentation for more information [http://nicholasjackson.github.io/minke/](http://nicholasjackson.github.io/minke/).
|
@@ -49,14 +33,14 @@ To run a build with a Docker container, to execute the functional and unit tests
|
|
49
33
|
### Build Application Code and Execute Unit tests
|
50
34
|
```bash
|
51
35
|
$ cd _build
|
52
|
-
$
|
53
|
-
$ rake app:test
|
36
|
+
$ ./minke.sh rake app:test
|
54
37
|
```
|
55
38
|
|
56
39
|
### Build a Docker image and execute functional tests with Cucumber
|
57
40
|
```bash
|
58
|
-
$ rake app:build_image
|
59
|
-
$ rake app:cucumber
|
41
|
+
$ ./minke.sh rake app:build_image
|
42
|
+
$ ./minke.sh rake app:cucumber
|
43
|
+
```
|
60
44
|
```
|
61
45
|
|
62
46
|
## Development
|
@@ -26,23 +26,21 @@ build:
|
|
26
26
|
from: './swagger_spec/swagger.yml'
|
27
27
|
to: './dockerfile/<%= application_name %>/swagger_spec'
|
28
28
|
run:
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
type: bridge
|
29
|
+
consul_loader:
|
30
|
+
config_file: './consul_keys.yml'
|
31
|
+
url:
|
32
|
+
address: consul
|
33
|
+
port: 8500
|
34
|
+
type: bridge
|
36
35
|
cucumber:
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
port: 8500
|
43
|
-
type: bridge
|
44
|
-
health_check:
|
45
|
-
address: <%= application_name %>
|
46
|
-
port: 8001
|
47
|
-
path: /v1/health
|
36
|
+
consul_loader:
|
37
|
+
config_file: './consul_keys.yml'
|
38
|
+
url:
|
39
|
+
address: consul
|
40
|
+
port: 8500
|
48
41
|
type: bridge
|
42
|
+
health_check:
|
43
|
+
address: <%= application_name %>
|
44
|
+
port: 8001
|
45
|
+
path: /v1/health
|
46
|
+
type: bridge
|
@@ -11,12 +11,6 @@ services:
|
|
11
11
|
- consul:consul
|
12
12
|
- statsd:statsd
|
13
13
|
- syslog:syslog
|
14
|
-
consul:
|
15
|
-
image: progrium/consul
|
16
|
-
ports:
|
17
|
-
- "::8500"
|
18
|
-
hostname: node1
|
19
|
-
command: "-server -bootstrap -ui-dir /ui"
|
20
14
|
statsd:
|
21
15
|
image: 'hopsoft/graphite-statsd:latest'
|
22
16
|
ports:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minke-generator-go
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nic Jackson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|