rails_admin_import 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rails_admin_import/import.rb +5 -5
- metadata +2 -2
@@ -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
|
+
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-
|
12
|
+
date: 2012-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: steph@endpoint.com
|