ika 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ika/version.rb +1 -1
  3. data/lib/ika.rb +3 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f4813d400b8c938225f19661f979ae8a4b746b7
4
- data.tar.gz: d3a2aa8a19cfe0dd63a5b42a878dac87d4e10a99
3
+ metadata.gz: 429195ee410ec2c9415df65d5f844406af9076c0
4
+ data.tar.gz: f78c21e9a921f3139c8664418f00313a6f6c4e19
5
5
  SHA512:
6
- metadata.gz: dceaefcab518648dc5a54ca0516a2e32308dc1ab80e81dbfc7b1c3f763a472dc6cf06010544ab7ac870aad23f31ab8292b314c72b42ff345e5d565d3e9152282
7
- data.tar.gz: 3cc60b79cb78c171b83462854ef39273f4fbd81624cf17877a8fa8d496a03456e903b4c1e2952f44abd381702361b19048839f5cf1ceebc7bd36b4ac0da8bdc5
6
+ metadata.gz: 596c9921e356fdddb657a281fff86414a6fe61b72b6b6ad147b9c926eff60b778014ca91d9601140cea158ac0f97a6a2da81ef0f03f3575f75f5e185537ff668
7
+ data.tar.gz: 2bafdcc04ec50997c73346374cc724e48bad480f67d8e0ac2609b781fb7e13ddfae48f04b5a9974eb4519dd3d909aaa10f499df3b94987f6006bc26520a7b6c5
data/lib/ika/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ika
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ika
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makoto NAKAYA