schemacop 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/schemacop/v3/context.rb +4 -0
- data/lib/schemacop/v3/node.rb +1 -1
- data/schemacop.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b28a407ae498b94fa8c7897895d052c1bea34ebeee991ab992b4a86aa94f7ab
|
4
|
+
data.tar.gz: 7bd4dbd4f0a51ac591a7ff6189fd98e803597c0487f8a16e43c78774dc75c5e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b40fb214b50815f65f87f978052f0c6bc38018340d00eeeddb68e392dfb44106e0d6ebeb5e908172113dadc57cd0f88bbdf1d230d38cd5dab31382f8d217f34a
|
7
|
+
data.tar.gz: cf87908ded44c22bd53b824e732f7447ade01608104cb55a844879fb7f17b2172b78c13b47adb0f373abbba3a90f75d353cf0f63ec5d74b16128eee780743db6
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.4
|
data/lib/schemacop/v3/context.rb
CHANGED
@@ -2,9 +2,13 @@ module Schemacop
|
|
2
2
|
module V3
|
3
3
|
class Context
|
4
4
|
attr_accessor :schemas
|
5
|
+
attr_accessor :examples_keyword
|
6
|
+
|
7
|
+
DEFAULT_EXAMPLES_KEYWORD = :examples
|
5
8
|
|
6
9
|
def initialize
|
7
10
|
@schemas = {}.with_indifferent_access.freeze
|
11
|
+
@examples_keyword = DEFAULT_EXAMPLES_KEYWORD
|
8
12
|
end
|
9
13
|
|
10
14
|
def schema(name, type = :hash, **options, &block)
|
data/lib/schemacop/v3/node.rb
CHANGED
@@ -170,7 +170,7 @@ module Schemacop
|
|
170
170
|
end
|
171
171
|
|
172
172
|
json[:title] = @title if @title
|
173
|
-
json[
|
173
|
+
json[Schemacop.context.examples_keyword] = @examples if @examples
|
174
174
|
json[:description] = @description if @description
|
175
175
|
json[:default] = @default if @default
|
176
176
|
json[:enum] = @enum.to_a if @enum
|
data/schemacop.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: schemacop 3.0.
|
2
|
+
# stub: schemacop 3.0.4 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "schemacop".freeze
|
6
|
-
s.version = "3.0.
|
6
|
+
s.version = "3.0.4"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schemacop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sitrox
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2021-02-15 00:00:00.000000000 Z
|
@@ -164,8 +164,8 @@ dependencies:
|
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 0.21.2
|
167
|
-
description:
|
168
|
-
email:
|
167
|
+
description:
|
168
|
+
email:
|
169
169
|
executables: []
|
170
170
|
extensions: []
|
171
171
|
extra_rdoc_files: []
|
@@ -277,7 +277,7 @@ homepage: https://github.com/sitrox/schemacop
|
|
277
277
|
licenses:
|
278
278
|
- MIT
|
279
279
|
metadata: {}
|
280
|
-
post_install_message:
|
280
|
+
post_install_message:
|
281
281
|
rdoc_options: []
|
282
282
|
require_paths:
|
283
283
|
- lib
|
@@ -292,8 +292,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
292
|
- !ruby/object:Gem::Version
|
293
293
|
version: '0'
|
294
294
|
requirements: []
|
295
|
-
rubygems_version: 3.
|
296
|
-
signing_key:
|
295
|
+
rubygems_version: 3.1.4
|
296
|
+
signing_key:
|
297
297
|
specification_version: 4
|
298
298
|
summary: Schemacop validates ruby structures consisting of nested hashes and arrays
|
299
299
|
against simple schema definitions.
|