goa_model_gen 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cfb7caba6e01eee8a29002beafa8806c80c9b1acd47ac0d6d824a39b92f408b
4
- data.tar.gz: e90a5a485bcc57521c408e3de2bc81a5d14e3fa62b2dea8695cf31efe858a2a6
3
+ metadata.gz: 7688fbd0deceb1a0e7c2bcf7db894bae0a8fcb02c391e00c34dda9760f525601
4
+ data.tar.gz: 646ff959fe0cce1b7256d7bf7de046aebed82a4e030168429a005b8e32c48658
5
5
  SHA512:
6
- metadata.gz: cc42ddcd158483048bb69dd96b1e776dac7d11bbe4822bdfe5dc779d1c679c5d3f4feb65269a3053bce6cbf268defc560d547bc646a5c8cb217a5f67a8b97d4c
7
- data.tar.gz: 5e606592d318569856b948d6d06f8927943e85ce6053337e18e880f47ddf1626fb8841ab7827247a4e510489fc96267be40681002cc2fc713fa6bcabb005d3d9
6
+ metadata.gz: 47eafcee348fa1a47b3aada4540f49bdcca3f6a8e6ccd45ecee2613dceeddb676981dbebf31b8656da30a08592962df53514d726258d02e898e19af10fa72d55
7
+ data.tar.gz: 99ebfd800233dadca64e4d292efd15a6947c6a6bbf59f2a379ea01ad51df59da77d37dce3f0d24bf5d0cc1395338face2ca987fc893ab7619662135447872302
@@ -65,7 +65,7 @@ module GoaModelGen
65
65
  def converter(*paths)
66
66
  setup
67
67
  new_generator.process({
68
- "templates/converter_base.go.erb" => File.join(cfg.converter_dir, "converter_base.go"),
68
+ "templates/converter_base.go.erb" => File.join(cfg.converter_dir, "base.go"),
69
69
  })
70
70
  load_types_for(paths) do |source_file|
71
71
  next if source_file.types.all?{|t| !t.payload && !t.media_type}
@@ -17,6 +17,7 @@ module GoaModelGen
17
17
  store_dir
18
18
  converter_dir
19
19
  validator_path
20
+ generator_version_comment
20
21
  ].freeze
21
22
 
22
23
  attr_accessor *ATTRIBUTES
@@ -29,6 +30,7 @@ module GoaModelGen
29
30
  @store_dir ||= "./stores"
30
31
  @converter_dir ||= "./converters"
31
32
  @validator_path ||= "gopkg.in/go-playground/validator.v9"
33
+ @generator_version_comment ||= false
32
34
  self
33
35
  end
34
36
 
@@ -3,7 +3,9 @@
3
3
  <%- else -%>
4
4
  // DO NOT EDIT this file.
5
5
  <%- end -%>
6
+ <%- if config.generator_version_comment -%>
6
7
  // This code generated by goa_model_gen-<%= GoaModelGen::VERSION %>
8
+ <%- end -%>
7
9
 
8
10
  package <%= package %>
9
11
 
@@ -12,7 +12,7 @@
12
12
  // "Book": "Books",
13
13
  // }
14
14
 
15
- func GoonFromContext(c context.Context) *goon.Goon {
15
+ func FromContext(c context.Context) *goon.Goon {
16
16
  r := goon.FromContext(c)
17
17
  // baseResolver := r.KindNameResolver
18
18
  // r.KindNameResolver = func(src interface{}) string {
@@ -1,3 +1,3 @@
1
1
  module GoaModelGen
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goa_model_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-25 00:00:00.000000000 Z
11
+ date: 2019-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor