StephanZ-fastercsv 1.4.0

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.
Files changed (12) hide show
  1. data/AUTHORS +1 -0
  2. data/CHANGELOG +145 -0
  3. data/COPYING +340 -0
  4. data/INSTALL +35 -0
  5. data/LICENSE +7 -0
  6. data/README +71 -0
  7. data/Rakefile +95 -0
  8. data/TODO +6 -0
  9. data/setup.rb +1360 -0
  10. data/test/line_endings.gz +0 -0
  11. data/test/ts_all.rb +20 -0
  12. metadata +71 -0
data/Rakefile ADDED
@@ -0,0 +1,95 @@
1
+ require "rake/rdoctask"
2
+ require "rake/testtask"
3
+ require "rake/gempackagetask"
4
+
5
+ require "rubygems"
6
+
7
+ dir = File.dirname(__FILE__)
8
+ lib = File.join(dir, "lib", "faster_csv.rb")
9
+ version = File.read(lib)[/^\s*VERSION\s*=\s*(['"])(\d\.\d\.\d)\1/, 2]
10
+
11
+ task :default => [:test]
12
+
13
+ Rake::TestTask.new do |test|
14
+ test.libs << "test"
15
+ test.test_files = [ "test/ts_all.rb" ]
16
+ test.verbose = true
17
+ end
18
+
19
+ Rake::RDocTask.new do |rdoc|
20
+ rdoc.main = "README"
21
+ rdoc.rdoc_dir = "doc/html"
22
+ rdoc.title = "FasterCSV Documentation"
23
+ rdoc.rdoc_files.include( "README", "INSTALL",
24
+ "TODO", "CHANGELOG",
25
+ "AUTHORS", "COPYING",
26
+ "LICENSE", "lib/" )
27
+ end
28
+
29
+ desc "Upload current documentation to Rubyforge"
30
+ task :upload_docs => [:rdoc] do
31
+ sh "scp -r doc/html/* " +
32
+ "bbazzarrakk@rubyforge.org:/var/www/gforge-projects/fastercsv/"
33
+ end
34
+
35
+ desc "Show library's code statistics"
36
+ task :stats do
37
+ require 'code_statistics'
38
+ CodeStatistics.new( ["FasterCSV", "lib"],
39
+ ["Units", "test"] ).to_s
40
+ end
41
+
42
+ desc "Time FasterCSV and CSV"
43
+ task :benchmark do
44
+ TESTS = 6
45
+ path = "test/test_data.csv"
46
+ sh %Q{time ruby -r csv -e } +
47
+ %Q{'#{TESTS}.times { CSV.foreach("#{path}") { |row| } }'}
48
+ sh %Q{time ruby -r lightcsv -e } +
49
+ %Q{'#{TESTS}.times { LightCsv.foreach("#{path}") { |row| } }'}
50
+ sh %Q{time ruby -r lib/faster_csv -e } +
51
+ %Q{'#{TESTS}.times { FasterCSV.foreach("#{path}") { |row| } }'}
52
+ end
53
+
54
+ spec = Gem::Specification.new do |spec|
55
+ spec.name = "fastercsv"
56
+ spec.version = version
57
+
58
+ spec.platform = Gem::Platform::RUBY
59
+ spec.summary = "FasterCSV is CSV, but faster, smaller, and cleaner."
60
+
61
+ spec.test_suite_file = "test/ts_all.rb"
62
+ spec.files = Dir.glob("{lib,test,examples}/**/*.rb").
63
+ reject { |item| item.include?(".svn") } +
64
+ Dir.glob("{test,examples}/**/*.csv").
65
+ reject { |item| item.include?(".svn") } +
66
+ ["Rakefile", "setup.rb"]
67
+
68
+ spec.has_rdoc = true
69
+ spec.extra_rdoc_files = %w[ AUTHORS COPYING README INSTALL TODO CHANGELOG
70
+ LICENSE ]
71
+ spec.rdoc_options << "--title" << "FasterCSV Documentation" <<
72
+ "--main" << "README"
73
+
74
+ spec.require_path = "lib"
75
+
76
+ spec.author = "James Edward Gray II"
77
+ spec.email = "james@grayproductions.net"
78
+ spec.rubyforge_project = "fastercsv"
79
+ spec.homepage = "http://fastercsv.rubyforge.org"
80
+ spec.description = <<END_DESC
81
+ FasterCSV is intended as a complete replacement to the CSV standard library. It
82
+ is significantly faster and smaller while still being pure Ruby code. It also
83
+ strives for a better interface.
84
+ END_DESC
85
+ end
86
+
87
+ Rake::GemPackageTask.new(spec) do |pkg|
88
+ pkg.need_zip = true
89
+ pkg.need_tar = true
90
+ end
91
+
92
+ desc "Add new files to Subversion"
93
+ task :add_to_svn do
94
+ sh %Q{svn status | ruby -nae 'system "svn add \#{$F[1]}" if $F[0] == "?"' }
95
+ end
data/TODO ADDED
@@ -0,0 +1,6 @@
1
+ = To Do List
2
+
3
+ The following is a list of planned expansions for FasterCSV, in no particular
4
+ order.
5
+
6
+ * Rent this space...