global_uid 3.2.0 → 3.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3108ded87e7821a25a8078a56cc0a100a0a04b63
|
4
|
+
data.tar.gz: 75dcfb3c8dbd226df06c498bfe1bdc8886deeab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c20258a1f27e97756888d023bb063b17d283aac9514abe7eb2c3e361c1e5b5dcd701ca722671ed270eae4b10443fd6be64bd5e2d4b759f7b5e707751a9c902f7
|
7
|
+
data.tar.gz: c3ab5dce7e8efb3e5527d8bb6478936a5620e4336a25b794f7eec80ab2a68badea1b534bed6156f43efa352208619d39eebe754699d450f3d2b51ee24f1cb059
|
@@ -61,7 +61,11 @@ module GlobalUid
|
|
61
61
|
def ensure_global_uid_table
|
62
62
|
return @global_uid_table_exists if @global_uid_table_exists
|
63
63
|
GlobalUid::Base.with_connections do |connection|
|
64
|
-
|
64
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
65
|
+
raise "Global UID table #{global_uid_table} not found!" unless connection.schema_cache.data_source_exists?(global_uid_table.to_s)
|
66
|
+
else
|
67
|
+
raise "Global UID table #{global_uid_table} not found!" unless connection.schema_cache.table_exists?(global_uid_table.to_s)
|
68
|
+
end
|
65
69
|
end
|
66
70
|
@global_uid_table_exists = true
|
67
71
|
end
|
@@ -1,13 +1,7 @@
|
|
1
1
|
module GlobalUid
|
2
2
|
module HasAndBelongsToManyBuilderExtension
|
3
|
-
def
|
4
|
-
|
5
|
-
alias_method_chain :through_model, :inherit_global_uid_disabled_from_lhs
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
def through_model_with_inherit_global_uid_disabled_from_lhs
|
10
|
-
model = through_model_without_inherit_global_uid_disabled_from_lhs
|
3
|
+
def through_model
|
4
|
+
model = super
|
11
5
|
model.disable_global_uid if model.left_reflection.klass.global_uid_disabled
|
12
6
|
model
|
13
7
|
end
|
data/lib/global_uid.rb
CHANGED
@@ -19,10 +19,10 @@ if defined?(ActiveRecord::SchemaMigration)
|
|
19
19
|
ActiveRecord::SchemaMigration.disable_global_uid
|
20
20
|
end
|
21
21
|
|
22
|
-
if ActiveRecord::VERSION::
|
23
|
-
ActiveRecord::Associations::Builder::HasAndBelongsToMany.send(:
|
22
|
+
if ActiveRecord::VERSION::STRING >= '4.1.0'
|
23
|
+
ActiveRecord::Associations::Builder::HasAndBelongsToMany.send(:prepend, GlobalUid::HasAndBelongsToManyBuilderExtension)
|
24
24
|
end
|
25
25
|
|
26
|
-
if ActiveRecord::VERSION::MAJOR
|
26
|
+
if ActiveRecord::VERSION::MAJOR >= 4
|
27
27
|
ActiveRecord::SchemaDumper.send(:prepend, GlobalUid::SchemaDumperExtension)
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global_uid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Osheroff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -179,9 +179,9 @@ require_paths:
|
|
179
179
|
- lib
|
180
180
|
required_ruby_version: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- - "
|
182
|
+
- - "~>"
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: '0'
|
184
|
+
version: '2.0'
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
191
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.
|
192
|
+
rubygems_version: 2.5.0
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: GUID
|