ika 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ika/version.rb +1 -1
- data/lib/ika.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 429195ee410ec2c9415df65d5f844406af9076c0
|
4
|
+
data.tar.gz: f78c21e9a921f3139c8664418f00313a6f6c4e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 596c9921e356fdddb657a281fff86414a6fe61b72b6b6ad147b9c926eff60b778014ca91d9601140cea158ac0f97a6a2da81ef0f03f3575f75f5e185537ff668
|
7
|
+
data.tar.gz: 2bafdcc04ec50997c73346374cc724e48bad480f67d8e0ac2609b781fb7e13ddfae48f04b5a9974eb4519dd3d909aaa10f499df3b94987f6006bc26520a7b6c5
|
data/lib/ika/version.rb
CHANGED
data/lib/ika.rb
CHANGED
@@ -19,7 +19,9 @@ module Ika
|
|
19
19
|
end
|
20
20
|
|
21
21
|
ActiveRecord::Base.transaction do
|
22
|
+
sync = false
|
22
23
|
if options && options[:sync]
|
24
|
+
sync = true
|
23
25
|
destroy_all
|
24
26
|
end
|
25
27
|
objects.each do |object|
|
@@ -44,7 +46,7 @@ module Ika
|
|
44
46
|
md5 = Digest::MD5.file('public' + obj_url)
|
45
47
|
need_update = false if md5 == obj_md5 && record_exists && obj_name == Pathname(exist_object.try(key.to_sym).to_s).basename.to_s
|
46
48
|
end
|
47
|
-
if obj_url && need_update
|
49
|
+
if obj_url && (need_update || sync)
|
48
50
|
object_params[key] = base64_conversion(obj_data, obj_name)
|
49
51
|
elsif obj_url.blank?
|
50
52
|
object_params[('remove_' + key).to_sym] = true
|