comma 2.1.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/{.rvmrc.example → .rvmrc} +1 -1
  2. data/Appraisals +2 -2
  3. data/Gemfile.lock +13 -15
  4. data/README.markdown +10 -10
  5. data/comma.gemspec +3 -5
  6. data/gemfiles/active3.0.9.gemfile +8 -0
  7. data/gemfiles/active3.0.9.gemfile.lock +48 -0
  8. data/gemfiles/active3.1.1.gemfile +8 -0
  9. data/gemfiles/active3.1.1.gemfile.lock +50 -0
  10. data/gemfiles/active3.2.1.gemfile +8 -0
  11. data/gemfiles/active3.2.1.gemfile.lock +50 -0
  12. data/gemfiles/{rails2.3.7.gemfile → rails3.0.9.gemfile} +1 -1
  13. data/gemfiles/rails3.0.9.gemfile.lock +99 -0
  14. data/gemfiles/{rails2.3.2.gemfile → rails3.1.1.gemfile} +1 -1
  15. data/gemfiles/rails3.1.1.gemfile.lock +110 -0
  16. data/gemfiles/{rails2.3.15.gemfile → rails3.2.1.gemfile} +1 -1
  17. data/gemfiles/rails3.2.1.gemfile.lock +108 -0
  18. data/lib/comma.rb +12 -29
  19. data/lib/comma/object.rb +1 -1
  20. data/lib/comma/{named_scope.rb → relation.rb} +2 -2
  21. data/lib/comma/version.rb +1 -1
  22. data/spec/comma/ar_spec.rb +1 -8
  23. metadata +32 -79
  24. data/.travis.yml +0 -9
  25. data/gemfiles/active2.3.14.gemfile +0 -8
  26. data/gemfiles/active2.3.14.gemfile.lock +0 -39
  27. data/gemfiles/active2.3.15.gemfile +0 -8
  28. data/gemfiles/active2.3.15.gemfile.lock +0 -39
  29. data/gemfiles/active2.3.2.gemfile +0 -8
  30. data/gemfiles/active2.3.2.gemfile.lock +0 -39
  31. data/gemfiles/active2.3.5.gemfile +0 -8
  32. data/gemfiles/active2.3.5.gemfile.lock +0 -39
  33. data/gemfiles/active2.3.7.gemfile +0 -8
  34. data/gemfiles/active2.3.7.gemfile.lock +0 -39
  35. data/gemfiles/rails2.3.14.gemfile +0 -7
  36. data/gemfiles/rails2.3.14.gemfile.lock +0 -53
  37. data/gemfiles/rails2.3.15.gemfile.lock +0 -53
  38. data/gemfiles/rails2.3.2.gemfile.lock +0 -51
  39. data/gemfiles/rails2.3.5.gemfile +0 -7
  40. data/gemfiles/rails2.3.5.gemfile.lock +0 -53
  41. data/gemfiles/rails2.3.7.gemfile.lock +0 -53
  42. data/lib/comma/association_proxy.rb +0 -6
  43. data/lib/comma/render_as_csv.rb +0 -49
@@ -1,4 +1,4 @@
1
- rvm 1.8.7-p352@comma --create
1
+ rvm 1.9.2-p290@comma --create
2
2
 
3
3
  if ! command -v bundle ; then
4
4
  gem install bundler
data/Appraisals CHANGED
@@ -1,4 +1,4 @@
1
- ['2.3.2', '2.3.5', '2.3.7', '2.3.14', '2.3.15' ].each do |version_number|
1
+ ['3.0.9', '3.1.1', '~>3.2.1' ].each do |version_number|
2
2
  clean_number = version_number.gsub(/[<>~=]*/, '')
3
3
 
4
4
  appraise "rails#{ clean_number }" do
@@ -9,4 +9,4 @@
9
9
  gem "activesupport", version_number
10
10
  gem "activerecord", version_number
11
11
  end
12
- end
12
+ end
data/Gemfile.lock CHANGED
@@ -1,34 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comma (2.1.3)
5
- fastercsv (~> 1.5.4)
4
+ comma (3.0.0)
6
5
 
7
6
  GEM
8
7
  remote: http://rubygems.org/
9
8
  specs:
10
- appraisal (0.4.0)
9
+ appraisal (0.4.1)
11
10
  bundler
12
11
  rake
13
12
  diff-lcs (1.1.3)
14
- fastercsv (1.5.5)
15
- rake (0.8.7)
16
- rspec (2.7.0)
17
- rspec-core (~> 2.7.0)
18
- rspec-expectations (~> 2.7.0)
19
- rspec-mocks (~> 2.7.0)
20
- rspec-core (2.7.1)
21
- rspec-expectations (2.7.0)
13
+ rake (0.9.2)
14
+ rspec (2.8.0)
15
+ rspec-core (~> 2.8.0)
16
+ rspec-expectations (~> 2.8.0)
17
+ rspec-mocks (~> 2.8.0)
18
+ rspec-core (2.8.0)
19
+ rspec-expectations (2.8.0)
22
20
  diff-lcs (~> 1.1.2)
23
- rspec-mocks (2.7.0)
21
+ rspec-mocks (2.8.0)
24
22
  sqlite3 (1.3.5)
25
23
 
26
24
  PLATFORMS
27
25
  ruby
28
26
 
29
27
  DEPENDENCIES
30
- appraisal (>= 0.4.0)
28
+ appraisal (~> 0.4.1)
31
29
  comma!
32
- rake (= 0.8.7)
33
- rspec (~> 2.7.0)
30
+ rake (= 0.9.2)
31
+ rspec (~> 2.8.0)
34
32
  sqlite3 (~> 1.3.4)
data/README.markdown CHANGED
@@ -3,12 +3,13 @@
3
3
  http://github.com/crafterm/comma
4
4
 
5
5
  ##COMPATIBILITY
6
- This branch of the project builds gems to the 2.x version series, and is compatible and tested with :
7
- - Ruby 1.8.7, 1.9.2
8
- - Rails 2.x
6
+ The mainline of this project builds gems to the 3.x version series, and is compatible and tested with :
7
+ - Ruby 1.9.2
8
+ - Rails 3.x
9
9
 
10
- ##LOOKING FOR RAILS 3?
11
- Rails 3 is supported in the main branch of this project, and versioned in the 3.x version of this gem. (http://github.com/crafterm/comma)
10
+ ##LOOKING FOR RAILS 2? Ruby 1.8.7?
11
+ * Rails 2 is supported in the 'rails2' branch of this project, and versioned in the 2.x version of this gem. (https://github.com/crafterm/comma/tree/rails2).
12
+ * Ruby 1.8.7 has been deprecated in favour of Ruby 1.9+. If you would like to use Ruby 1.8.7 please let me know or use the last compatible version that could be used with Rails 2+3 and Ruby 1.8.7 and Ruby 1.9.2 (Comma version : 0.5.2)
12
13
 
13
14
  ##INSTALLATION
14
15
 
@@ -17,16 +18,15 @@ Comma is distributed as a gem, best installed via Bundler.
17
18
  Include the gem in your Gemfile:
18
19
 
19
20
  ```Ruby
20
- gem "comma", "~> 2.0"
21
+ gem "comma", "~> 3.0"
21
22
  ```
22
23
 
23
24
  Or, if you want to live life on the edge, you can get master from the main comma repository:
24
25
 
25
26
  ```Ruby
26
- gem "comma", :git => "git://github.com/crafterm/comma.git", :branch => 'rails2'
27
+ gem "comma", :git => "git://github.com/crafterm/comma.git"
27
28
  ```
28
29
 
29
-
30
30
  ##DESCRIPTION:
31
31
 
32
32
  Comma is a CSV (i.e. comma separated values) generation extension for Ruby objects, that lets you seamlessly define a CSV output format via a small DSL. Comma works well on pure Ruby objects with attributes, as well as complex ones such as ActiveRecord objects with associations, extensions, etc. It doesn't distinguish between attributes, methods, associations, extensions, etc. - they all are considered equal and invoked identically via the Comma DSL description. Multiple different CSV output descriptions can also be defined.
@@ -300,8 +300,8 @@ To run the test suite across multiple gem file sets, we're using [Appraisal](htt
300
300
  ```Bash
301
301
 
302
302
  bundle install
303
- bundle exec rake appraisal:install
304
- bundle exec rake appraisal spec
303
+ bundle exec rake appraisals:install
304
+ bundle exec rake appraisals spec
305
305
 
306
306
  ```
307
307
 
data/comma.gemspec CHANGED
@@ -18,11 +18,9 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_runtime_dependency(%q<fastercsv>, ["~> 1.5.4"])
22
-
23
- s.add_development_dependency(%q<rake>, ["0.8.7"])
21
+ s.add_development_dependency(%q<rake>, ["0.9.2"])
24
22
  s.add_development_dependency('sqlite3', '~> 1.3.4')
25
- s.add_development_dependency(%q<rspec>, ["~> 2.7.0"])
26
- s.add_development_dependency(%q<appraisal>, [">= 0.4.0"])
23
+ s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
24
+ s.add_development_dependency(%q<appraisal>, ["~> 0.4.1"])
27
25
 
28
26
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "activesupport", "3.0.9"
6
+ gem "activerecord", "3.0.9"
7
+
8
+ gemspec :path=>"../"
@@ -0,0 +1,48 @@
1
+ PATH
2
+ remote: /Users/tom/Development/Projects/comma
3
+ specs:
4
+ comma (3.0.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activemodel (3.0.9)
10
+ activesupport (= 3.0.9)
11
+ builder (~> 2.1.2)
12
+ i18n (~> 0.5.0)
13
+ activerecord (3.0.9)
14
+ activemodel (= 3.0.9)
15
+ activesupport (= 3.0.9)
16
+ arel (~> 2.0.10)
17
+ tzinfo (~> 0.3.23)
18
+ activesupport (3.0.9)
19
+ appraisal (0.4.1)
20
+ bundler
21
+ rake
22
+ arel (2.0.10)
23
+ builder (2.1.2)
24
+ diff-lcs (1.1.3)
25
+ i18n (0.5.0)
26
+ rake (0.9.2)
27
+ rspec (2.8.0)
28
+ rspec-core (~> 2.8.0)
29
+ rspec-expectations (~> 2.8.0)
30
+ rspec-mocks (~> 2.8.0)
31
+ rspec-core (2.8.0)
32
+ rspec-expectations (2.8.0)
33
+ diff-lcs (~> 1.1.2)
34
+ rspec-mocks (2.8.0)
35
+ sqlite3 (1.3.5)
36
+ tzinfo (0.3.31)
37
+
38
+ PLATFORMS
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ activerecord (= 3.0.9)
43
+ activesupport (= 3.0.9)
44
+ appraisal (~> 0.4.1)
45
+ comma!
46
+ rake (= 0.9.2)
47
+ rspec (~> 2.8.0)
48
+ sqlite3 (~> 1.3.4)
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "activesupport", "3.1.1"
6
+ gem "activerecord", "3.1.1"
7
+
8
+ gemspec :path=>"../"
@@ -0,0 +1,50 @@
1
+ PATH
2
+ remote: /Users/tom/Development/Projects/comma
3
+ specs:
4
+ comma (3.0.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activemodel (3.1.1)
10
+ activesupport (= 3.1.1)
11
+ builder (~> 3.0.0)
12
+ i18n (~> 0.6)
13
+ activerecord (3.1.1)
14
+ activemodel (= 3.1.1)
15
+ activesupport (= 3.1.1)
16
+ arel (~> 2.2.1)
17
+ tzinfo (~> 0.3.29)
18
+ activesupport (3.1.1)
19
+ multi_json (~> 1.0)
20
+ appraisal (0.4.1)
21
+ bundler
22
+ rake
23
+ arel (2.2.1)
24
+ builder (3.0.0)
25
+ diff-lcs (1.1.3)
26
+ i18n (0.6.0)
27
+ multi_json (1.1.0)
28
+ rake (0.9.2)
29
+ rspec (2.8.0)
30
+ rspec-core (~> 2.8.0)
31
+ rspec-expectations (~> 2.8.0)
32
+ rspec-mocks (~> 2.8.0)
33
+ rspec-core (2.8.0)
34
+ rspec-expectations (2.8.0)
35
+ diff-lcs (~> 1.1.2)
36
+ rspec-mocks (2.8.0)
37
+ sqlite3 (1.3.5)
38
+ tzinfo (0.3.31)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ activerecord (= 3.1.1)
45
+ activesupport (= 3.1.1)
46
+ appraisal (~> 0.4.1)
47
+ comma!
48
+ rake (= 0.9.2)
49
+ rspec (~> 2.8.0)
50
+ sqlite3 (~> 1.3.4)
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "activesupport", "~>3.2.1"
6
+ gem "activerecord", "~>3.2.1"
7
+
8
+ gemspec :path=>"../"
@@ -0,0 +1,50 @@
1
+ PATH
2
+ remote: /Users/tom/Development/Projects/comma
3
+ specs:
4
+ comma (3.0.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activemodel (3.2.1)
10
+ activesupport (= 3.2.1)
11
+ builder (~> 3.0.0)
12
+ activerecord (3.2.1)
13
+ activemodel (= 3.2.1)
14
+ activesupport (= 3.2.1)
15
+ arel (~> 3.0.0)
16
+ tzinfo (~> 0.3.29)
17
+ activesupport (3.2.1)
18
+ i18n (~> 0.6)
19
+ multi_json (~> 1.0)
20
+ appraisal (0.4.1)
21
+ bundler
22
+ rake
23
+ arel (3.0.0)
24
+ builder (3.0.0)
25
+ diff-lcs (1.1.3)
26
+ i18n (0.6.0)
27
+ multi_json (1.1.0)
28
+ rake (0.9.2)
29
+ rspec (2.8.0)
30
+ rspec-core (~> 2.8.0)
31
+ rspec-expectations (~> 2.8.0)
32
+ rspec-mocks (~> 2.8.0)
33
+ rspec-core (2.8.0)
34
+ rspec-expectations (2.8.0)
35
+ diff-lcs (~> 1.1.2)
36
+ rspec-mocks (2.8.0)
37
+ sqlite3 (1.3.5)
38
+ tzinfo (0.3.31)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ activerecord (~> 3.2.1)
45
+ activesupport (~> 3.2.1)
46
+ appraisal (~> 0.4.1)
47
+ comma!
48
+ rake (= 0.9.2)
49
+ rspec (~> 2.8.0)
50
+ sqlite3 (~> 1.3.4)
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "2.3.7"
5
+ gem "rails", "3.0.9"
6
6
 
7
7
  gemspec :path=>"../"
@@ -0,0 +1,99 @@
1
+ PATH
2
+ remote: /Users/tom/Development/Projects/comma
3
+ specs:
4
+ comma (3.0.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ abstract (1.0.0)
10
+ actionmailer (3.0.9)
11
+ actionpack (= 3.0.9)
12
+ mail (~> 2.2.19)
13
+ actionpack (3.0.9)
14
+ activemodel (= 3.0.9)
15
+ activesupport (= 3.0.9)
16
+ builder (~> 2.1.2)
17
+ erubis (~> 2.6.6)
18
+ i18n (~> 0.5.0)
19
+ rack (~> 1.2.1)
20
+ rack-mount (~> 0.6.14)
21
+ rack-test (~> 0.5.7)
22
+ tzinfo (~> 0.3.23)
23
+ activemodel (3.0.9)
24
+ activesupport (= 3.0.9)
25
+ builder (~> 2.1.2)
26
+ i18n (~> 0.5.0)
27
+ activerecord (3.0.9)
28
+ activemodel (= 3.0.9)
29
+ activesupport (= 3.0.9)
30
+ arel (~> 2.0.10)
31
+ tzinfo (~> 0.3.23)
32
+ activeresource (3.0.9)
33
+ activemodel (= 3.0.9)
34
+ activesupport (= 3.0.9)
35
+ activesupport (3.0.9)
36
+ appraisal (0.4.1)
37
+ bundler
38
+ rake
39
+ arel (2.0.10)
40
+ builder (2.1.2)
41
+ diff-lcs (1.1.3)
42
+ erubis (2.6.6)
43
+ abstract (>= 1.0.0)
44
+ i18n (0.5.0)
45
+ json (1.6.5)
46
+ mail (2.2.19)
47
+ activesupport (>= 2.3.6)
48
+ i18n (>= 0.4.0)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.17.2)
52
+ polyglot (0.3.3)
53
+ rack (1.2.5)
54
+ rack-mount (0.6.14)
55
+ rack (>= 1.0.0)
56
+ rack-test (0.5.7)
57
+ rack (>= 1.0)
58
+ rails (3.0.9)
59
+ actionmailer (= 3.0.9)
60
+ actionpack (= 3.0.9)
61
+ activerecord (= 3.0.9)
62
+ activeresource (= 3.0.9)
63
+ activesupport (= 3.0.9)
64
+ bundler (~> 1.0)
65
+ railties (= 3.0.9)
66
+ railties (3.0.9)
67
+ actionpack (= 3.0.9)
68
+ activesupport (= 3.0.9)
69
+ rake (>= 0.8.7)
70
+ rdoc (~> 3.4)
71
+ thor (~> 0.14.4)
72
+ rake (0.9.2)
73
+ rdoc (3.12)
74
+ json (~> 1.4)
75
+ rspec (2.8.0)
76
+ rspec-core (~> 2.8.0)
77
+ rspec-expectations (~> 2.8.0)
78
+ rspec-mocks (~> 2.8.0)
79
+ rspec-core (2.8.0)
80
+ rspec-expectations (2.8.0)
81
+ diff-lcs (~> 1.1.2)
82
+ rspec-mocks (2.8.0)
83
+ sqlite3 (1.3.5)
84
+ thor (0.14.6)
85
+ treetop (1.4.10)
86
+ polyglot
87
+ polyglot (>= 0.3.1)
88
+ tzinfo (0.3.31)
89
+
90
+ PLATFORMS
91
+ ruby
92
+
93
+ DEPENDENCIES
94
+ appraisal (~> 0.4.1)
95
+ comma!
96
+ rails (= 3.0.9)
97
+ rake (= 0.9.2)
98
+ rspec (~> 2.8.0)
99
+ sqlite3 (~> 1.3.4)
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "2.3.2"
5
+ gem "rails", "3.1.1"
6
6
 
7
7
  gemspec :path=>"../"
@@ -0,0 +1,110 @@
1
+ PATH
2
+ remote: /Users/tom/Development/Projects/comma
3
+ specs:
4
+ comma (3.0.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ actionmailer (3.1.1)
10
+ actionpack (= 3.1.1)
11
+ mail (~> 2.3.0)
12
+ actionpack (3.1.1)
13
+ activemodel (= 3.1.1)
14
+ activesupport (= 3.1.1)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ i18n (~> 0.6)
18
+ rack (~> 1.3.2)
19
+ rack-cache (~> 1.1)
20
+ rack-mount (~> 0.8.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.0.2)
23
+ activemodel (3.1.1)
24
+ activesupport (= 3.1.1)
25
+ builder (~> 3.0.0)
26
+ i18n (~> 0.6)
27
+ activerecord (3.1.1)
28
+ activemodel (= 3.1.1)
29
+ activesupport (= 3.1.1)
30
+ arel (~> 2.2.1)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.1.1)
33
+ activemodel (= 3.1.1)
34
+ activesupport (= 3.1.1)
35
+ activesupport (3.1.1)
36
+ multi_json (~> 1.0)
37
+ appraisal (0.4.1)
38
+ bundler
39
+ rake
40
+ arel (2.2.1)
41
+ builder (3.0.0)
42
+ diff-lcs (1.1.3)
43
+ erubis (2.7.0)
44
+ hike (1.2.1)
45
+ i18n (0.6.0)
46
+ json (1.6.5)
47
+ mail (2.3.0)
48
+ i18n (>= 0.4.0)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.17.2)
52
+ multi_json (1.1.0)
53
+ polyglot (0.3.3)
54
+ rack (1.3.6)
55
+ rack-cache (1.1)
56
+ rack (>= 0.4)
57
+ rack-mount (0.8.3)
58
+ rack (>= 1.0.0)
59
+ rack-ssl (1.3.2)
60
+ rack
61
+ rack-test (0.6.1)
62
+ rack (>= 1.0)
63
+ rails (3.1.1)
64
+ actionmailer (= 3.1.1)
65
+ actionpack (= 3.1.1)
66
+ activerecord (= 3.1.1)
67
+ activeresource (= 3.1.1)
68
+ activesupport (= 3.1.1)
69
+ bundler (~> 1.0)
70
+ railties (= 3.1.1)
71
+ railties (3.1.1)
72
+ actionpack (= 3.1.1)
73
+ activesupport (= 3.1.1)
74
+ rack-ssl (~> 1.3.2)
75
+ rake (>= 0.8.7)
76
+ rdoc (~> 3.4)
77
+ thor (~> 0.14.6)
78
+ rake (0.9.2)
79
+ rdoc (3.12)
80
+ json (~> 1.4)
81
+ rspec (2.8.0)
82
+ rspec-core (~> 2.8.0)
83
+ rspec-expectations (~> 2.8.0)
84
+ rspec-mocks (~> 2.8.0)
85
+ rspec-core (2.8.0)
86
+ rspec-expectations (2.8.0)
87
+ diff-lcs (~> 1.1.2)
88
+ rspec-mocks (2.8.0)
89
+ sprockets (2.0.3)
90
+ hike (~> 1.2)
91
+ rack (~> 1.0)
92
+ tilt (~> 1.1, != 1.3.0)
93
+ sqlite3 (1.3.5)
94
+ thor (0.14.6)
95
+ tilt (1.3.3)
96
+ treetop (1.4.10)
97
+ polyglot
98
+ polyglot (>= 0.3.1)
99
+ tzinfo (0.3.31)
100
+
101
+ PLATFORMS
102
+ ruby
103
+
104
+ DEPENDENCIES
105
+ appraisal (~> 0.4.1)
106
+ comma!
107
+ rails (= 3.1.1)
108
+ rake (= 0.9.2)
109
+ rspec (~> 2.8.0)
110
+ sqlite3 (~> 1.3.4)