goon_model_gen 0.4.2 → 0.4.3

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: 9835d07159adef42e01da288ad53dd918cbb626896619aadf0891446f22ee2e7
4
- data.tar.gz: a89f39e731615da2d590f7e048371ae9f481ca08d4e3f03aa0b7edd092d9884c
3
+ metadata.gz: 288296f7050b0957a20384cb1a99201c42a665d91375cf10f2af0bdc1962cc26
4
+ data.tar.gz: 75589bbea1e0e0e5c3ceddd1bc7a5903013debbf22970d35bbcd38ace6fdd55c
5
5
  SHA512:
6
- metadata.gz: 3ba792bfd8a7f85c39d5954018256d7f7b6d2923c12067a974b3bdbab65cd63e0697061afaa5422f379b113fe3928aadcae9f16978b895e2b10d244a8b9d004b
7
- data.tar.gz: b845c619e3cbeee5f406967c03da5d2f81c7f8ebcc91a4da87b23baf23e1aa64417034350c682cc2e0bb9635ca3707c1cd0a93dcffc066fe27930bd6dc888534
6
+ metadata.gz: 1b8e33fc31f6a36bcfbe128bb94453969f58fff4573df641e35905c67eb04ad8ac7137a6e7fa8d17be49fa46ca2a9f6cbaf20be89683e863588c5f21b7cbd32c
7
+ data.tar.gz: 192051e6f8db028d2ec8b647ea76aff3cf87333b9001a24adf98c5cd2907e078b0b6b7d7cb7470401cb80c2ed2388b81876cd6a8901b8bc2fe0af7c7d651b942
@@ -40,6 +40,11 @@ module GoonModelGen
40
40
  item.resolve(pkgs)
41
41
  end
42
42
  end
43
+
44
+ def fields
45
+ map.values.map{|i| i.respond_to?(:fields) ? i.fields : []}.flatten
46
+ end
47
+
43
48
  end
44
49
  end
45
50
  end
@@ -72,7 +72,7 @@ mappings.each do |mapping|
72
72
  <%- if !mapping.returns_error # => requries_context is false -%>
73
73
  m.<%= mfield.name %> = <%= mapping.func %>(<%= arg_str %>)
74
74
  <%- else
75
- arg_str = (mapping.requries_context ? 'ctx, ' : '') + arg_str
75
+ arg_str = (mapping.requires_context ? 'ctx, ' : '') + arg_str
76
76
  -%>
77
77
  if v, err := <%= mapping.func %>(<%= arg_str %>); err != nil {
78
78
  return err
@@ -1,3 +1,3 @@
1
1
  module GoonModelGen
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goon_model_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-06 00:00:00.000000000 Z
11
+ date: 2019-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  - !ruby/object:Gem::Version
259
259
  version: '0'
260
260
  requirements: []
261
- rubygems_version: 3.0.4
261
+ rubygems_version: 3.0.3
262
262
  signing_key:
263
263
  specification_version: 4
264
264
  summary: Generate model source files with datastore in Golang