declare_schema 1.4.0.colin.4 → 1.4.0.colin.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/declare_schema/model.rb +3 -1
- data/lib/declare_schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 770c10f063190aa951ca0ab0956c1988876e9a60c235e08ac9013d6a2f55dc3d
|
4
|
+
data.tar.gz: e0935d656bc3dd48e21c41edfbfbaf8fa416dee00bac305fcaa8b08a85bc0c02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8e261efe79f5b6fdbb86f1fec4a81445e65baf664d26dd6db2c3e85d2d94c305967a4e0f9f5dcce0106daab83480975034dd20c47a319b9365a60b031ec7d49
|
7
|
+
data.tar.gz: 22da299dd84f766df2668d4a81f86d3398be03cab012ac098fc1d7d1fab10d65e6ecc0b3fec126ff7c4b57ee18df6c5cab0219fc681b146891f98c06131e3f74
|
data/Gemfile.lock
CHANGED
data/lib/declare_schema/model.rb
CHANGED
@@ -16,6 +16,7 @@ module DeclareSchema
|
|
16
16
|
# attr_types holds the type class for any attribute reader (i.e. getter
|
17
17
|
# method) that returns rich-types
|
18
18
|
inheriting_cattr_reader attr_types: HashWithIndifferentAccess.new
|
19
|
+
inheriting_cattr_reader attr_order: []
|
19
20
|
|
20
21
|
# field_specs holds FieldSpec objects for every declared
|
21
22
|
# field. Note that attribute readers are created (by ActiveRecord)
|
@@ -64,7 +65,7 @@ module DeclareSchema
|
|
64
65
|
end
|
65
66
|
|
66
67
|
# tell the migration generator to ignore the named index. Useful for existing indexes, or for indexes
|
67
|
-
# that can't be automatically generated
|
68
|
+
# that can't be automatically generated.
|
68
69
|
def ignore_index(index_name)
|
69
70
|
ignore_indexes << index_name.to_s
|
70
71
|
end
|
@@ -80,6 +81,7 @@ module DeclareSchema
|
|
80
81
|
_add_validations_for_field(name, type, args, options)
|
81
82
|
_add_index_for_field(name, args, options)
|
82
83
|
field_specs[name] = ::DeclareSchema::Model::FieldSpec.new(self, name, type, position: field_specs.size, **options)
|
84
|
+
attr_order << name unless attr_order.include?(name)
|
83
85
|
end
|
84
86
|
|
85
87
|
def index_definitions_with_primary_key
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: declare_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.colin.
|
4
|
+
version: 1.4.0.colin.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca Development adapted from hobo_fields by Tom Locke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|