esquema 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +9 -1
- data/README.md +8 -2
- data/lib/esquema/builder.rb +73 -28
- data/lib/esquema/configuration.rb +2 -1
- data/lib/esquema/keyword_validator.rb +98 -0
- data/lib/esquema/model.rb +4 -0
- data/lib/esquema/property.rb +185 -26
- data/lib/esquema/schema_enhancer.rb +55 -30
- data/lib/esquema/type_caster.rb +16 -4
- data/lib/esquema/version.rb +1 -1
- data/lib/esquema/virtual_column.rb +46 -0
- data/lib/esquema.rb +7 -1
- data/lib/generators/esquema/install/install_generator.rb +1 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activemodel.rbi +89 -0
- data/sorbet/rbi/annotations/activerecord.rbi +92 -0
- data/sorbet/rbi/annotations/activesupport.rbi +421 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activemodel@7.1.3.rbi +8 -0
- data/sorbet/rbi/gems/activerecord@7.1.3.rbi +8 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.rbi +192 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +8 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +8 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1130 -0
- data/sorbet/rbi/gems/drb@2.2.0.rbi +1272 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +8 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1553 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/minitest@5.22.2.rbi +8 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +157 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
- data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10978 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8153 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi +5340 -0
- data/sorbet/rbi/gems/rspec-support@3.13.0.rbi +1629 -0
- data/sorbet/rbi/gems/rspec@3.13.0.rbi +82 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7006 -0
- data/sorbet/rbi/gems/rubocop@1.60.2.rbi +57383 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/sqlite3@1.7.2.rbi +1691 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
- data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
- data/sorbet/rbi/gems/timeout@0.4.1.rbi +142 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
- data/sorbet/rbi/todo.rbi +20 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +72 -10
- data/esquema.gemspec +0 -38
data/sorbet/rbi/todo.rbi
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# DO NOT EDIT MANUALLY
|
2
|
+
# This is an autogenerated file for unresolved constants.
|
3
|
+
# Please instead update this file by running `bin/tapioca todo`.
|
4
|
+
|
5
|
+
# typed: false
|
6
|
+
|
7
|
+
module ::DateAndTime::Calculations; end
|
8
|
+
module ::DateAndTime::Zones; end
|
9
|
+
module ActiveModel::Error; end
|
10
|
+
module ActiveRecord::ConnectionAdapters::DatabaseStatements; end
|
11
|
+
module ActiveRecord::ConnectionAdapters::SchemaStatements; end
|
12
|
+
module ActiveRecord::Tasks::DatabaseTasks; end
|
13
|
+
module ActiveSupport::ArrayInquirer; end
|
14
|
+
module ActiveSupport::Multibyte::Chars; end
|
15
|
+
module ActiveSupport::SafeBuffer; end
|
16
|
+
module ActiveSupport::StringInquirer; end
|
17
|
+
module ActiveSupport::TimeZone; end
|
18
|
+
module Esquema::Generators::Rails::Generators::Base; end
|
19
|
+
module Matchers::UnorderedArrayMatcher::JsonTraverser; end
|
20
|
+
module RSpec::JsonExpectations::Matchers::UnorderedArrayMatcher; end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esquema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Bayona
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '7.
|
19
|
+
version: '7.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '7.
|
26
|
+
version: '7.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry-byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,17 +66,79 @@ files:
|
|
66
66
|
- LICENSE.txt
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
|
-
- esquema.gemspec
|
70
69
|
- lib/esquema.rb
|
71
70
|
- lib/esquema/builder.rb
|
72
71
|
- lib/esquema/configuration.rb
|
72
|
+
- lib/esquema/keyword_validator.rb
|
73
73
|
- lib/esquema/model.rb
|
74
74
|
- lib/esquema/property.rb
|
75
75
|
- lib/esquema/schema_enhancer.rb
|
76
76
|
- lib/esquema/type_caster.rb
|
77
77
|
- lib/esquema/version.rb
|
78
|
+
- lib/esquema/virtual_column.rb
|
78
79
|
- lib/generators/esquema/install/install_generator.rb
|
79
80
|
- lib/generators/esquema/install/templates/esquema_initializer.rb
|
81
|
+
- sorbet/config
|
82
|
+
- sorbet/rbi/annotations/.gitattributes
|
83
|
+
- sorbet/rbi/annotations/activemodel.rbi
|
84
|
+
- sorbet/rbi/annotations/activerecord.rbi
|
85
|
+
- sorbet/rbi/annotations/activesupport.rbi
|
86
|
+
- sorbet/rbi/annotations/rainbow.rbi
|
87
|
+
- sorbet/rbi/gems/.gitattributes
|
88
|
+
- sorbet/rbi/gems/activemodel@7.1.3.rbi
|
89
|
+
- sorbet/rbi/gems/activerecord@7.1.3.rbi
|
90
|
+
- sorbet/rbi/gems/activesupport@7.1.3.rbi
|
91
|
+
- sorbet/rbi/gems/ast@2.4.2.rbi
|
92
|
+
- sorbet/rbi/gems/base64@0.2.0.rbi
|
93
|
+
- sorbet/rbi/gems/bigdecimal@3.1.6.rbi
|
94
|
+
- sorbet/rbi/gems/byebug@11.1.3.rbi
|
95
|
+
- sorbet/rbi/gems/coderay@1.1.3.rbi
|
96
|
+
- sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi
|
97
|
+
- sorbet/rbi/gems/connection_pool@2.4.1.rbi
|
98
|
+
- sorbet/rbi/gems/diff-lcs@1.5.1.rbi
|
99
|
+
- sorbet/rbi/gems/drb@2.2.0.rbi
|
100
|
+
- sorbet/rbi/gems/erubi@1.12.0.rbi
|
101
|
+
- sorbet/rbi/gems/i18n@1.14.1.rbi
|
102
|
+
- sorbet/rbi/gems/json@2.7.1.rbi
|
103
|
+
- sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi
|
104
|
+
- sorbet/rbi/gems/method_source@1.0.0.rbi
|
105
|
+
- sorbet/rbi/gems/minitest@5.22.2.rbi
|
106
|
+
- sorbet/rbi/gems/mutex_m@0.2.0.rbi
|
107
|
+
- sorbet/rbi/gems/netrc@0.11.0.rbi
|
108
|
+
- sorbet/rbi/gems/parallel@1.24.0.rbi
|
109
|
+
- sorbet/rbi/gems/parser@3.3.0.5.rbi
|
110
|
+
- sorbet/rbi/gems/prettier_print@1.2.1.rbi
|
111
|
+
- sorbet/rbi/gems/prism@0.24.0.rbi
|
112
|
+
- sorbet/rbi/gems/pry-byebug@3.10.1.rbi
|
113
|
+
- sorbet/rbi/gems/pry@0.14.2.rbi
|
114
|
+
- sorbet/rbi/gems/racc@1.7.3.rbi
|
115
|
+
- sorbet/rbi/gems/rainbow@3.1.1.rbi
|
116
|
+
- sorbet/rbi/gems/rake@13.1.0.rbi
|
117
|
+
- sorbet/rbi/gems/rbi@0.1.9.rbi
|
118
|
+
- sorbet/rbi/gems/regexp_parser@2.9.0.rbi
|
119
|
+
- sorbet/rbi/gems/rexml@3.2.6.rbi
|
120
|
+
- sorbet/rbi/gems/rspec-core@3.13.0.rbi
|
121
|
+
- sorbet/rbi/gems/rspec-expectations@3.13.0.rbi
|
122
|
+
- sorbet/rbi/gems/rspec-mocks@3.13.0.rbi
|
123
|
+
- sorbet/rbi/gems/rspec-support@3.13.0.rbi
|
124
|
+
- sorbet/rbi/gems/rspec@3.13.0.rbi
|
125
|
+
- sorbet/rbi/gems/rubocop-ast@1.30.0.rbi
|
126
|
+
- sorbet/rbi/gems/rubocop@1.60.2.rbi
|
127
|
+
- sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi
|
128
|
+
- sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi
|
129
|
+
- sorbet/rbi/gems/spoom@1.2.4.rbi
|
130
|
+
- sorbet/rbi/gems/sqlite3@1.7.2.rbi
|
131
|
+
- sorbet/rbi/gems/syntax_tree@6.2.0.rbi
|
132
|
+
- sorbet/rbi/gems/tapioca@0.12.0.rbi
|
133
|
+
- sorbet/rbi/gems/thor@1.3.0.rbi
|
134
|
+
- sorbet/rbi/gems/timeout@0.4.1.rbi
|
135
|
+
- sorbet/rbi/gems/tzinfo@2.0.6.rbi
|
136
|
+
- sorbet/rbi/gems/unicode-display_width@2.5.0.rbi
|
137
|
+
- sorbet/rbi/gems/yard-sorbet@0.8.1.rbi
|
138
|
+
- sorbet/rbi/gems/yard@0.9.34.rbi
|
139
|
+
- sorbet/rbi/todo.rbi
|
140
|
+
- sorbet/tapioca/config.yml
|
141
|
+
- sorbet/tapioca/require.rb
|
80
142
|
homepage: https://github.com/sergiobayona/esquema
|
81
143
|
licenses:
|
82
144
|
- MIT
|
@@ -85,7 +147,7 @@ metadata:
|
|
85
147
|
homepage_uri: https://github.com/sergiobayona/esquema
|
86
148
|
source_code_uri: https://github.com/sergiobayona/esquema
|
87
149
|
changelog_uri: https://github.com/sergiobayona/esquema/blob/main/CHANGELOG.md
|
88
|
-
post_install_message:
|
150
|
+
post_install_message:
|
89
151
|
rdoc_options: []
|
90
152
|
require_paths:
|
91
153
|
- lib
|
@@ -93,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
155
|
requirements:
|
94
156
|
- - ">="
|
95
157
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2
|
158
|
+
version: '3.2'
|
97
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
160
|
requirements:
|
99
161
|
- - ">="
|
@@ -101,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
163
|
version: '0'
|
102
164
|
requirements: []
|
103
165
|
rubygems_version: 3.5.3
|
104
|
-
signing_key:
|
166
|
+
signing_key:
|
105
167
|
specification_version: 4
|
106
168
|
summary: Generate json-schema from ActiveRecord models.
|
107
169
|
test_files: []
|
data/esquema.gemspec
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "lib/esquema/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "esquema"
|
7
|
-
spec.version = Esquema::VERSION
|
8
|
-
spec.authors = ["Sergio Bayona"]
|
9
|
-
spec.email = ["bayona.sergio@gmail.com"]
|
10
|
-
|
11
|
-
spec.summary = "Generate json-schema from ActiveRecord models."
|
12
|
-
spec.description = "Generate json-schema from ActiveRecord models."
|
13
|
-
spec.homepage = "https://github.com/sergiobayona/esquema"
|
14
|
-
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.6.0"
|
16
|
-
|
17
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
18
|
-
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
-
spec.metadata["source_code_uri"] = "https://github.com/sergiobayona/esquema"
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/sergiobayona/esquema/blob/main/CHANGELOG.md"
|
22
|
-
|
23
|
-
# Specify which files should be added to the gem when it is released.
|
24
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
-
spec.files = Dir.chdir(__dir__) do
|
26
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
-
(File.expand_path(f) == __FILE__) ||
|
28
|
-
f.start_with?(*%w[bin/ spec/ .git .github Gemfile])
|
29
|
-
end
|
30
|
-
end
|
31
|
-
spec.bindir = "exe"
|
32
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
33
|
-
spec.require_paths = ["lib"]
|
34
|
-
|
35
|
-
spec.add_dependency "rails", "~> 7.0"
|
36
|
-
spec.add_development_dependency "pry-byebug", ">= 3.10.1"
|
37
|
-
spec.add_development_dependency "rake", "~> 13.1"
|
38
|
-
end
|