validate-limits 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ecde4cbd325010441374a00b6f378198f79f9f1
4
- data.tar.gz: 33d892f0e51278258a77d0358c2c2aa9aafa23db
3
+ metadata.gz: fa2a747e4128c8fa5130824a31adbd280e1840d3
4
+ data.tar.gz: a43a864d08623c8898a1f3eddef5dce38dedf03f
5
5
  SHA512:
6
- metadata.gz: b1c4268c406b52f28ecd64ff3bd76665ec972333fb41f6bbb5f5f54e49860624187addef517b9ebdf1c036115ab6f2930ae9a72ac548e05193048fbebca7747f
7
- data.tar.gz: bc21b0334c1c218b3dfc0a9ba73997cc46d5a04dece52120506c71976e26b293919295e78c32169a9b574a55ad4014f865e12bb89d15de4c578d1722a22f68d0
6
+ metadata.gz: e33da224b26b09ab66587a73ab6069e95b484692164cc8e824bb8419a88b734d4d3df70f5a253fceac760bdf1e81274ab05801c8c881dfc2625efb1d89dabb17
7
+ data.tar.gz: bfd8bf74b9a17e4e7d9e289934590de34463ff923c5380bb69f48b96d7040ff16070395342b6add0fa465eecb1e44f467aaa728154d9b0edb8e555af16ac79c3
@@ -32,6 +32,8 @@ module ValidateLimits
32
32
  validates_length_of column.name, maximum: column.limit
33
33
 
34
34
  when :integer
35
+ next if column.name == primary_key
36
+
35
37
  self.attributes_with_limit_validation += [column.name]
36
38
  bits = column.limit * 8
37
39
  min = -(2**(bits-1))
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module ValidateLimits
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validate-limits
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Konoplov