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 CHANGED
@@ -9,4 +9,5 @@ pkg/*
9
9
  !.gitkeep
10
10
  /spec/dummy/log/test.log
11
11
  .rvmrc
12
- spec/dummy/db/test.sqlite3
12
+ spec/dummy/db/test.sqlite3
13
+ rdoc
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ rescue LoadError
8
8
  end
9
9
 
10
10
  require 'rake'
11
- require 'rake/rdoctask'
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
- Rake::RDocTask.new(:rdoc) do |rdoc|
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.rdoc')
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[:warning] = csv_magic_t(:please_upload_a_csv_file)
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[:warning] = csv_magic_t(:csv_file_has_wrong_format) % {:error => e.message}
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[:warning] = csv_magic_t(:file_not_on_server_any_more)
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[:warning] = e.message
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
 
@@ -1,3 +1,3 @@
1
1
  module CSVMagic
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
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.2
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-09-07 00:00:00.000000000 Z
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: -3430066953355410162
158
+ hash: -3035827837681512313
159
159
  requirements: []
160
160
  rubyforge_project: csv_magic
161
161
  rubygems_version: 1.8.24