makumba_import 0.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d44f2f77a3193076a178162183d81328683a829d
4
- data.tar.gz: 63f81ea80429f10b77696dcaa2f93e3eea54e911
3
+ metadata.gz: faba01d19123888f6b6970f8b3a3409aeed8d66e
4
+ data.tar.gz: 842e00720dae0b3b30ebb260313fea0b6e1ff6b4
5
5
  SHA512:
6
- metadata.gz: 8bd20e5fe90af0261ae07d1c99fe1581f971496b91bc3397ca9af65a47d5b4e7bc62d362afd3ddbe06ba9ed9102b927a9fd5802548e6bdc4bbe1c1f090bde1cd
7
- data.tar.gz: 8dbc2b67d84326a3f84a3e678dc29298e5b8fb6b2136657a994bf042e7ec7fea4827cdefa31091723a49ce2fc94c5ac82cf0d7d86cda4522a67f39125d92daae
6
+ metadata.gz: bb4040390f5d5e04d2419f79f9383df033694f333782ea7e9fc07a7c3b34df48f99885d4411a260a9434116cf4657b2a904086220ecccfb556ec5269a0cf0813
7
+ data.tar.gz: 7f95897e57b5d5203f8985e12338735cabda5df24bd6b1ec1ec83c91bab5f5f18cd26ba27a0eba160e05305e31e2280e233fcc776bbc377a63aad19b4c408491
@@ -16,8 +16,8 @@ module MakumbaImport
16
16
  @redis = redis
17
17
  end
18
18
 
19
- def self.next_primary_key(model)
20
- @redis.incr "maxprimary_#{model.table_name}_#{@dbsv}"
19
+ def self.next_primary_key(table_name)
20
+ @redis.incr "maxprimary_#{table_name}_#{@dbsv}"
21
21
  end
22
22
 
23
23
  def self.update_redis_keys
@@ -38,7 +38,7 @@ module MakumbaImport
38
38
  redis_key = "maxprimary_#{model.table_name}_#{@dbsv}"
39
39
 
40
40
  @redis.set redis_key, current_max
41
- puts "updated #{model} - #{model.table_name}"
41
+ puts "updated #{model} - #{object.table_name}"
42
42
  rescue => e
43
43
  puts "#{model} - #{e}"
44
44
  end
@@ -62,7 +62,7 @@ class ActiveRecord::Base
62
62
  end
63
63
 
64
64
  def self.next_primary_key
65
- MakumbaImport::KeyHandler.next_primary_key(self.to_s)
65
+ MakumbaImport::KeyHandler.next_primary_key(self.table_name)
66
66
  end
67
67
 
68
68
  def update_makumba_fields
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makumba_import
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marius Andra