tabularasa 0.2.1 → 0.2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +7 -2
- data/Rakefile +25 -12
- data/tabularasa.gemspec +3 -16
- data/test/hash.rb +0 -1
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= tabularasa gem
|
2
2
|
|
3
|
-
This simple gem gives you the ability to convert an array of
|
3
|
+
This simple gem gives you the ability to convert an array of activerecords, hashes, and/or arrays to tabular data.
|
4
4
|
|
5
5
|
|
6
6
|
== Usage
|
@@ -13,6 +13,7 @@ This simple gem gives you the ability to convert an array of activerecord and/or
|
|
13
13
|
|
14
14
|
@users.to_csv
|
15
15
|
@users.to_csv(:only => [:last_name, :role]) # This will also set the order
|
16
|
+
@users.to_csv(:delimiter => ';') # This will set the delimiter between values in a row
|
16
17
|
@users.to_csv(:headers => ["Last Name", "Role"])
|
17
18
|
@users.to_csv(:except => [:last_name, :role])
|
18
19
|
|
@@ -32,9 +33,13 @@ This simple gem gives you the ability to convert an array of activerecord and/or
|
|
32
33
|
end
|
33
34
|
|
34
35
|
|
35
|
-
==
|
36
|
+
== Dependencies
|
36
37
|
|
37
38
|
ruby >= 1.9
|
39
|
+
* activerecord
|
40
|
+
ruby < 1.9
|
41
|
+
* activerecord
|
42
|
+
* fastercsv
|
38
43
|
|
39
44
|
|
40
45
|
== Install
|
data/Rakefile
CHANGED
@@ -1,16 +1,29 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
require 'rubygems'
|
2
|
-
|
3
|
+
begin
|
4
|
+
require 'bundler/setup'
|
5
|
+
rescue LoadError
|
6
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'rake'
|
10
|
+
require 'rake/rdoctask'
|
11
|
+
|
12
|
+
require 'rake/testtask'
|
3
13
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
p.email = "callenrosario@gmail.com"
|
10
|
-
p.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
-
p.runtime_dependencies = ['activerecord']
|
12
|
-
p.runtime_dependencies << 'fastercsv' if RUBY_VERSION < '1.9'
|
13
|
-
p.development_dependencies = []
|
14
|
+
Rake::TestTask.new(:test) do |t|
|
15
|
+
t.libs << 'lib'
|
16
|
+
t.libs << 'test'
|
17
|
+
t.pattern = 'test/**/*_test.rb'
|
18
|
+
t.verbose = false
|
14
19
|
end
|
15
20
|
|
16
|
-
|
21
|
+
task :default => :test
|
22
|
+
|
23
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
24
|
+
rdoc.rdoc_dir = 'rdoc'
|
25
|
+
rdoc.title = 'Test'
|
26
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
27
|
+
rdoc.rdoc_files.include('README.rdoc')
|
28
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
|
+
end
|
data/tabularasa.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{tabularasa}
|
5
|
-
s.version = "0.2.1"
|
5
|
+
s.version = "0.2.2.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Chris Rosario}]
|
@@ -18,19 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.rubygems_version = %q{1.8.6}
|
19
19
|
s.summary = %q{Gives the ability to convert homogeneous activerecord and/or hash objects into csv}
|
20
20
|
s.test_files = [%q{test/test_helper.rb}]
|
21
|
-
|
22
|
-
|
23
|
-
s.specification_version = 3
|
24
|
-
|
25
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
26
|
-
s.add_runtime_dependency(%q<activerecord>, [">= 0"])
|
27
|
-
s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
|
28
|
-
else
|
29
|
-
s.add_dependency(%q<activerecord>, [">= 0"])
|
30
|
-
s.add_dependency(%q<fastercsv>, [">= 0"])
|
31
|
-
end
|
32
|
-
else
|
33
|
-
s.add_dependency(%q<activerecord>, [">= 0"])
|
34
|
-
s.add_dependency(%q<fastercsv>, [">= 0"])
|
35
|
-
end
|
21
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 0"])
|
22
|
+
s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
|
36
23
|
end
|
data/test/hash.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabularasa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 85
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
+
- 2
|
9
10
|
- 1
|
10
|
-
version: 0.2.1
|
11
|
+
version: 0.2.2.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Chris Rosario
|