web-connect 0.1.9 → 0.1.10
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: b297a57d736e3dc2860b710c3fb2d53f9e962841
|
4
|
+
data.tar.gz: 20e06cbe434da29e8cba8171fd7a018f1e3c7f64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 323eb6b99f136b4530bf1804879339a8909b642bf96f06f097231afabcec247c18a2cefe02718a0cc24080d365bf520a5f2d0454dc0a71a4ce64aab0d023d51e
|
7
|
+
data.tar.gz: f054a41d4dc3b02f4a22a8447320c3d111e83274172671c6e0d918c149e479af78ea9ac7f14f478c65c29ec49e59de09dfaaa03154b8b1140cea3d5afe74642d
|
@@ -33,6 +33,14 @@ module Netfira::WebConnect
|
|
33
33
|
[name, ActiveRecord::Base.method(name)]
|
34
34
|
end.to_h
|
35
35
|
|
36
|
+
# Save the original schema migration table
|
37
|
+
migration_table = ActiveRecord::SchemaMigration.all.table
|
38
|
+
original_migration_table = [migration_table.name, migration_table.engine]
|
39
|
+
|
40
|
+
# Sub in our own migration table details
|
41
|
+
migration_table.name = Netfira::WebConnect.schema_migrations_table_name
|
42
|
+
migration_table.engine = Model
|
43
|
+
|
36
44
|
# Add some new methods
|
37
45
|
class << ActiveRecord::Base
|
38
46
|
def connection_pool
|
@@ -49,6 +57,9 @@ module Netfira::WebConnect
|
|
49
57
|
# Run the given block
|
50
58
|
result = yield
|
51
59
|
|
60
|
+
# Restore the original migration table name
|
61
|
+
migration_table.name, migration_table.engine = original_migration_table
|
62
|
+
|
52
63
|
# Restore the original methods
|
53
64
|
originals.each { |name, method| ActiveRecord::Base.define_singleton_method name, method }
|
54
65
|
|
@@ -35,7 +35,7 @@ class Netfira::WebConnect::RackApp
|
|
35
35
|
|
36
36
|
def unrelate_records(origin_ids)
|
37
37
|
records = origin_ids.map{ |k, id| k.find_by_origin_id shop, id }.reject(&:nil?)
|
38
|
-
records[0].
|
38
|
+
records[0].unrelate records[1] if records.size == 2
|
39
39
|
end
|
40
40
|
|
41
41
|
def complete_relation(class_name, relation)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil E. Pearson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|