uuid_attribute 0.9.2 → 0.9.3

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
  SHA256:
3
- metadata.gz: '044226208a5f82b69965d3614d69e8498d275ba54a8f74a2df5710bdaee8ed81'
4
- data.tar.gz: b52bbb3dc7f2ba502e6ea59e9524903e0ffde4bddb57aec9f9fa2f1615ddd1bf
3
+ metadata.gz: 774e0a7f8718a8ddebac22f16361b0810ab4b5c8fd3e26673a9c4a33ccdd8457
4
+ data.tar.gz: 706e1a5a27bfb7ea5aac225e7a54d0fad184a03820db52aafb24e05b387d7e85
5
5
  SHA512:
6
- metadata.gz: 6ef05bd5a47da6b30efc5257914b18f7b48796f2f054635f522e83e269f7c3479bc38ebcaed0f929f47d87c489078be3a13a94fd52f14122a652c5cb86e74067
7
- data.tar.gz: 839cfd50e258caf09be260ef060efafd57d27cdcf5a461f044173ddc0f1ced698d34cba136d3b2ec32c1ac6beddadd57f3a006db5f7fe0ab09a0025e0fcd7046
6
+ metadata.gz: 434c3f61c16c9ccc072df2bc579a78dc4135e50b626e325277f22c323a75572d573aae5e310c1f8e2d50d2782fe1fbc84cd8d0d036be4f534f4e31c0fdc95e5d
7
+ data.tar.gz: 7fbd5c029acfeeb56ca7f87b5456d8b75d9a05142aaf8c7c43ff8a2f31498e0b39ad02830802a38e12f2d9f2d55d425c92648f19cacc8bf351f6f5fedd151a57
@@ -58,16 +58,16 @@ module UuidAttribute
58
58
  end
59
59
 
60
60
  config.after_initialize do
61
- return if ARGV.include? "assets:precompile"
61
+ unless ARGV.include? "assets:precompile"
62
+ ActiveRecord::Type.register(:uuid, ::UuidAttribute::UUID)
62
63
 
63
- ActiveRecord::Type.register(:uuid, ::UuidAttribute::UUID)
64
+ configure_binary_ids if UuidAttribute.auto_detect_binary_ids
64
65
 
65
- configure_binary_ids if UuidAttribute.auto_detect_binary_ids
66
-
67
- if UuidAttribute.default_primary_id
68
- # Configure UUID as Default Primary Key
69
- Rails&.application&.config&.generators do |g|
70
- g.orm :active_record, primary_key_type: "binary, limit: 16"
66
+ if UuidAttribute.default_primary_id
67
+ # Configure UUID as Default Primary Key
68
+ Rails&.application&.config&.generators do |g|
69
+ g.orm :active_record, primary_key_type: "binary, limit: 16"
70
+ end
71
71
  end
72
72
  end
73
73
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UuidAttribute
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uuid_attribute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Negri