schema-model 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/schema/all.rb +25 -0
  3. data/lib/schema.rb +1 -0
  4. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c800b07a0df6dbd84e521624bd2904115f40db9502cddb565aeebaa03e481a6
4
- data.tar.gz: cb99655704a840ab6c20869f44500782760d6e9c6d731b26d2df03ca9c375ebe
3
+ metadata.gz: 0b86ecbc7194678bb32de0ee683078efd6c313282d18b173eb2f114c01e1c01b
4
+ data.tar.gz: 426d5fc0f310627a60c7e5f6c3215f1df75fc4f51bd220446f079e56d1ffc830
5
5
  SHA512:
6
- metadata.gz: d462e67214f46b03f65bce3e2a9d5e6315ef8bd1da3988de59df55bb1d770ee26fa6178c6b72d77cdca37f95f86a0fa14cd2b53c054c7aa936e1ee4ba6585a1a
7
- data.tar.gz: b6f643ab0b9934b22047821223e3d8f5f8f5f216be3687622f3d3272ef4e65f5d54c51d6bf5559f5f79231b8c1c91b371f06e1bba96ad63182410b8eeb6e2346
6
+ metadata.gz: 3657e878488ded76735242a1637482570622501802546e7bcdafafb330934ee93e12c556fffd5c7e9acb0dc9ce1327f83e657a3e4d02410df6c15d2bef309978
7
+ data.tar.gz: 1810d41aff3936e52e2a25e1239d78f2e0cb5c71f5e8c659b58baddbdc0c4fee242c855fd9bc35f02aa93fc554664559102229b502c048184a53835db6fa614d
data/lib/schema/all.rb ADDED
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'inheritance-helper'
4
+
5
+ module Schema
6
+ # Schema::All includes model, associations, parsers and active model validations
7
+ module All
8
+ def self.included(base)
9
+ base.include ::Schema::Model
10
+
11
+ # associations
12
+ base.schema_include ::Schema::Associations::HasOne
13
+ base.schema_include ::Schema::Associations::HasMany
14
+
15
+ # parsers
16
+ base.schema_include ::Schema::Parsers::American
17
+ base.schema_include ::Schema::Parsers::Array
18
+ base.schema_include ::Schema::Parsers::Hash
19
+ base.schema_include ::Schema::Parsers::Json
20
+
21
+ # active model validations
22
+ base.include ::Schema::ActiveModelValidations
23
+ end
24
+ end
25
+ end
data/lib/schema.rb CHANGED
@@ -5,6 +5,7 @@ autoload :SchemaValidator, 'schema_validator'
5
5
  # Schema is a series of tools for transforming data into models
6
6
  module Schema
7
7
  autoload :ActiveModelValidations, 'schema/active_model_validations'
8
+ autoload :All, 'schema/all'
8
9
  autoload :ArrayHeaders, 'schema/array_headers'
9
10
  autoload :Arrays, 'schema/arrays'
10
11
  autoload :CSVParser, 'schema/csv_parser'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-08 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inheritance-helper
@@ -32,6 +32,7 @@ extra_rdoc_files: []
32
32
  files:
33
33
  - lib/schema.rb
34
34
  - lib/schema/active_model_validations.rb
35
+ - lib/schema/all.rb
35
36
  - lib/schema/array_headers.rb
36
37
  - lib/schema/arrays.rb
37
38
  - lib/schema/associations/base.rb