json-schema-docs 0.2.3 → 0.2.4

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: 37e5c881049cd752a41ed4366f358d5cddaa5fe296644b5d0c1d9bb11f61f9e4
4
- data.tar.gz: eb5d941a22c4ef7be1c7d7dca9b83f43a8e856622cc54fdf453cfd59055df5b9
3
+ metadata.gz: 684cd18461ad682ef182cf8d2c6408c7a1bc2b7bf9ffaafddfbd17e2bb1fb2cc
4
+ data.tar.gz: cc0ec2b04b37b844ad53bab5320a7dcf76253c948ee509885dcc582aca23f2ea
5
5
  SHA512:
6
- metadata.gz: 6375d869ebb4e3200c25a13ac4022494a9a17498cad320424bad96902f2b167374c5f8d476e009535ae39712995c3df852a61a55cfe0988c13f683c447246308
7
- data.tar.gz: ad36b1b34c684cc3cc92e2fd176914bd5e1752ad4f754e5b3fa47ff4291ebf6202e1649c2c054c216c2a9d02ed63fbd2ca39d898f1ea54c100a21ccb3f6ad85f
6
+ metadata.gz: 95abddf165facc04ba809711137759fd201e2f9c1f75b9c49962866d0e2e3047a8a28008fd4c363d3ebdc9df55b79f315df5ba8ebd1824cf385a0eaf8e08b67f
7
+ data.tar.gz: e49c01747fcaea115cda8d4492724213c5e3e6cedebb75335e92639afaf4583b3082175158fbde6d5b63e33f00b6d875f0a49b71d65015dadd280cb733923b5d
@@ -48,7 +48,7 @@ module JsonSchemaDocs
48
48
  opts[:schemata] = schemata
49
49
 
50
50
  contents = layout.result(OpenStruct.new(opts).instance_eval { binding })
51
- write_file(type, resource, contents)
51
+ write_file(type, resource, schemata['title'], contents)
52
52
  end
53
53
  end
54
54
 
@@ -56,7 +56,7 @@ module JsonSchemaDocs
56
56
  landing_page = instance_variable_get("@json_schema_#{name}_landing_page")
57
57
 
58
58
  unless landing_page.nil?
59
- write_file(:landing_page, name.to_s, landing_page, trim: false)
59
+ write_file(:landing_page, name.to_s, nil, landing_page, trim: false)
60
60
  end
61
61
  end
62
62
 
@@ -73,7 +73,7 @@ module JsonSchemaDocs
73
73
 
74
74
  private
75
75
 
76
- def write_file(type, name, contents, trim: true)
76
+ def write_file(type, name, title, contents, trim: true)
77
77
  if type == :landing_page
78
78
  if name == 'index'
79
79
  path = @options[:output_dir]
@@ -89,7 +89,7 @@ module JsonSchemaDocs
89
89
 
90
90
  FileUtils.mkdir_p(path)
91
91
 
92
- meta = { type: type, title: name, name: name }
92
+ meta = { type: type, title: title, name: name }
93
93
  if has_yaml?(contents)
94
94
  # Split data
95
95
  frontmatter, contents = split_into_metadata_and_contents(contents)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module JsonSchemaDocs
3
- VERSION = '0.2.3'.freeze
3
+ VERSION = '0.2.4'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-schema-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prmd