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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b48f50b03282da270199e8bb46e4e7a2d69068a8753203364835db206692a94a
4
- data.tar.gz: b72de21ed3123f0b4e9527d5e5ee805742b2c21628adeabd4213925858062914
3
+ metadata.gz: 770c10f063190aa951ca0ab0956c1988876e9a60c235e08ac9013d6a2f55dc3d
4
+ data.tar.gz: e0935d656bc3dd48e21c41edfbfbaf8fa416dee00bac305fcaa8b08a85bc0c02
5
5
  SHA512:
6
- metadata.gz: 24edb7af1a43c955d5bc3664d755ea30d225bf1bce15e98765693ee7de2da87b4d66c42b0c6f6818b5a81b9485536da4ccd824319b91744eee6837c7317d80ca
7
- data.tar.gz: 996169b7db3b3a8426968e8924181a0c588b7035d00a563fb78708eb8e47e2384f20b5838a2bc491ccbef3f45c6e3f462c3e0095261477841cfe666b320acfd2
6
+ metadata.gz: d8e261efe79f5b6fdbb86f1fec4a81445e65baf664d26dd6db2c3e85d2d94c305967a4e0f9f5dcce0106daab83480975034dd20c47a319b9365a60b031ec7d49
7
+ data.tar.gz: 22da299dd84f766df2668d4a81f86d3398be03cab012ac098fc1d7d1fab10d65e6ecc0b3fec126ff7c4b57ee18df6c5cab0219fc681b146891f98c06131e3f74
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (1.4.0.colin.4)
4
+ declare_schema (1.4.0.colin.5)
5
5
  rails (>= 5.0)
6
6
 
7
7
  GEM
@@ -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 (for example: a prefix index in MySQL)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "1.4.0.colin.4"
4
+ VERSION = "1.4.0.colin.5"
5
5
  end
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
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-13 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails