abstract_importer 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/abstract_importer.gemspec +1 -1
- data/lib/abstract_importer/id_map.rb +1 -3
- data/lib/abstract_importer/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13db5e1dffb81295899859bceffe4ff4e61cd396
|
4
|
+
data.tar.gz: 85ce8e0ead69302fd451916c94ec41b94ea8abd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48e5803f18514f2538d3f16d5ab5a7dabb4b609658e5db991b59c645a37f61680f0a56746e6022a49045a7fdf492cd9136b4a2db76fe39d31fcf474874a92b00
|
7
|
+
data.tar.gz: 6faffa2d0d5ad9b3c6fa2f6fd0e20e4dbbd3eb0c8a5c2d45b3796bc659bada94b031c8c6c375de0cd558ce1f0f7e5f8e6d067a3d0aa7051471baf4bcb336895c
|
data/abstract_importer.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "activerecord", ">= 4.0"
|
21
|
-
spec.add_dependency "activerecord-insert_many", "
|
21
|
+
spec.add_dependency "activerecord-insert_many", ">= 0.1.1"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "minitest", "~> 4.7"
|
@@ -17,9 +17,7 @@ module AbstractImporter
|
|
17
17
|
|
18
18
|
def merge!(table_name, query)
|
19
19
|
table_name = table_name.to_sym
|
20
|
-
@id_map[table_name].merge!(
|
21
|
-
.pluck(:id, :legacy_id)
|
22
|
-
.each_with_object({}) { |(id, legacy_id), map| map[legacy_id] = id })
|
20
|
+
@id_map[table_name].merge! Hash[query.pluck(:legacy_id, :id)]
|
23
21
|
end
|
24
22
|
|
25
23
|
def get(table_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstract_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: activerecord-insert_many
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.1.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|