schemable 0.1.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -1
- data/Gemfile +5 -5
- data/Gemfile.lock +82 -50
- data/README.md +324 -100
- data/lib/generators/schemable/install_generator.rb +3 -13
- data/lib/generators/schemable/model_generator.rb +1 -16
- data/lib/schemable/attribute_schema_generator.rb +130 -0
- data/lib/schemable/configuration.rb +114 -0
- data/lib/schemable/definition.rb +322 -0
- data/lib/schemable/included_schema_generator.rb +107 -0
- data/lib/schemable/relationship_schema_generator.rb +119 -0
- data/lib/schemable/request_schema_generator.rb +88 -0
- data/lib/schemable/response_schema_generator.rb +124 -0
- data/lib/schemable/schema_modifier.rb +248 -0
- data/lib/schemable/version.rb +1 -1
- data/lib/schemable.rb +60 -937
- data/lib/templates/schemable.rb +76 -0
- data/schemable.gemspec +2 -5
- data/sig/schemable/attribute_schema_generator.rbs +13 -0
- data/sig/schemable/configuration.rbs +21 -0
- data/sig/schemable/definition.rbs +32 -0
- data/sig/schemable/included_schema_generator.rbs +11 -0
- data/sig/schemable/relationship_schema_generator.rbs +11 -0
- data/sig/schemable/request_schema_generator.rbs +10 -0
- data/sig/schemable/response_schema_generator.rbs +13 -0
- data/sig/schemable/schema_modifier.rbs +9 -0
- data/sig/schemable.rbs +4 -1
- metadata +23 -36
- data/lib/templates/common_definitions.rb +0 -13
- data/lib/templates/serializers_helper.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97fad83e9bdcc4e077ed7890e3c35bacb010a70869349f481d52ebe241b16bf3
|
4
|
+
data.tar.gz: 87ac04d61402266a554ca6ce2422a0ba98784ac4477495dcf38a6b5fc76ed8ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1260ee980f234852ee7b941c36574dfb3c06f7327d758ac08e688277c06f441e96de6a9ddda4c1f44ba7d596aee07443cbf97e5053db28c072999daf2b90e29c
|
7
|
+
data.tar.gz: 78dc9c6902ecfce157bd97aefbf042b82d06837c809a3a61961122dbcc1444f7b9e69573254ea83b676645bab16940a031aee3ff56e6564c1b92316cf1f1f72b
|
data/.rubocop.yml
CHANGED
@@ -128,4 +128,8 @@ Layout/EmptyLinesAroundClassBody: # Disables empty lines around class body warni
|
|
128
128
|
Layout/HeredocIndentation: # Disables heredoc indentation warning
|
129
129
|
Enabled: false
|
130
130
|
Layout/ClosingHeredocIndentation: # Disables closing heredoc indentation warning
|
131
|
-
Enabled: false
|
131
|
+
Enabled: false
|
132
|
+
Rails/Output: # Disables rails output warning
|
133
|
+
Enabled: false
|
134
|
+
Metrics/ClassLength: # Disables class length warning
|
135
|
+
Max: 150
|
data/Gemfile
CHANGED
@@ -4,12 +4,12 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
gem 'rake', '~> 13.0
|
8
|
-
gem 'rspec', '~> 3.12'
|
9
|
-
gem 'rubocop', '~> 1.
|
10
|
-
gem 'rubocop-rails', '~> 2.
|
7
|
+
gem 'rake', '~> 13.1.0'
|
8
|
+
gem 'rspec', '~> 3.12.0'
|
9
|
+
gem 'rubocop', '~> 1.57.2'
|
10
|
+
gem 'rubocop-rails', '~> 2.22.1'
|
11
11
|
|
12
12
|
group :development, :test do
|
13
|
-
gem 'factory_bot_rails', '~> 6.2'
|
13
|
+
gem 'factory_bot_rails', '~> 6.2.0'
|
14
14
|
gem 'jsonapi-rails', '~> 0.4.1'
|
15
15
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,44 +1,59 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
schemable (0.
|
5
|
-
factory_bot_rails (~> 6.2.0)
|
6
|
-
jsonapi-rails (~> 0.4.1)
|
4
|
+
schemable (1.0.0)
|
7
5
|
|
8
6
|
GEM
|
9
7
|
remote: https://rubygems.org/
|
10
8
|
specs:
|
11
|
-
actionpack (7.
|
12
|
-
actionview (= 7.
|
13
|
-
activesupport (= 7.
|
14
|
-
|
9
|
+
actionpack (7.1.2)
|
10
|
+
actionview (= 7.1.2)
|
11
|
+
activesupport (= 7.1.2)
|
12
|
+
nokogiri (>= 1.8.5)
|
13
|
+
racc
|
14
|
+
rack (>= 2.2.4)
|
15
|
+
rack-session (>= 1.0.1)
|
15
16
|
rack-test (>= 0.6.3)
|
16
|
-
rails-dom-testing (~> 2.
|
17
|
-
rails-html-sanitizer (~> 1.
|
18
|
-
actionview (7.
|
19
|
-
activesupport (= 7.
|
17
|
+
rails-dom-testing (~> 2.2)
|
18
|
+
rails-html-sanitizer (~> 1.6)
|
19
|
+
actionview (7.1.2)
|
20
|
+
activesupport (= 7.1.2)
|
20
21
|
builder (~> 3.1)
|
21
|
-
erubi (~> 1.
|
22
|
-
rails-dom-testing (~> 2.
|
23
|
-
rails-html-sanitizer (~> 1.
|
24
|
-
activesupport (7.
|
22
|
+
erubi (~> 1.11)
|
23
|
+
rails-dom-testing (~> 2.2)
|
24
|
+
rails-html-sanitizer (~> 1.6)
|
25
|
+
activesupport (7.1.2)
|
26
|
+
base64
|
27
|
+
bigdecimal
|
25
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
29
|
+
connection_pool (>= 2.2.5)
|
30
|
+
drb
|
26
31
|
i18n (>= 1.6, < 2)
|
27
32
|
minitest (>= 5.1)
|
33
|
+
mutex_m
|
28
34
|
tzinfo (~> 2.0)
|
29
35
|
ast (2.4.2)
|
36
|
+
base64 (0.2.0)
|
37
|
+
bigdecimal (3.1.4)
|
30
38
|
builder (3.2.4)
|
31
39
|
concurrent-ruby (1.2.2)
|
40
|
+
connection_pool (2.4.1)
|
32
41
|
crass (1.0.6)
|
33
42
|
diff-lcs (1.5.0)
|
43
|
+
drb (2.2.0)
|
44
|
+
ruby2_keywords
|
34
45
|
erubi (1.12.0)
|
35
46
|
factory_bot (6.2.1)
|
36
47
|
activesupport (>= 5.0.0)
|
37
48
|
factory_bot_rails (6.2.0)
|
38
49
|
factory_bot (~> 6.2.0)
|
39
50
|
railties (>= 5.0.0)
|
40
|
-
i18n (1.
|
51
|
+
i18n (1.14.1)
|
41
52
|
concurrent-ruby (~> 1.0)
|
53
|
+
io-console (0.6.0)
|
54
|
+
irb (1.9.0)
|
55
|
+
rdoc
|
56
|
+
reline (>= 0.3.8)
|
42
57
|
json (2.6.3)
|
43
58
|
jsonapi-deserializable (0.2.0)
|
44
59
|
jsonapi-parser (0.1.1)
|
@@ -52,36 +67,50 @@ GEM
|
|
52
67
|
jsonapi-serializable (0.3.1)
|
53
68
|
jsonapi-renderer (~> 0.2.0)
|
54
69
|
language_server-protocol (3.17.0.3)
|
55
|
-
loofah (2.
|
70
|
+
loofah (2.22.0)
|
56
71
|
crass (~> 1.0.2)
|
57
72
|
nokogiri (>= 1.12.0)
|
58
|
-
|
59
|
-
|
60
|
-
nokogiri (1.
|
73
|
+
minitest (5.20.0)
|
74
|
+
mutex_m (0.2.0)
|
75
|
+
nokogiri (1.15.4-x86_64-linux)
|
61
76
|
racc (~> 1.4)
|
62
77
|
parallel (1.23.0)
|
63
|
-
parser (3.2.2.
|
78
|
+
parser (3.2.2.4)
|
64
79
|
ast (~> 2.4.1)
|
65
80
|
racc
|
66
|
-
|
67
|
-
|
81
|
+
psych (5.1.1.1)
|
82
|
+
stringio
|
83
|
+
racc (1.7.3)
|
84
|
+
rack (3.0.8)
|
85
|
+
rack-session (2.0.0)
|
86
|
+
rack (>= 3.0.0)
|
68
87
|
rack-test (2.1.0)
|
69
88
|
rack (>= 1.3)
|
70
|
-
|
71
|
-
|
89
|
+
rackup (2.1.0)
|
90
|
+
rack (>= 3)
|
91
|
+
webrick (~> 1.8)
|
92
|
+
rails-dom-testing (2.2.0)
|
93
|
+
activesupport (>= 5.0.0)
|
94
|
+
minitest
|
72
95
|
nokogiri (>= 1.6)
|
73
|
-
rails-html-sanitizer (1.
|
74
|
-
loofah (~> 2.
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
96
|
+
rails-html-sanitizer (1.6.0)
|
97
|
+
loofah (~> 2.21)
|
98
|
+
nokogiri (~> 1.14)
|
99
|
+
railties (7.1.2)
|
100
|
+
actionpack (= 7.1.2)
|
101
|
+
activesupport (= 7.1.2)
|
102
|
+
irb
|
103
|
+
rackup (>= 1.0.0)
|
79
104
|
rake (>= 12.2)
|
80
|
-
thor (~> 1.0)
|
81
|
-
zeitwerk (~> 2.
|
105
|
+
thor (~> 1.0, >= 1.2.2)
|
106
|
+
zeitwerk (~> 2.6)
|
82
107
|
rainbow (3.1.1)
|
83
|
-
rake (13.0
|
84
|
-
|
108
|
+
rake (13.1.0)
|
109
|
+
rdoc (6.6.0)
|
110
|
+
psych (>= 4.0.0)
|
111
|
+
regexp_parser (2.8.2)
|
112
|
+
reline (0.4.0)
|
113
|
+
io-console (~> 0.5)
|
85
114
|
rexml (3.2.6)
|
86
115
|
rspec (3.12.0)
|
87
116
|
rspec-core (~> 3.12.0)
|
@@ -92,45 +121,48 @@ GEM
|
|
92
121
|
rspec-expectations (3.12.3)
|
93
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
94
123
|
rspec-support (~> 3.12.0)
|
95
|
-
rspec-mocks (3.12.
|
124
|
+
rspec-mocks (3.12.6)
|
96
125
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
126
|
rspec-support (~> 3.12.0)
|
98
|
-
rspec-support (3.12.
|
99
|
-
rubocop (1.
|
127
|
+
rspec-support (3.12.1)
|
128
|
+
rubocop (1.57.2)
|
100
129
|
json (~> 2.3)
|
101
130
|
language_server-protocol (>= 3.17.0)
|
102
131
|
parallel (~> 1.10)
|
103
|
-
parser (>= 3.2.2.
|
132
|
+
parser (>= 3.2.2.4)
|
104
133
|
rainbow (>= 2.2.2, < 4.0)
|
105
134
|
regexp_parser (>= 1.8, < 3.0)
|
106
135
|
rexml (>= 3.2.5, < 4.0)
|
107
136
|
rubocop-ast (>= 1.28.1, < 2.0)
|
108
137
|
ruby-progressbar (~> 1.7)
|
109
138
|
unicode-display_width (>= 2.4.0, < 3.0)
|
110
|
-
rubocop-ast (1.
|
139
|
+
rubocop-ast (1.30.0)
|
111
140
|
parser (>= 3.2.1.0)
|
112
|
-
rubocop-rails (2.
|
141
|
+
rubocop-rails (2.22.1)
|
113
142
|
activesupport (>= 4.2.0)
|
114
143
|
rack (>= 1.1)
|
115
144
|
rubocop (>= 1.33.0, < 2.0)
|
116
145
|
ruby-progressbar (1.13.0)
|
117
|
-
|
146
|
+
ruby2_keywords (0.0.5)
|
147
|
+
stringio (3.0.9)
|
148
|
+
thor (1.3.0)
|
118
149
|
tzinfo (2.0.6)
|
119
150
|
concurrent-ruby (~> 1.0)
|
120
|
-
unicode-display_width (2.
|
121
|
-
|
151
|
+
unicode-display_width (2.5.0)
|
152
|
+
webrick (1.8.1)
|
153
|
+
zeitwerk (2.6.12)
|
122
154
|
|
123
155
|
PLATFORMS
|
124
156
|
x86_64-linux
|
125
157
|
|
126
158
|
DEPENDENCIES
|
127
|
-
factory_bot_rails (~> 6.2)
|
159
|
+
factory_bot_rails (~> 6.2.0)
|
128
160
|
jsonapi-rails (~> 0.4.1)
|
129
|
-
rake (~> 13.0
|
130
|
-
rspec (~> 3.12)
|
131
|
-
rubocop (~> 1.
|
132
|
-
rubocop-rails (~> 2.
|
161
|
+
rake (~> 13.1.0)
|
162
|
+
rspec (~> 3.12.0)
|
163
|
+
rubocop (~> 1.57.2)
|
164
|
+
rubocop-rails (~> 2.22.1)
|
133
165
|
schemable!
|
134
166
|
|
135
167
|
BUNDLED WITH
|
136
|
-
2.4.
|
168
|
+
2.4.17
|