verse-schema 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop-https---relaxed-ruby-style-rubocop-yml +153 -0
- data/.rubocop.yml +32 -0
- data/Gemfile +23 -0
- data/Gemfile.lock +87 -0
- data/README.md +1591 -0
- data/Rakefile +15 -0
- data/benchmarks/troubleshoot.rb +73 -0
- data/lib/tasks/readme.rake +94 -0
- data/lib/tasks/readme_doc_extractor.rb +158 -0
- data/lib/verse/schema/base.rb +80 -0
- data/lib/verse/schema/coalescer/register.rb +132 -0
- data/lib/verse/schema/coalescer.rb +81 -0
- data/lib/verse/schema/collection.rb +175 -0
- data/lib/verse/schema/dictionary.rb +160 -0
- data/lib/verse/schema/error_builder.rb +43 -0
- data/lib/verse/schema/field/ext.rb +24 -0
- data/lib/verse/schema/field.rb +394 -0
- data/lib/verse/schema/invalid_schema_error.rb +18 -0
- data/lib/verse/schema/optionable.rb +47 -0
- data/lib/verse/schema/post_processor.rb +56 -0
- data/lib/verse/schema/result.rb +30 -0
- data/lib/verse/schema/scalar.rb +154 -0
- data/lib/verse/schema/selector.rb +172 -0
- data/lib/verse/schema/struct.rb +315 -0
- data/lib/verse/schema/version.rb +7 -0
- data/lib/verse/schema.rb +75 -0
- data/sig/verse/schema.rbs +6 -0
- data/templates/README.md.erb +73 -0
- metadata +83 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b980154b603e6ac267ee886cbbbdf68914f98ce3a327ea15d1a1b0fb28d50f25
|
4
|
+
data.tar.gz: 5d8b23b022cc019c28fb9b4c6576bcae32fa33d747b804ea721076f9198df230
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b246be324304a3c3d0b61323fcea9bcfa1abd4dbe496d9fa0915f4a8d421663a44560bdfebc068c0e8f51899a8fba375b2ce51276d20055626b9e9ffa90c8c3b
|
7
|
+
data.tar.gz: 95e3babf47e78975c5e6c044e7544b2ae0bed61dd2b8b589eab4bce2ee9db2fb24cd3fdd72fc2921d07b531fbdeec7cb3bb51665c7a2719a04dd78cded49c616
|
data/.rspec
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.5
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: https://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: https://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: https://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: https://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: https://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: https://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: https://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: https://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: https://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/NumericPredicate:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate
|
71
|
+
|
72
|
+
Style/ParallelAssignment:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
|
75
|
+
|
76
|
+
Style/PercentLiteralDelimiters:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
|
79
|
+
|
80
|
+
Style/PerlBackrefs:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
|
83
|
+
|
84
|
+
Style/Semicolon:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: https://relaxed.ruby.style/#stylesemicolon
|
87
|
+
|
88
|
+
Style/SignalException:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: https://relaxed.ruby.style/#stylesignalexception
|
91
|
+
|
92
|
+
Style/SingleLineBlockParams:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
|
95
|
+
|
96
|
+
Style/SingleLineMethods:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
|
99
|
+
|
100
|
+
Layout/SpaceBeforeBlockBraces:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
103
|
+
|
104
|
+
Layout/SpaceInsideParens:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
|
107
|
+
|
108
|
+
Style/SpecialGlobalVars:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
|
111
|
+
|
112
|
+
Style/StringLiterals:
|
113
|
+
Enabled: false
|
114
|
+
StyleGuide: https://relaxed.ruby.style/#stylestringliterals
|
115
|
+
|
116
|
+
Style/TrailingCommaInArguments:
|
117
|
+
Enabled: false
|
118
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
|
119
|
+
|
120
|
+
Style/TrailingCommaInArrayLiteral:
|
121
|
+
Enabled: false
|
122
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
123
|
+
|
124
|
+
Style/TrailingCommaInHashLiteral:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
|
127
|
+
|
128
|
+
Style/SymbolArray:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: http://relaxed.ruby.style/#stylesymbolarray
|
131
|
+
|
132
|
+
Style/WhileUntilModifier:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
|
135
|
+
|
136
|
+
Style/WordArray:
|
137
|
+
Enabled: false
|
138
|
+
StyleGuide: https://relaxed.ruby.style/#stylewordarray
|
139
|
+
|
140
|
+
Lint/AmbiguousRegexpLiteral:
|
141
|
+
Enabled: false
|
142
|
+
StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
|
143
|
+
|
144
|
+
Lint/AssignmentInCondition:
|
145
|
+
Enabled: false
|
146
|
+
StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
|
147
|
+
|
148
|
+
Layout/LineLength:
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Metrics:
|
152
|
+
Enabled: false
|
153
|
+
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- https://relaxed.ruby.style/rubocop.yml
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
TargetRubyVersion: 3.1
|
6
|
+
|
7
|
+
Style/StringLiterals:
|
8
|
+
Enabled: true
|
9
|
+
EnforcedStyle: double_quotes
|
10
|
+
|
11
|
+
Style/StringLiteralsInInterpolation:
|
12
|
+
Enabled: true
|
13
|
+
EnforcedStyle: double_quotes
|
14
|
+
|
15
|
+
Metrics/BlockLength:
|
16
|
+
Exclude:
|
17
|
+
- 'spec/**/*'
|
18
|
+
|
19
|
+
Metrics/PerceivedComplexity:
|
20
|
+
Max: 12
|
21
|
+
|
22
|
+
Layout/LineLength:
|
23
|
+
Max: 120
|
24
|
+
|
25
|
+
Layout/BlockAlignment:
|
26
|
+
EnforcedStyleAlignWith: start_of_line
|
27
|
+
|
28
|
+
Layout/MultilineMethodCallIndentation:
|
29
|
+
EnforcedStyle: indented
|
30
|
+
|
31
|
+
Layout/ArgumentAlignment:
|
32
|
+
EnforcedStyle: with_fixed_indentation
|
data/Gemfile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in verse-schema.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# Development dependencies
|
9
|
+
group :development do
|
10
|
+
gem "prism", "~> 0.19.0", require: false
|
11
|
+
end
|
12
|
+
|
13
|
+
gem "rake", "~> 13.0"
|
14
|
+
|
15
|
+
gem "bootsnap", "~> 1.16"
|
16
|
+
gem "pry"
|
17
|
+
gem "relaxed-rubocop"
|
18
|
+
gem "rubocop", "~> 1.21"
|
19
|
+
gem "simplecov"
|
20
|
+
|
21
|
+
gem "ruby-prof"
|
22
|
+
|
23
|
+
gem "rspec", "~> 3.0"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
verse-schema (1.0.0)
|
5
|
+
attr_chainable (~> 1.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
attr_chainable (1.0.0)
|
12
|
+
bootsnap (1.18.3)
|
13
|
+
msgpack (~> 1.2)
|
14
|
+
coderay (1.1.3)
|
15
|
+
diff-lcs (1.5.1)
|
16
|
+
docile (1.4.0)
|
17
|
+
json (2.7.1)
|
18
|
+
language_server-protocol (3.17.0.3)
|
19
|
+
method_source (1.0.0)
|
20
|
+
msgpack (1.7.2)
|
21
|
+
parallel (1.24.0)
|
22
|
+
parser (3.3.0.5)
|
23
|
+
ast (~> 2.4.1)
|
24
|
+
racc
|
25
|
+
prism (0.19.0)
|
26
|
+
pry (0.14.2)
|
27
|
+
coderay (~> 1.1)
|
28
|
+
method_source (~> 1.0)
|
29
|
+
racc (1.7.3)
|
30
|
+
rainbow (3.1.1)
|
31
|
+
rake (13.1.0)
|
32
|
+
regexp_parser (2.9.0)
|
33
|
+
relaxed-rubocop (2.5)
|
34
|
+
rexml (3.2.6)
|
35
|
+
rspec (3.13.0)
|
36
|
+
rspec-core (~> 3.13.0)
|
37
|
+
rspec-expectations (~> 3.13.0)
|
38
|
+
rspec-mocks (~> 3.13.0)
|
39
|
+
rspec-core (3.13.0)
|
40
|
+
rspec-support (~> 3.13.0)
|
41
|
+
rspec-expectations (3.13.0)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.13.0)
|
44
|
+
rspec-mocks (3.13.0)
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
+
rspec-support (~> 3.13.0)
|
47
|
+
rspec-support (3.13.1)
|
48
|
+
rubocop (1.62.1)
|
49
|
+
json (~> 2.3)
|
50
|
+
language_server-protocol (>= 3.17.0)
|
51
|
+
parallel (~> 1.10)
|
52
|
+
parser (>= 3.3.0.2)
|
53
|
+
rainbow (>= 2.2.2, < 4.0)
|
54
|
+
regexp_parser (>= 1.8, < 3.0)
|
55
|
+
rexml (>= 3.2.5, < 4.0)
|
56
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
57
|
+
ruby-progressbar (~> 1.7)
|
58
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
59
|
+
rubocop-ast (1.31.2)
|
60
|
+
parser (>= 3.3.0.4)
|
61
|
+
ruby-prof (1.7.1)
|
62
|
+
ruby-progressbar (1.13.0)
|
63
|
+
simplecov (0.22.0)
|
64
|
+
docile (~> 1.1)
|
65
|
+
simplecov-html (~> 0.11)
|
66
|
+
simplecov_json_formatter (~> 0.1)
|
67
|
+
simplecov-html (0.12.3)
|
68
|
+
simplecov_json_formatter (0.1.4)
|
69
|
+
unicode-display_width (2.5.0)
|
70
|
+
|
71
|
+
PLATFORMS
|
72
|
+
x86_64-linux
|
73
|
+
|
74
|
+
DEPENDENCIES
|
75
|
+
bootsnap (~> 1.16)
|
76
|
+
prism (~> 0.19.0)
|
77
|
+
pry
|
78
|
+
rake (~> 13.0)
|
79
|
+
relaxed-rubocop
|
80
|
+
rspec (~> 3.0)
|
81
|
+
rubocop (~> 1.21)
|
82
|
+
ruby-prof
|
83
|
+
simplecov
|
84
|
+
verse-schema!
|
85
|
+
|
86
|
+
BUNDLED WITH
|
87
|
+
2.4.10
|