wwood-rarff 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "rdoc", "~> 3.12"
11
+ gem "bundler", "~> 1.0.0"
12
+ gem "jeweler", "~> 1.8.3"
13
+ gem "rcov", ">= 0"
14
+ end
data/Rakefile CHANGED
@@ -1,22 +1,29 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
2
12
  require 'rake'
3
13
 
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "wwood-rarff"
8
- gem.summary = %Q{Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files}
9
- gem.description = %Q{Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify
10
- data sets for data mining and machine learning.}
11
- gem.email = "donttrustben near gmail.com"
12
- gem.homepage = "http://github.com/wwood/rarff"
13
- gem.authors = ["Ben J Woodcroft","Andy Payne"]
14
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- rescue LoadError
18
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "wwood-rarff"
18
+ gem.homepage = "http://github.com/wwood/rarff"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files}
21
+ gem.description = %Q{Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify data sets for data mining and machine learning.}
22
+ gem.email = "gmail.com after donttrustben"
23
+ gem.authors = ["Ben J Woodcroft"]
24
+ # dependencies defined in Gemfile
19
25
  end
26
+ Jeweler::RubygemsDotOrgTasks.new
20
27
 
21
28
  require 'rake/testtask'
22
29
  Rake::TestTask.new(:test) do |test|
@@ -25,29 +32,22 @@ Rake::TestTask.new(:test) do |test|
25
32
  test.verbose = true
26
33
  end
27
34
 
28
- begin
29
- require 'rcov/rcovtask'
30
- Rcov::RcovTask.new do |test|
31
- test.libs << 'test'
32
- test.pattern = 'test/**/test_*.rb'
33
- test.verbose = true
34
- end
35
- rescue LoadError
36
- task :rcov do
37
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
38
- end
35
+ require 'rcov/rcovtask'
36
+ Rcov::RcovTask.new do |test|
37
+ test.libs << 'test'
38
+ test.pattern = 'test/**/test_*.rb'
39
+ test.verbose = true
40
+ test.rcov_opts << '--exclude "gems/*"'
39
41
  end
40
42
 
41
- task :test => :check_dependencies
42
-
43
43
  task :default => :test
44
44
 
45
- require 'rake/rdoctask'
45
+ require 'rdoc/task'
46
46
  Rake::RDocTask.new do |rdoc|
47
47
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
48
 
49
49
  rdoc.rdoc_dir = 'rdoc'
50
- rdoc.title = "blah #{version}"
50
+ rdoc.title = "rarff #{version}"
51
51
  rdoc.rdoc_files.include('README*')
52
52
  rdoc.rdoc_files.include('lib/**/*.rb')
53
53
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -253,7 +253,6 @@ module Rarff
253
253
 
254
254
  def to_arff(sparse=false)
255
255
  RELATION_MARKER + " #{@name}\n" +
256
- # @attributes.map{ |attr| attr.to_arff }.join("\n") +
257
256
  @attributes.join("\n") +
258
257
  "\n" +
259
258
  DATA_MARKER + "\n" +
@@ -265,7 +264,7 @@ module Rarff
265
264
  # quotes or are already quoted.
266
265
  unless col.nil?
267
266
  if @attributes[i].type =~ /^#{ATTRIBUTE_STRING}$/i
268
- if col =~ /\s+/
267
+ if col =~ /[,\s+]/
269
268
  col = "'" + col + "'"
270
269
  end
271
270
  elsif @attributes[i].type =~ /^#{ATTRIBUTE_DATE}/i ## Hack comparison. Ugh.
@@ -17,7 +17,7 @@ class TestArffLib < Test::Unit::TestCase
17
17
  @ATTRIBUTE birthday DATE "yyyy-MM-dd HH:mm:ss"
18
18
  @DATA
19
19
  1.4, 'foo bar', 5, baz, "1900-08-08 12:12:12"
20
- 20.9, ruby, 46, rocks, "2005-10-23 12:12:12"
20
+ 20.9, ruby, 46, 'roc,ks', "2005-10-23 12:12:12"
21
21
  0, ruby, 46, rocks, "2001-02-19 12:12:12"
22
22
  68.1, stuff, 728, 'is cool', "1974-02-10 12:12:12"
23
23
  END_OF_ARFF_FILE
@@ -25,7 +25,7 @@ class TestArffLib < Test::Unit::TestCase
25
25
  arff_file_str.gsub!(/\n$/, '')
26
26
 
27
27
  instances = [ [1.4, 'foo bar', 5, 'baz', "1900-08-08 12:12:12"],
28
- [20.9, 'ruby', 46, 'rocks', "2005-10-23 12:12:12"],
28
+ [20.9, 'ruby', 46, 'roc,ks', "2005-10-23 12:12:12"],
29
29
  [0, 'ruby', 46, 'rocks', "2001-02-19 12:12:12"],
30
30
  [68.1, 'stuff', 728, 'is cool', "1974-02-10 12:12:12"]]
31
31
 
@@ -0,0 +1,61 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "wwood-rarff"
8
+ s.version = "0.2.5"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Ben J Woodcroft"]
12
+ s.date = "2012-02-05"
13
+ s.description = "Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify data sets for data mining and machine learning."
14
+ s.email = "gmail.com after donttrustben"
15
+ s.extra_rdoc_files = [
16
+ "README.txt"
17
+ ]
18
+ s.files = [
19
+ "Gemfile",
20
+ "History.txt",
21
+ "Manifest.txt",
22
+ "README.txt",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "lib/rarff.rb",
26
+ "test/test_arff.arff",
27
+ "test/test_rarff.rb",
28
+ "test/test_sparse_arff.arff",
29
+ "wwood-rarff.gemspec"
30
+ ]
31
+ s.homepage = "http://github.com/wwood/rarff"
32
+ s.licenses = ["MIT"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = "1.8.11"
35
+ s.summary = "Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files"
36
+
37
+ if s.respond_to? :specification_version then
38
+ s.specification_version = 3
39
+
40
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
42
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
43
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
44
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
45
+ s.add_development_dependency(%q<rcov>, [">= 0"])
46
+ else
47
+ s.add_dependency(%q<shoulda>, [">= 0"])
48
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
49
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
50
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
51
+ s.add_dependency(%q<rcov>, [">= 0"])
52
+ end
53
+ else
54
+ s.add_dependency(%q<shoulda>, [">= 0"])
55
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
56
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
57
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
58
+ s.add_dependency(%q<rcov>, [">= 0"])
59
+ end
60
+ end
61
+
metadata CHANGED
@@ -1,32 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wwood-rarff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 5
10
+ version: 0.2.5
5
11
  platform: ruby
6
12
  authors:
7
13
  - Ben J Woodcroft
8
- - Andy Payne
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2009-11-19 00:00:00 +11:00
14
- default_executable:
18
+ date: 2012-02-05 00:00:00 Z
15
19
  dependencies:
16
20
  - !ruby/object:Gem::Dependency
17
- name: thoughtbot-shoulda
21
+ requirement: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ hash: 3
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ version_requirements: *id001
31
+ name: shoulda
32
+ prerelease: false
33
+ type: :development
34
+ - !ruby/object:Gem::Dependency
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ hash: 31
41
+ segments:
42
+ - 3
43
+ - 12
44
+ version: "3.12"
45
+ version_requirements: *id002
46
+ name: rdoc
47
+ prerelease: false
48
+ type: :development
49
+ - !ruby/object:Gem::Dependency
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ hash: 23
56
+ segments:
57
+ - 1
58
+ - 0
59
+ - 0
60
+ version: 1.0.0
61
+ version_requirements: *id003
62
+ name: bundler
63
+ prerelease: false
64
+ type: :development
65
+ - !ruby/object:Gem::Dependency
66
+ requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ~>
70
+ - !ruby/object:Gem::Version
71
+ hash: 49
72
+ segments:
73
+ - 1
74
+ - 8
75
+ - 3
76
+ version: 1.8.3
77
+ version_requirements: *id004
78
+ name: jeweler
79
+ prerelease: false
18
80
  type: :development
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
81
+ - !ruby/object:Gem::Dependency
82
+ requirement: &id005 !ruby/object:Gem::Requirement
83
+ none: false
21
84
  requirements:
22
85
  - - ">="
23
86
  - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
24
90
  version: "0"
25
- version:
26
- description: |-
27
- Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify
28
- data sets for data mining and machine learning.
29
- email: donttrustben near gmail.com
91
+ version_requirements: *id005
92
+ name: rcov
93
+ prerelease: false
94
+ type: :development
95
+ description: Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify data sets for data mining and machine learning.
96
+ email: gmail.com after donttrustben
30
97
  executables: []
31
98
 
32
99
  extensions: []
@@ -34,43 +101,49 @@ extensions: []
34
101
  extra_rdoc_files:
35
102
  - README.txt
36
103
  files:
104
+ - Gemfile
37
105
  - History.txt
38
106
  - Manifest.txt
39
107
  - README.txt
40
108
  - Rakefile
41
109
  - VERSION
42
110
  - lib/rarff.rb
43
- - rarff.gemspec
44
111
  - test/test_arff.arff
45
112
  - test/test_rarff.rb
46
113
  - test/test_sparse_arff.arff
47
- has_rdoc: true
114
+ - wwood-rarff.gemspec
48
115
  homepage: http://github.com/wwood/rarff
49
- licenses: []
50
-
116
+ licenses:
117
+ - MIT
51
118
  post_install_message:
52
- rdoc_options:
53
- - --charset=UTF-8
119
+ rdoc_options: []
120
+
54
121
  require_paths:
55
122
  - lib
56
123
  required_ruby_version: !ruby/object:Gem::Requirement
124
+ none: false
57
125
  requirements:
58
126
  - - ">="
59
127
  - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
60
131
  version: "0"
61
- version:
62
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
+ none: false
63
134
  requirements:
64
135
  - - ">="
65
136
  - !ruby/object:Gem::Version
137
+ hash: 3
138
+ segments:
139
+ - 0
66
140
  version: "0"
67
- version:
68
141
  requirements: []
69
142
 
70
143
  rubyforge_project:
71
- rubygems_version: 1.3.5
144
+ rubygems_version: 1.8.11
72
145
  signing_key:
73
146
  specification_version: 3
74
147
  summary: Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files
75
- test_files:
76
- - test/test_rarff.rb
148
+ test_files: []
149
+
@@ -1,53 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{rarff}
8
- s.version = "0.2.4"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Ben J Woodcroft", "Andy Payne"]
12
- s.date = %q{2009-11-19}
13
- s.description = %q{Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files. ARFF files are used to specify
14
- data sets for data mining and machine learning.}
15
- s.email = %q{donttrustben near gmail.com}
16
- s.extra_rdoc_files = [
17
- "README.txt"
18
- ]
19
- s.files = [
20
- "History.txt",
21
- "Manifest.txt",
22
- "README.txt",
23
- "Rakefile",
24
- "VERSION",
25
- "lib/rarff.rb",
26
- "rarff.gemspec",
27
- "test/test_arff.arff",
28
- "test/test_rarff.rb",
29
- "test/test_sparse_arff.arff"
30
- ]
31
- s.homepage = %q{http://github.com/wwood/rarff}
32
- s.rdoc_options = ["--charset=UTF-8"]
33
- s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.3.5}
35
- s.summary = %q{Rarff is a Ruby library for dealing with Attribute-Relation File Format (ARFF) files}
36
- s.test_files = [
37
- "test/test_rarff.rb"
38
- ]
39
-
40
- if s.respond_to? :specification_version then
41
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
- s.specification_version = 3
43
-
44
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
45
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
46
- else
47
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
48
- end
49
- else
50
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
51
- end
52
- end
53
-