csv_magic 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/Rakefile +4 -4
- data/lib/csv_magic/controller_actions.rb +6 -6
- data/lib/csv_magic/version.rb +1 -1
- metadata +3 -3
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ rescue LoadError
|
|
8
8
|
end
|
9
9
|
|
10
10
|
require 'rake'
|
11
|
-
require '
|
11
|
+
require 'rdoc/task'
|
12
12
|
|
13
13
|
require 'rspec/core'
|
14
14
|
require 'rspec/core/rake_task'
|
@@ -17,10 +17,10 @@ RSpec::Core::RakeTask.new(:spec)
|
|
17
17
|
|
18
18
|
task :default => :spec
|
19
19
|
|
20
|
-
|
20
|
+
RDoc::Task.new do |rdoc|
|
21
21
|
rdoc.rdoc_dir = 'rdoc'
|
22
22
|
rdoc.title = 'CSVMagicTest'
|
23
23
|
rdoc.options << '--line-numbers' << '--inline-source'
|
24
|
-
rdoc.rdoc_files.include('README.
|
24
|
+
rdoc.rdoc_files.include('README.md')
|
25
25
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
26
|
-
end
|
26
|
+
end
|
@@ -70,18 +70,18 @@ module CSVMagic
|
|
70
70
|
render 'csv_magic/mapper'
|
71
71
|
end
|
72
72
|
rescue MissingFileContentsError
|
73
|
-
flash[:
|
73
|
+
flash[:error] = csv_magic_t(:please_upload_a_csv_file)
|
74
74
|
render_csv_import_form
|
75
75
|
rescue CSV_HANDLER::MalformedCSVError => e
|
76
|
-
flash[:
|
76
|
+
flash[:error] = csv_magic_t(:csv_file_has_wrong_format) % {:error => e.message}
|
77
77
|
render_csv_import_form
|
78
78
|
rescue ::Errno::ENOENT
|
79
|
-
flash[:
|
79
|
+
flash[:error] = csv_magic_t(:file_not_on_server_any_more)
|
80
80
|
render_csv_import_form
|
81
81
|
rescue Exception => e
|
82
|
-
flash[:
|
83
|
-
logger.error(e.message)
|
84
|
-
logger.error(e.backtrace.join("\n"))
|
82
|
+
flash[:error] = "#{e.message[0..100]}..." # Protection from CookieOverflow errors, if large sql queries fail
|
83
|
+
Rails.logger.error(e.message)
|
84
|
+
Rails.logger.error(e.backtrace.join("\n"))
|
85
85
|
render_csv_import_form
|
86
86
|
end
|
87
87
|
|
data/lib/csv_magic/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csv_magic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
segments:
|
157
157
|
- 0
|
158
|
-
hash: -
|
158
|
+
hash: -3035827837681512313
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project: csv_magic
|
161
161
|
rubygems_version: 1.8.24
|