comma 4.1.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +26 -7
  3. data/Appraisals +1 -1
  4. data/Gemfile.lock +3 -3
  5. data/README.md +59 -0
  6. data/comma.gemspec +3 -5
  7. data/gemfiles/active4.1.16.gemfile.lock +4 -4
  8. data/gemfiles/active4.2.8.gemfile.lock +3 -3
  9. data/gemfiles/active5.0.1.gemfile.lock +3 -3
  10. data/gemfiles/active5.1.0.gemfile.lock +3 -3
  11. data/gemfiles/active5.2.0.gemfile +10 -0
  12. data/gemfiles/active5.2.0.gemfile.lock +106 -0
  13. data/gemfiles/rails4.1.16.gemfile.lock +16 -17
  14. data/gemfiles/rails4.2.8.gemfile.lock +3 -3
  15. data/gemfiles/rails5.0.1.gemfile.lock +3 -3
  16. data/gemfiles/rails5.1.0.gemfile.lock +3 -3
  17. data/gemfiles/rails5.2.0.gemfile +11 -0
  18. data/gemfiles/rails5.2.0.gemfile.lock +204 -0
  19. data/lib/comma.rb +2 -3
  20. data/lib/comma/data_extractor.rb +2 -4
  21. data/lib/comma/data_mapper_collection.rb +0 -2
  22. data/lib/comma/extractor.rb +0 -2
  23. data/lib/comma/generator.rb +2 -3
  24. data/lib/comma/header_extractor.rb +0 -1
  25. data/lib/comma/object.rb +0 -1
  26. data/lib/comma/version.rb +1 -1
  27. data/spec/comma/data_extractor_spec.rb +0 -1
  28. data/spec/comma/header_extractor_spec.rb +1 -2
  29. data/spec/comma/rails/active_record_spec.rb +0 -1
  30. data/spec/comma/rails/data_mapper_collection_spec.rb +0 -1
  31. data/spec/comma/rails/mongoid_spec.rb +0 -1
  32. data/spec/rails_app/active_record/config.rb +0 -2
  33. data/spec/rails_app/active_record/models.rb +0 -2
  34. data/spec/rails_app/data_mapper/config.rb +0 -2
  35. data/spec/rails_app/mongoid/config.rb +0 -2
  36. data/spec/rails_app/rails_app.rb +1 -2
  37. data/spec/spec_helper.rb +1 -2
  38. metadata +11 -7
  39. data/README.markdown +0 -353
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- comma (4.1.0)
5
- activesupport (>= 4.0.0, < 5.2)
4
+ comma (4.2.0)
5
+ activesupport (>= 4.0.0, < 6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -184,4 +184,4 @@ DEPENDENCIES
184
184
  test-unit
185
185
 
186
186
  BUNDLED WITH
187
- 1.14.6
187
+ 1.16.1
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- comma (4.1.0)
5
- activesupport (>= 4.0.0, < 5.2)
4
+ comma (4.2.0)
5
+ activesupport (>= 4.0.0, < 6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -191,4 +191,4 @@ DEPENDENCIES
191
191
  test-unit
192
192
 
193
193
  BUNDLED WITH
194
- 1.14.6
194
+ 1.16.1
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- comma (4.1.0)
5
- activesupport (>= 4.0.0, < 5.2)
4
+ comma (4.2.0)
5
+ activesupport (>= 4.0.0, < 6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -191,4 +191,4 @@ DEPENDENCIES
191
191
  test-unit
192
192
 
193
193
  BUNDLED WITH
194
- 1.14.6
194
+ 1.16.1
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "coveralls", :require => false
6
+ gem "rubocop", :require => false
7
+ gem "rails", "5.2.0"
8
+ gem "rspec-rails"
9
+ gem "test-unit"
10
+
11
+ gemspec :path => "../"
@@ -0,0 +1,204 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ comma (4.2.0)
5
+ activesupport (>= 4.0.0, < 6)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (5.2.0)
11
+ actionpack (= 5.2.0)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailer (5.2.0)
15
+ actionpack (= 5.2.0)
16
+ actionview (= 5.2.0)
17
+ activejob (= 5.2.0)
18
+ mail (~> 2.5, >= 2.5.4)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.2.0)
21
+ actionview (= 5.2.0)
22
+ activesupport (= 5.2.0)
23
+ rack (~> 2.0)
24
+ rack-test (>= 0.6.3)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
+ actionview (5.2.0)
28
+ activesupport (= 5.2.0)
29
+ builder (~> 3.1)
30
+ erubi (~> 1.4)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.2.0)
34
+ activesupport (= 5.2.0)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.2.0)
37
+ activesupport (= 5.2.0)
38
+ activerecord (5.2.0)
39
+ activemodel (= 5.2.0)
40
+ activesupport (= 5.2.0)
41
+ arel (>= 9.0)
42
+ activestorage (5.2.0)
43
+ actionpack (= 5.2.0)
44
+ activerecord (= 5.2.0)
45
+ marcel (~> 0.3.1)
46
+ activesupport (5.2.0)
47
+ concurrent-ruby (~> 1.0, >= 1.0.2)
48
+ i18n (>= 0.7, < 2)
49
+ minitest (~> 5.1)
50
+ tzinfo (~> 1.1)
51
+ appraisal (1.0.3)
52
+ bundler
53
+ rake
54
+ thor (>= 0.14.0)
55
+ arel (9.0.0)
56
+ ast (2.4.0)
57
+ builder (3.2.3)
58
+ concurrent-ruby (1.0.5)
59
+ coveralls (0.8.21)
60
+ json (>= 1.8, < 3)
61
+ simplecov (~> 0.14.1)
62
+ term-ansicolor (~> 1.3)
63
+ thor (~> 0.19.4)
64
+ tins (~> 1.6)
65
+ crass (1.0.3)
66
+ diff-lcs (1.3)
67
+ docile (1.1.5)
68
+ erubi (1.7.1)
69
+ globalid (0.4.1)
70
+ activesupport (>= 4.2.0)
71
+ i18n (1.0.0)
72
+ concurrent-ruby (~> 1.0)
73
+ json (2.1.0)
74
+ loofah (2.2.2)
75
+ crass (~> 1.0.2)
76
+ nokogiri (>= 1.5.9)
77
+ mail (2.7.0)
78
+ mini_mime (>= 0.1.1)
79
+ marcel (0.3.2)
80
+ mimemagic (~> 0.3.2)
81
+ method_source (0.9.0)
82
+ mimemagic (0.3.2)
83
+ mini_mime (1.0.0)
84
+ mini_portile2 (2.3.0)
85
+ minitest (5.11.3)
86
+ nio4r (2.3.0)
87
+ nokogiri (1.8.2)
88
+ mini_portile2 (~> 2.3.0)
89
+ parallel (1.12.1)
90
+ parser (2.5.0.5)
91
+ ast (~> 2.4.0)
92
+ power_assert (1.1.1)
93
+ powerpack (0.1.1)
94
+ rack (2.0.4)
95
+ rack-test (1.0.0)
96
+ rack (>= 1.0, < 3)
97
+ rails (5.2.0)
98
+ actioncable (= 5.2.0)
99
+ actionmailer (= 5.2.0)
100
+ actionpack (= 5.2.0)
101
+ actionview (= 5.2.0)
102
+ activejob (= 5.2.0)
103
+ activemodel (= 5.2.0)
104
+ activerecord (= 5.2.0)
105
+ activestorage (= 5.2.0)
106
+ activesupport (= 5.2.0)
107
+ bundler (>= 1.3.0)
108
+ railties (= 5.2.0)
109
+ sprockets-rails (>= 2.0.0)
110
+ rails-dom-testing (2.0.3)
111
+ activesupport (>= 4.2.0)
112
+ nokogiri (>= 1.6)
113
+ rails-html-sanitizer (1.0.4)
114
+ loofah (~> 2.2, >= 2.2.2)
115
+ railties (5.2.0)
116
+ actionpack (= 5.2.0)
117
+ activesupport (= 5.2.0)
118
+ method_source
119
+ rake (>= 0.8.7)
120
+ thor (>= 0.18.1, < 2.0)
121
+ rainbow (3.0.0)
122
+ rake (10.5.0)
123
+ rspec (3.5.0)
124
+ rspec-core (~> 3.5.0)
125
+ rspec-expectations (~> 3.5.0)
126
+ rspec-mocks (~> 3.5.0)
127
+ rspec-activemodel-mocks (1.0.3)
128
+ activemodel (>= 3.0)
129
+ activesupport (>= 3.0)
130
+ rspec-mocks (>= 2.99, < 4.0)
131
+ rspec-core (3.5.4)
132
+ rspec-support (~> 3.5.0)
133
+ rspec-expectations (3.5.0)
134
+ diff-lcs (>= 1.2.0, < 2.0)
135
+ rspec-support (~> 3.5.0)
136
+ rspec-its (1.2.0)
137
+ rspec-core (>= 3.0.0)
138
+ rspec-expectations (>= 3.0.0)
139
+ rspec-mocks (3.5.0)
140
+ diff-lcs (>= 1.2.0, < 2.0)
141
+ rspec-support (~> 3.5.0)
142
+ rspec-rails (3.5.2)
143
+ actionpack (>= 3.0)
144
+ activesupport (>= 3.0)
145
+ railties (>= 3.0)
146
+ rspec-core (~> 3.5.0)
147
+ rspec-expectations (~> 3.5.0)
148
+ rspec-mocks (~> 3.5.0)
149
+ rspec-support (~> 3.5.0)
150
+ rspec-support (3.5.0)
151
+ rubocop (0.54.0)
152
+ parallel (~> 1.10)
153
+ parser (>= 2.5)
154
+ powerpack (~> 0.1)
155
+ rainbow (>= 2.2.2, < 4.0)
156
+ ruby-progressbar (~> 1.7)
157
+ unicode-display_width (~> 1.0, >= 1.0.1)
158
+ ruby-progressbar (1.9.0)
159
+ simplecov (0.14.1)
160
+ docile (~> 1.1.0)
161
+ json (>= 1.8, < 3)
162
+ simplecov-html (~> 0.10.0)
163
+ simplecov-html (0.10.2)
164
+ sprockets (3.7.1)
165
+ concurrent-ruby (~> 1.0)
166
+ rack (> 1, < 3)
167
+ sprockets-rails (3.2.1)
168
+ actionpack (>= 4.0)
169
+ activesupport (>= 4.0)
170
+ sprockets (>= 3.0.0)
171
+ sqlite3 (1.3.13)
172
+ term-ansicolor (1.6.0)
173
+ tins (~> 1.0)
174
+ test-unit (3.2.7)
175
+ power_assert
176
+ thor (0.19.4)
177
+ thread_safe (0.3.6)
178
+ tins (1.16.3)
179
+ tzinfo (1.2.5)
180
+ thread_safe (~> 0.1)
181
+ unicode-display_width (1.3.0)
182
+ websocket-driver (0.7.0)
183
+ websocket-extensions (>= 0.1.0)
184
+ websocket-extensions (0.1.3)
185
+
186
+ PLATFORMS
187
+ ruby
188
+
189
+ DEPENDENCIES
190
+ appraisal (~> 1.0.0)
191
+ comma!
192
+ coveralls
193
+ rails (= 5.2.0)
194
+ rake (~> 10.5.0)
195
+ rspec (~> 3.5.0)
196
+ rspec-activemodel-mocks
197
+ rspec-its
198
+ rspec-rails
199
+ rubocop
200
+ sqlite3 (~> 1.3.11)
201
+ test-unit
202
+
203
+ BUNDLED WITH
204
+ 1.16.1
@@ -13,9 +13,8 @@ else
13
13
  end
14
14
  end
15
15
 
16
- if defined? Rails and (Rails.version.split('.').map(&:to_i).first < 3)
17
- raise "Error - This Comma version only supports Rails 3.x. Please use a 2.x version of Comma for use with earlier rails versions."
18
- end
16
+ raise "Error - This Comma version only supports Rails 3.x. Please use a 2.x version of Comma for use with earlier rails versions." if
17
+ defined? Rails and (Rails.version.split('.').map(&:to_i).first < 3)
19
18
 
20
19
  module Comma
21
20
  DEFAULT_OPTIONS = {
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'comma/extractor'
3
2
 
4
3
  module Comma
@@ -51,9 +50,8 @@ module Comma
51
50
  end
52
51
 
53
52
  def method_missing(sym, *args, &block)
54
- if args.blank?
55
- @results << ExtractValueFromInstance.new(@instance).extract(sym, &block)
56
- end
53
+ @results << ExtractValueFromInstance.new(@instance).extract(sym, &block) if
54
+ args.blank?
57
55
 
58
56
  args.each do |arg|
59
57
  case arg
@@ -1,5 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  class DataMapper::Collection
4
2
  def to_comma(style = :default)
5
3
  Comma::Generator.new(self, style).run(:each)
@@ -1,5 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  module Comma
4
2
 
5
3
  class Extractor
@@ -26,9 +26,8 @@ module Comma
26
26
 
27
27
  def append_csv(csv, iterator_method)
28
28
  return '' if @instance.empty?
29
- unless @options.has_key?(:write_headers) && !@options[:write_headers]
30
- csv << @instance.first.to_comma_headers(@style)
31
- end
29
+ csv << @instance.first.to_comma_headers(@style) unless
30
+ @options.has_key?(:write_headers) && !@options[:write_headers]
32
31
  @instance.send(iterator_method) do |object|
33
32
  csv << object.to_comma(@style)
34
33
  end
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'comma/extractor'
3
2
  require 'active_support/core_ext/class/attribute'
4
3
  require 'active_support/core_ext/date_time/conversions'
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'comma/data_extractor'
3
2
  require 'comma/header_extractor'
4
3
 
@@ -1,3 +1,3 @@
1
1
  module Comma
2
- VERSION = '4.1.0'
2
+ VERSION = '4.2.0'
3
3
  end
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'spec_helper'
3
2
 
4
3
  # comma do
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'spec_helper'
3
2
 
4
3
  # comma do
@@ -8,7 +7,7 @@ require 'spec_helper'
8
7
  # isbn :number_10 => 'ISBN-10', :number_13 => 'ISBN-13'
9
8
  # end
10
9
 
11
- describe Comma::HeaderExtractor do # rubocop:disable Metcirs/BlockLength
10
+ describe Comma::HeaderExtractor do # rubocop:disable Metrics/BlockLength
12
11
 
13
12
  before do
14
13
  @isbn = Isbn.new('123123123', '321321321')
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'spec_helper'
3
2
 
4
3
  if defined? ActiveRecord
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'spec_helper'
3
2
 
4
3
  if defined? DataMapper
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'spec_helper'
3
2
 
4
3
  if defined? Mongoid
@@ -1,4 +1,2 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  ActiveRecord::Base.configurations = {'test' => {'adapter' => 'sqlite3', 'database' => ':memory:'}}
4
2
  ActiveRecord::Base.establish_connection(:test)
@@ -1,5 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  class Post < ActiveRecord::Base
4
2
  has_one :user
5
3
 
@@ -1,3 +1 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  DataMapper.setup(:default, 'sqlite::memory:')
@@ -1,5 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  Mongoid.configure do |config|
4
2
  config.sessions = {
5
3
  :default => {
@@ -1,11 +1,10 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'action_controller/railtie'
3
2
  require 'action_view/railtie'
4
3
 
5
4
  # orm configs
6
5
  require 'rails_app/active_record/config' if defined?(ActiveRecord)
7
6
 
8
- app = Class.new(Rails::Application)
7
+ app = CommaTestApp = Class.new(Rails::Application)
9
8
  app.config.secret_token = '6f6acf0443f74fd0aa8ff07a7c2fbe0a'
10
9
  app.config.session_store :cookie_store, :key => '_rails_app_session'
11
10
  app.config.active_support.deprecation = :log
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'rubygems'
3
2
  $LOAD_PATH.unshift(File.expand_path(File.join(*%w{.. .. lib}), __FILE__))
4
3
 
@@ -35,4 +34,4 @@ end
35
34
 
36
35
  Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |file| require file }
37
36
 
38
- require File.expand_path('../../spec/non_rails_app/ruby_classes' , __FILE__)
37
+ require File.expand_path('../spec/non_rails_app/ruby_classes' , __dir__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comma
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Crafter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-07 00:00:00.000000000 Z
12
+ date: 2018-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: 4.0.0
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.2'
23
+ version: '6'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: 4.0.0
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.2'
33
+ version: '6'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: appraisal
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +133,7 @@ files:
133
133
  - Gemfile
134
134
  - Gemfile.lock
135
135
  - MIT-LICENSE
136
- - README.markdown
136
+ - README.md
137
137
  - Rakefile
138
138
  - comma.gemspec
139
139
  - gemfiles/active4.0.13.gemfile
@@ -146,6 +146,8 @@ files:
146
146
  - gemfiles/active5.0.1.gemfile.lock
147
147
  - gemfiles/active5.1.0.gemfile
148
148
  - gemfiles/active5.1.0.gemfile.lock
149
+ - gemfiles/active5.2.0.gemfile
150
+ - gemfiles/active5.2.0.gemfile.lock
149
151
  - gemfiles/rails4.0.13.gemfile
150
152
  - gemfiles/rails4.0.13.gemfile.lock
151
153
  - gemfiles/rails4.1.16.gemfile
@@ -156,6 +158,8 @@ files:
156
158
  - gemfiles/rails5.0.1.gemfile.lock
157
159
  - gemfiles/rails5.1.0.gemfile
158
160
  - gemfiles/rails5.1.0.gemfile.lock
161
+ - gemfiles/rails5.2.0.gemfile
162
+ - gemfiles/rails5.2.0.gemfile.lock
159
163
  - init.rb
160
164
  - lib/comma.rb
161
165
  - lib/comma/array.rb
@@ -182,7 +186,7 @@ files:
182
186
  - spec/rails_app/mongoid/config.rb
183
187
  - spec/rails_app/rails_app.rb
184
188
  - spec/spec_helper.rb
185
- homepage: http://github.com/crafterm/comma
189
+ homepage: http://github.com/comma-csv/comma
186
190
  licenses:
187
191
  - MIT
188
192
  metadata: {}
@@ -202,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
206
  version: '0'
203
207
  requirements: []
204
208
  rubyforge_project: comma
205
- rubygems_version: 2.5.2
209
+ rubygems_version: 2.7.6
206
210
  signing_key:
207
211
  specification_version: 4
208
212
  summary: Ruby Comma Seperated Values generation library