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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDVhY2RhODRlYjU5ODM5NjU2Njc4NmM3OGQ3Y2MxOWM1OWRlMGVhMw==
4
+ ZDBjZDMxZTQwNjI5NGFlZGE3OGU0YmYwZmMyNDk2ZTkwZmM4MzkxMg==
5
5
  data.tar.gz: !binary |-
6
- YjU3MTkzM2I2ZDcyMjRlYWQxYTA0YTE1NGE1M2ExNWJlN2E3ZGFkOA==
6
+ MjBkZTYzMGQ2YjAzODBhOGUxMDY2MjgzOWI4MDBlYTM5ZTU5YmRlNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTVlMzIwNTc1ZDgzYmNkOGIwNzdkMjk1YjZhMjU0MThhOWE1ZGRlNzM0MzFl
10
- NTRhZjUzYTU5OTM1ZjRhNGI0YzNlYjY1YThiYzVkNGQ1OTYwYzIwMjY0ZDg5
11
- OWU5NWI3MDUxOGQyYWQzNTBhY2VlNTM0NTUyNWI2YmY3M2Q1M2Y=
9
+ Y2E5YTNlMWU2NDNlZjBmMDI1YjczNTAyOWMxMDBhYzRlYzYyMWEwN2NhYzg1
10
+ YzYyMjJlNjM1YjIxNjdkZmI2M2MwZDlkYTNmY2UzM2EwZTZkMTFkMzQ1M2Rk
11
+ YmMyZWQ0YTc5NWY0MGYzMmQ1MTFmNzNjNTUzZDUzYjJkOTQ1ZmQ=
12
12
  data.tar.gz: !binary |-
13
- ODIzZjlhNDhjMzM3NzYxNDFiNGNjMmVmM2MyNWNmMTQ5NjIzOTE4NTM4M2E4
14
- ZGMwMzA5Yjg4ZWM3N2E2YWM1YzMzYTkwODBlMDg5NTZkODQyZGFiYjYyOTU3
15
- OTE5MWM2OTA4Mzk3YTNjYTY0ODZlM2JiMzRmZTI5NGNjNTBiN2Q=
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
- ## Installation
17
-
18
- Add this line to your application's Gemfile:
19
-
20
- ```ruby
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
- ## Usage
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
- To scaffold a new service run:
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
- ```bash
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
- $ bundle
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
- pre:
30
- consul_loader:
31
- config_file: './consul_keys.yml'
32
- url:
33
- address: consul
34
- port: 8500
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
- pre:
38
- consul_loader:
39
- config_file: './consul_keys.yml'
40
- url:
41
- address: consul
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:
@@ -1,12 +1,6 @@
1
1
  version: '2'
2
2
 
3
3
  services:
4
- consul:
5
- image: progrium/consul
6
- ports:
7
- - "::8500"
8
- hostname: node1
9
- command: "-server -bootstrap -ui-dir /ui"
10
4
  statsd:
11
5
  image: 'hopsoft/graphite-statsd:latest'
12
6
  ports:
@@ -1,7 +1,7 @@
1
1
  module Minke
2
2
  module Generators
3
3
  module GoMicroservice
4
- VERSION = "0.7.2"
4
+ VERSION = "0.8.0"
5
5
  end
6
6
  end
7
7
  end
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.7.2
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-06-26 00:00:00.000000000 Z
11
+ date: 2016-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler