rails_admin_import 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,6 +58,11 @@ module RailsAdminImport
58
58
  return results = { :success => [], :error => ["You must select a file."] }
59
59
  end
60
60
 
61
+ if RailsAdminImport.config.logging
62
+ FileUtils.copy(params[:file].tempfile, "#{Rails.root}/log/import/#{Time.now.strftime("%Y-%m-%d-%H-%M-%S")}-import.csv")
63
+ logger = Logger.new("#{Rails.root}/log/import/import.log")
64
+ end
65
+
61
66
  text = File.read(params[:file].tempfile)
62
67
  clean = text.gsub(/\n$/, '')
63
68
  file_check = CSV.new(clean)
@@ -66,11 +71,6 @@ module RailsAdminImport
66
71
  return results = { :success => [], :error => ["Please limit upload file to #{RailsAdminImport.config.line_item_limit} line items."] }
67
72
  end
68
73
 
69
- if RailsAdminImport.config.logging
70
- FileUtils.copy(params[:file].tempfile, "#{Rails.root}/log/import/#{Time.now.strftime("%Y-%m-%d-%H-%M-%S")}-import.csv")
71
- logger = Logger.new("#{Rails.root}/log/import/import.log")
72
- end
73
-
74
74
  map = {}
75
75
 
76
76
  file = CSV.new(clean)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-15 00:00:00.000000000 Z
12
+ date: 2012-08-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: steph@endpoint.com