labimotion 1.0.0 → 1.0.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
  SHA256:
3
- metadata.gz: 387a4b4a47a140008970b10f005472e8ba882c80ddaab99863ced5acdb0dfa29
4
- data.tar.gz: 90f5839a92d045e45861a2354354bf5ef1542799a484cda94fa9c1263c206d5e
3
+ metadata.gz: 83f0da3d6432a0ba7540d64776e8842517388dd310034ba47fa4009a0098aae1
4
+ data.tar.gz: ebdb71841e25f430469989361183eed16bfba8d45574c1e1fbac3094d397a484
5
5
  SHA512:
6
- metadata.gz: cca4c43074754aefbe3f2b3ca09b55af69d25ebf2a4b7f456990bc692ee7ab19905020aed4505d6360b720d94e497e91ab5910b8c50d4b5b914a01d23e840796
7
- data.tar.gz: 5280180e034e2bd2a38000b62e8001ebee247cae2dd29e30f5b66eb3292d11e0e9f0566986c5eb918e6f6dcfc9d95024553204d834da44e7a1aee2b13500d454
6
+ metadata.gz: d9f45db60f7d2d7c199658dbcda29b2b00b62184d16bbbb60a7318c4e04d52cd13fdf64f8944ac90851c5e584b7a8fe7c1469a019d09f0ae7a4e7b3240294167
7
+ data.tar.gz: aeffedf19b1e83fbf15a6cecb634075a496e8f1700c5bed20c7624ccc9a05c8b58836e889e50ec5a1a609e13153bf88b7042f59ac24aaea00acffd6f218a4f54
@@ -193,7 +193,7 @@ module Labimotion
193
193
  (files || []).each_with_index do |file, index|
194
194
  next unless (tempfile = file[:tempfile])
195
195
 
196
- a = Attachment.new(
196
+ att = Attachment.new(
197
197
  bucket: file[:container_id],
198
198
  filename: file[:filename],
199
199
  con_state: Labimotion::ConState::NONE,
@@ -205,7 +205,7 @@ module Labimotion
205
205
  attachable_type: type,
206
206
  attachable_id: id,
207
207
  )
208
- ActiveRecord::Base.transaction do
208
+ begin
209
209
  att.save!
210
210
  attach_ary.push(att.id)
211
211
  ensure
@@ -214,12 +214,11 @@ module Labimotion
214
214
  end
215
215
  end
216
216
  unless (del_files || []).empty?
217
- Attachment.where('id IN (?) AND attachable_type = (?)', del_files.map!(&:to_i),
218
- type).update_all(attachable_id: nil)
217
+ Attachment.where('id IN (?) AND attachable_type = (?)', del_files.map!(&:to_i), type).update_all(attachable_id: nil)
219
218
  end
220
219
  attach_ary
221
220
  rescue StandardError => e
222
- Labimotion.log_exception(e, current_user)
221
+ Labimotion.log_exception(e)
223
222
  raise e
224
223
  end
225
224
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Labimotion
4
4
  # VERSION = '0.1.4'
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  IS_RAILS5 = false
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labimotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chia-Lin Lin