goa_model_gen 0.9.1 → 0.9.2

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: 2d61d213850d5fabf93e53228d2159a7812020ebc5846849b60500db0a50248b
4
- data.tar.gz: 476d0922d7b3038ddd869298f0f14f47743c64c882e88a482fe993f0139558d5
3
+ metadata.gz: a1bb7af6761db790f79c2af6082ff4770d4d67d6564e7480e0dd158c2d03ec4b
4
+ data.tar.gz: 9a2b7b37485814180b6162d3de8dc6c92b0be9e5f990526c2de18ad713026107
5
5
  SHA512:
6
- metadata.gz: 94af1f61acd0add9cfcc9d1101b2c917bd277d4bd221d6fd512d5c6e3c78a5745bc61fdb648d12610cbc3ce1d02216112cf3a349157e27253636c59c5535d340
7
- data.tar.gz: cf65021ffb9fc94dfbc6df65a4f3ef972e8afe4db3f7470f496a3cf2b31bf14a234efae0df212c4b73cd114840e7b2bb5bf7715d6dc82a8441035964dae67c8f
6
+ metadata.gz: 72223fb263c19e187535f760b87f89b909231efd10d277db816bb5af3fa907ccec5825bbfba257b0678005f22e64a522b0a57429d50c8c95e2595b048ef8de6c
7
+ data.tar.gz: b03fcc86b5e1af9fee08e24ad14bbc6e1b85072d1921cc1e7ab70a2452fbe9a56d71da8f85383483912df7c7631470a5db4c4f336fa71489bbb0de8e6502d2b4
@@ -25,7 +25,7 @@ module GoaModelGen
25
25
 
26
26
  def fulfill
27
27
  @go_package ||= default_go_package
28
- @swagger_yaml ||= "./swagger/swagger.yaml"
28
+ # @swagger_yaml ||= "./swagger/swagger.yaml"
29
29
  @gofmt_disabled ||= false
30
30
  @model_dir ||= "./model"
31
31
  @store_dir ||= "./stores"
@@ -7,6 +7,8 @@ require "goa_model_gen/type"
7
7
  require "goa_model_gen/field"
8
8
  require "goa_model_gen/source_file"
9
9
 
10
+ require "active_support/core_ext/string"
11
+
10
12
  module GoaModelGen
11
13
  class BaseLoader
12
14
  attr_reader :path, :raw
@@ -106,11 +108,11 @@ module GoaModelGen
106
108
  end
107
109
 
108
110
  def load_files(paths)
109
- swagger_loader = GoaModelGen::SwaggerLoader.new(config.swagger_yaml)
111
+ swagger_loader = config.swagger_yaml.present? ? GoaModelGen::SwaggerLoader.new(config.swagger_yaml) : nil
110
112
  defined_types = {}
111
113
  files = paths.map do |path|
112
114
  GoaModelGen::ModelLoader.new(path).load_file.tap do |f|
113
- f.types.each{|t| t.assign_swagger_types(swagger_loader) }
115
+ f.types.each{|t| t.assign_swagger_types(swagger_loader) } if swagger_loader
114
116
  f.types.each{|t| defined_types[t.name] = t }
115
117
  end
116
118
  end
@@ -1,3 +1,3 @@
1
1
  module GoaModelGen
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
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.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-14 00:00:00.000000000 Z
11
+ date: 2019-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor