csv_rb 5.2.3.2 → 6.0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fc2d663ad8f8941787c41ae1cceb9df5a48ea8cacafc49f34fd743faeed0d22
4
- data.tar.gz: 75aea7b8858b71027a6b970018a0981f09eed68a354f0f36b1f91f649d4ac121
3
+ metadata.gz: f86f23f12fd21b0809508d1da0642f20f4c89684bdd8bddd35ecf83dc7aaeb72
4
+ data.tar.gz: ed23c0f5dc0be75206f59a61ba6aa42ce9d75125791d1202d971645eb00442ce
5
5
  SHA512:
6
- metadata.gz: fcc5905549d158c1a59fb8d73ba108dd90c9458161a8d76e59ad2fe2f0bb00355eb8807527c6bcc0555bb87b994d708caed940ff586e89d4891526c98afee709
7
- data.tar.gz: 851652758cf347ed584e591d67c9f4c88848a19b199d73fceaf5c44b133ac38749681771795c7b26233123481b93c844ca01c59d71035fa0154959101f1ace50
6
+ metadata.gz: '06485dddc7b678c90f4bdf61e743fa79e2afb3508670cc0f7b32005837f789c6c0711e2aa7dcba1468040a32469fc2698b1b2ba2405c14599b209d5db93f52b4'
7
+ data.tar.gz: 2a9fc36f21fbb5313c9b982ef7c987daa7d0cbad45f98553be8512e0c66c7105c4a3e41bf90c2d3b280451c6557e04038cdc0698cdd30d8e8d29d1d497e71f26
data/Gemfile CHANGED
@@ -5,9 +5,9 @@ source "http://rubygems.org"
5
5
  # development dependencies will be added by default to the :development group.
6
6
  gemspec
7
7
 
8
- ENV["RAILS_VERSION"] ||= '5.2.3'
9
- gem 'rails', "~> 5.2.3"
10
- gem 'responders', '~> 2.0'
8
+ ENV["RAILS_VERSION"] ||= '6.0.3'
9
+ gem 'rails', '~> 6.0.3', '>= 6.0.3.1'
10
+ gem 'responders', '~> 3.0'
11
11
 
12
12
  # jquery-rails is used by the dummy application
13
13
 
@@ -1,58 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv_rb (5.2.3.1)
5
- actionpack (~> 5.2)
4
+ csv_rb (6.0.2.4)
5
+ actionpack (>= 5.2)
6
6
  csv (>= 3.1.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actioncable (5.2.3)
12
- actionpack (= 5.2.3)
11
+ actioncable (6.0.3.1)
12
+ actionpack (= 6.0.3.1)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailer (5.2.3)
16
- actionpack (= 5.2.3)
17
- actionview (= 5.2.3)
18
- activejob (= 5.2.3)
15
+ actionmailbox (6.0.3.1)
16
+ actionpack (= 6.0.3.1)
17
+ activejob (= 6.0.3.1)
18
+ activerecord (= 6.0.3.1)
19
+ activestorage (= 6.0.3.1)
20
+ activesupport (= 6.0.3.1)
21
+ mail (>= 2.7.1)
22
+ actionmailer (6.0.3.1)
23
+ actionpack (= 6.0.3.1)
24
+ actionview (= 6.0.3.1)
25
+ activejob (= 6.0.3.1)
19
26
  mail (~> 2.5, >= 2.5.4)
20
27
  rails-dom-testing (~> 2.0)
21
- actionpack (5.2.3)
22
- actionview (= 5.2.3)
23
- activesupport (= 5.2.3)
24
- rack (~> 2.0)
28
+ actionpack (6.0.3.1)
29
+ actionview (= 6.0.3.1)
30
+ activesupport (= 6.0.3.1)
31
+ rack (~> 2.0, >= 2.0.8)
25
32
  rack-test (>= 0.6.3)
26
33
  rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.2.3)
29
- activesupport (= 5.2.3)
34
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
+ actiontext (6.0.3.1)
36
+ actionpack (= 6.0.3.1)
37
+ activerecord (= 6.0.3.1)
38
+ activestorage (= 6.0.3.1)
39
+ activesupport (= 6.0.3.1)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (6.0.3.1)
42
+ activesupport (= 6.0.3.1)
30
43
  builder (~> 3.1)
31
44
  erubi (~> 1.4)
32
45
  rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.2.3)
35
- activesupport (= 5.2.3)
46
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
+ activejob (6.0.3.1)
48
+ activesupport (= 6.0.3.1)
36
49
  globalid (>= 0.3.6)
37
- activemodel (5.2.3)
38
- activesupport (= 5.2.3)
39
- activerecord (5.2.3)
40
- activemodel (= 5.2.3)
41
- activesupport (= 5.2.3)
42
- arel (>= 9.0)
43
- activestorage (5.2.3)
44
- actionpack (= 5.2.3)
45
- activerecord (= 5.2.3)
50
+ activemodel (6.0.3.1)
51
+ activesupport (= 6.0.3.1)
52
+ activerecord (6.0.3.1)
53
+ activemodel (= 6.0.3.1)
54
+ activesupport (= 6.0.3.1)
55
+ activestorage (6.0.3.1)
56
+ actionpack (= 6.0.3.1)
57
+ activejob (= 6.0.3.1)
58
+ activerecord (= 6.0.3.1)
46
59
  marcel (~> 0.3.1)
47
- activesupport (5.2.3)
60
+ activesupport (6.0.3.1)
48
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
49
62
  i18n (>= 0.7, < 2)
50
63
  minitest (~> 5.1)
51
64
  tzinfo (~> 1.1)
52
- addressable (2.6.0)
53
- public_suffix (>= 2.0.2, < 4.0)
54
- arel (9.0.0)
55
- builder (3.2.3)
65
+ zeitwerk (~> 2.2, >= 2.2.2)
66
+ addressable (2.7.0)
67
+ public_suffix (>= 2.0.2, < 5.0)
68
+ builder (3.2.4)
56
69
  capybara (2.18.0)
57
70
  addressable
58
71
  mini_mime (>= 0.1.3)
@@ -61,26 +74,26 @@ GEM
61
74
  rack-test (>= 0.5.4)
62
75
  xpath (>= 2.0, < 4.0)
63
76
  coderay (1.1.2)
64
- concurrent-ruby (1.1.5)
77
+ concurrent-ruby (1.1.6)
65
78
  coveralls (0.8.23)
66
79
  json (>= 1.8, < 3)
67
80
  simplecov (~> 0.16.1)
68
81
  term-ansicolor (~> 1.3)
69
82
  thor (>= 0.19.4, < 2.0)
70
83
  tins (~> 1.6)
71
- crass (1.0.4)
72
- csv (3.1.1)
84
+ crass (1.0.6)
85
+ csv (3.1.5)
73
86
  daemons (1.3.1)
74
87
  diff-lcs (1.3)
75
88
  docile (1.3.2)
76
- erubi (1.8.0)
89
+ erubi (1.9.0)
77
90
  eventmachine (1.2.7)
78
- ffi (1.11.1)
91
+ ffi (1.12.2)
79
92
  formatador (0.2.5)
80
93
  globalid (0.4.2)
81
94
  activesupport (>= 4.2.0)
82
95
  growl (1.0.3)
83
- guard (2.15.0)
96
+ guard (2.16.2)
84
97
  formatador (>= 0.2.4)
85
98
  listen (>= 2.7, < 4.0)
86
99
  lumberjack (>= 1.0.12, < 2.0)
@@ -94,35 +107,34 @@ GEM
94
107
  guard (~> 2.1)
95
108
  guard-compat (~> 1.1)
96
109
  rspec (>= 2.99.0, < 4.0)
97
- i18n (1.6.0)
110
+ i18n (1.8.2)
98
111
  concurrent-ruby (~> 1.0)
99
- jquery-rails (4.3.5)
112
+ jquery-rails (4.4.0)
100
113
  rails-dom-testing (>= 1, < 3)
101
114
  railties (>= 4.2.0)
102
115
  thor (>= 0.14, < 2.0)
103
- json (2.2.0)
104
- listen (3.1.5)
105
- rb-fsevent (~> 0.9, >= 0.9.4)
106
- rb-inotify (~> 0.9, >= 0.9.7)
107
- ruby_dep (~> 1.2)
108
- loofah (2.2.3)
116
+ json (2.3.0)
117
+ listen (3.2.1)
118
+ rb-fsevent (~> 0.10, >= 0.10.3)
119
+ rb-inotify (~> 0.9, >= 0.9.10)
120
+ loofah (2.5.0)
109
121
  crass (~> 1.0.2)
110
122
  nokogiri (>= 1.5.9)
111
- lumberjack (1.0.13)
123
+ lumberjack (1.2.4)
112
124
  mail (2.7.1)
113
125
  mini_mime (>= 0.1.1)
114
126
  marcel (0.3.3)
115
127
  mimemagic (~> 0.3.2)
116
128
  method_source (0.9.2)
117
- mimemagic (0.3.3)
118
- mini_mime (1.0.1)
129
+ mimemagic (0.3.5)
130
+ mini_mime (1.0.2)
119
131
  mini_portile2 (2.4.0)
120
- minitest (5.11.3)
132
+ minitest (5.14.1)
121
133
  nenv (0.3.0)
122
- nio4r (2.3.1)
123
- nokogiri (1.10.3)
134
+ nio4r (2.5.2)
135
+ nokogiri (1.10.9)
124
136
  mini_portile2 (~> 2.4.0)
125
- notiffany (0.1.1)
137
+ notiffany (0.1.3)
126
138
  nenv (~> 0.1)
127
139
  shellany (~> 0.0)
128
140
  pry (0.12.2)
@@ -130,98 +142,102 @@ GEM
130
142
  method_source (~> 0.9.0)
131
143
  pry-nav (0.3.0)
132
144
  pry (>= 0.9.10, < 0.13.0)
133
- public_suffix (3.1.1)
134
- rack (2.0.7)
145
+ public_suffix (4.0.5)
146
+ rack (2.2.2)
135
147
  rack-test (1.1.0)
136
148
  rack (>= 1.0, < 3)
137
- rails (5.2.3)
138
- actioncable (= 5.2.3)
139
- actionmailer (= 5.2.3)
140
- actionpack (= 5.2.3)
141
- actionview (= 5.2.3)
142
- activejob (= 5.2.3)
143
- activemodel (= 5.2.3)
144
- activerecord (= 5.2.3)
145
- activestorage (= 5.2.3)
146
- activesupport (= 5.2.3)
149
+ rails (6.0.3.1)
150
+ actioncable (= 6.0.3.1)
151
+ actionmailbox (= 6.0.3.1)
152
+ actionmailer (= 6.0.3.1)
153
+ actionpack (= 6.0.3.1)
154
+ actiontext (= 6.0.3.1)
155
+ actionview (= 6.0.3.1)
156
+ activejob (= 6.0.3.1)
157
+ activemodel (= 6.0.3.1)
158
+ activerecord (= 6.0.3.1)
159
+ activestorage (= 6.0.3.1)
160
+ activesupport (= 6.0.3.1)
147
161
  bundler (>= 1.3.0)
148
- railties (= 5.2.3)
162
+ railties (= 6.0.3.1)
149
163
  sprockets-rails (>= 2.0.0)
150
164
  rails-dom-testing (2.0.3)
151
165
  activesupport (>= 4.2.0)
152
166
  nokogiri (>= 1.6)
153
- rails-html-sanitizer (1.0.4)
154
- loofah (~> 2.2, >= 2.2.2)
155
- railties (5.2.3)
156
- actionpack (= 5.2.3)
157
- activesupport (= 5.2.3)
167
+ rails-html-sanitizer (1.3.0)
168
+ loofah (~> 2.3)
169
+ railties (6.0.3.1)
170
+ actionpack (= 6.0.3.1)
171
+ activesupport (= 6.0.3.1)
158
172
  method_source
159
173
  rake (>= 0.8.7)
160
- thor (>= 0.19.0, < 2.0)
161
- rake (12.3.2)
162
- rb-fsevent (0.10.3)
163
- rb-inotify (0.10.0)
174
+ thor (>= 0.20.3, < 2.0)
175
+ rake (13.0.1)
176
+ rb-fsevent (0.10.4)
177
+ rb-inotify (0.10.1)
164
178
  ffi (~> 1.0)
165
- rdoc (6.1.1)
166
- responders (2.4.1)
167
- actionpack (>= 4.2.0, < 6.0)
168
- railties (>= 4.2.0, < 6.0)
169
- roo (2.8.2)
179
+ rdoc (6.2.1)
180
+ responders (3.0.0)
181
+ actionpack (>= 5.0)
182
+ railties (>= 5.0)
183
+ roo (2.8.3)
170
184
  nokogiri (~> 1)
171
- rubyzip (>= 1.2.1, < 2.0.0)
172
- rspec (3.8.0)
173
- rspec-core (~> 3.8.0)
174
- rspec-expectations (~> 3.8.0)
175
- rspec-mocks (~> 3.8.0)
176
- rspec-core (3.8.2)
177
- rspec-support (~> 3.8.0)
178
- rspec-expectations (3.8.4)
185
+ rubyzip (>= 1.3.0, < 3.0.0)
186
+ rspec (3.9.0)
187
+ rspec-core (~> 3.9.0)
188
+ rspec-expectations (~> 3.9.0)
189
+ rspec-mocks (~> 3.9.0)
190
+ rspec-core (3.9.2)
191
+ rspec-support (~> 3.9.3)
192
+ rspec-expectations (3.9.2)
179
193
  diff-lcs (>= 1.2.0, < 2.0)
180
- rspec-support (~> 3.8.0)
181
- rspec-mocks (3.8.1)
194
+ rspec-support (~> 3.9.0)
195
+ rspec-mocks (3.9.1)
182
196
  diff-lcs (>= 1.2.0, < 2.0)
183
- rspec-support (~> 3.8.0)
184
- rspec-rails (3.8.2)
185
- actionpack (>= 3.0)
186
- activesupport (>= 3.0)
187
- railties (>= 3.0)
188
- rspec-core (~> 3.8.0)
189
- rspec-expectations (~> 3.8.0)
190
- rspec-mocks (~> 3.8.0)
191
- rspec-support (~> 3.8.0)
192
- rspec-support (3.8.2)
193
- ruby_dep (1.5.0)
194
- rubyzip (1.2.3)
197
+ rspec-support (~> 3.9.0)
198
+ rspec-rails (4.0.1)
199
+ actionpack (>= 4.2)
200
+ activesupport (>= 4.2)
201
+ railties (>= 4.2)
202
+ rspec-core (~> 3.9)
203
+ rspec-expectations (~> 3.9)
204
+ rspec-mocks (~> 3.9)
205
+ rspec-support (~> 3.9)
206
+ rspec-support (3.9.3)
207
+ rubyzip (2.3.0)
195
208
  shellany (0.0.1)
196
209
  simplecov (0.16.1)
197
210
  docile (~> 1.1)
198
211
  json (>= 1.8, < 3)
199
212
  simplecov-html (~> 0.10.0)
200
213
  simplecov-html (0.10.2)
201
- sprockets (3.7.2)
214
+ sprockets (4.0.0)
202
215
  concurrent-ruby (~> 1.0)
203
216
  rack (> 1, < 3)
204
217
  sprockets-rails (3.2.1)
205
218
  actionpack (>= 4.0)
206
219
  activesupport (>= 4.0)
207
220
  sprockets (>= 3.0.0)
208
- sqlite3 (1.4.1)
221
+ sqlite3 (1.4.2)
222
+ sync (0.5.0)
209
223
  term-ansicolor (1.7.1)
210
224
  tins (~> 1.0)
211
225
  thin (1.7.2)
212
226
  daemons (~> 1.0, >= 1.0.9)
213
227
  eventmachine (~> 1.0, >= 1.0.4)
214
228
  rack (>= 1, < 3)
215
- thor (0.20.3)
229
+ thor (1.0.1)
216
230
  thread_safe (0.3.6)
217
- tins (1.20.3)
218
- tzinfo (1.2.5)
231
+ tins (1.25.0)
232
+ sync
233
+ tzinfo (1.2.7)
219
234
  thread_safe (~> 0.1)
220
- websocket-driver (0.7.1)
235
+ websocket-driver (0.7.2)
221
236
  websocket-extensions (>= 0.1.0)
222
237
  websocket-extensions (0.1.4)
223
238
  xpath (3.2.0)
224
239
  nokogiri (~> 1.8)
240
+ zeitwerk (2.3.0)
225
241
 
226
242
  PLATFORMS
227
243
  ruby
@@ -236,15 +252,15 @@ DEPENDENCIES
236
252
  jquery-rails
237
253
  pry
238
254
  pry-nav
239
- rails (~> 5.2.3)
255
+ rails (~> 6.0.3, >= 6.0.3.1)
240
256
  rake
241
257
  rb-fsevent
242
258
  rdoc
243
- responders (~> 2.0)
259
+ responders (~> 3.0)
244
260
  roo
245
261
  rspec-rails
246
262
  sqlite3
247
263
  thin
248
264
 
249
265
  BUNDLED WITH
250
- 2.0.2
266
+ 2.1.4
data/README.md CHANGED
@@ -1,12 +1,9 @@
1
- CSVRb-Rails &mdash; Streaming CSVs with rbuy templates
1
+ CSVRb-Rails &mdash; Streaming CSVs with ActionView templates
2
2
  ===================================================
3
3
 
4
- [![Gem
5
- Version](https://badge.fury.io/rb/csv_rb.svg)](http://badge.fury.io/rb/csv_rb)
6
- [![Coverage
7
-
4
+ [![Gem Version](https://badge.fury.io/rb/csv_rb.svg)](http://badge.fury.io/rb/csv_rb)
8
5
  ![Total downloads](http://ruby-gem-downloads-badge.herokuapp.com/csv_rb?type=total)
9
- ![Downloads for latest release](http://ruby-gem-downloads-badge.herokuapp.com/csv_rb/0.5.1?label=0.5.1)
6
+ ![Downloads for latest release](http://ruby-gem-downloads-badge.herokuapp.com/csv_rb/6.0.2.4?label=6.0.2.4)
10
7
 
11
8
  ## Installation
12
9
 
@@ -19,7 +16,15 @@ gem 'csv_rb'
19
16
 
20
17
  ## Requirements
21
18
 
22
- * Rails 5.2 (tested)
19
+ * \>= Rails 5.2
20
+ - Latest Version Tested With:
21
+ - 5.2
22
+ - 6.0
23
+ * \>= Ruby 2.5
24
+ - Latest Version Tested With:
25
+ - 2.6
26
+ - 2.7
27
+
23
28
 
24
29
  ## Usage
25
30
 
@@ -89,12 +94,12 @@ format.csv {
89
94
  }
90
95
  ```
91
96
 
92
- If you use `render csv:` the gem will try to guess the file name:
97
+ If you use `render csv:` the gem will try to guess the file name based on the `:csv` key value
93
98
 
94
99
  ```ruby
95
- # filename of 'buttons'
100
+ # filename of 'buttons.csv'
96
101
  render csv: 'buttons'
97
- # filename of 'latest_buttons'
102
+ # filename of 'latest_buttons.csv'
98
103
  render csv: 'latest_buttons', template: 'featured/latest'
99
104
  ```
100
105
 
@@ -110,13 +115,15 @@ Partials work as expected, but you must pass in relevant spreadsheet variables:
110
115
 
111
116
  ```ruby
112
117
  csv << ['BEFORE']
113
- render :partial => 'looper_partial', :locals => { csv: csv }
118
+ render :partial => 'csv_partial', :locals => { csv: csv }
114
119
  csv << ['AFTER']
115
120
  ```
116
121
 
117
122
  With the partial simply using the passed variables:
118
123
 
119
124
  ```ruby
125
+ # _csv_partial.csv.csvrb
126
+
120
127
  csv << ['Partial Content']
121
128
  ```
122
129
 
@@ -130,8 +137,8 @@ class UserMailer < ActionMailer::Base
130
137
  csv = render_to_string layout: false, handlers: [:csvrb], formats: [:csv], template: "users/export", locals: {users: users}
131
138
  attachment = Base64.encode64(csv)
132
139
  attachments["Users.csv"] = {mime_type: Mime[:csv], content: attachment, encoding: 'base64'}
133
- # For rails 4 use Mime::csv
134
- # attachments["Users.csv"] = {mime_type: Mime::csv, content: attachment, encoding: 'base64'}
140
+ # For rails 4 use Mime::CSV
141
+ # attachments["Users.csv"] = {mime_type: Mime::CSV, content: attachment, encoding: 'base64'}
135
142
  # self.instance_variable_set(:@_lookup_context, nil) # If attachments are rendered as content, try this and open an issue
136
143
  ...
137
144
  end
@@ -139,8 +146,8 @@ end
139
146
  ```
140
147
 
141
148
  * If the route specifies or suggests the `:csv` format you do not need to specify `formats` or `handlers`.
142
- * If the template (`users/export`) can refer to only one file (the csv.csvrb template), you do not need to specify `handlers`, provided the `formats` includes `:csv`.
143
- * Specifying the encoding as 'base64' can avoid UTF-8 errors.
149
+ * If the template (`users/export` in this case) can refer to only one file (`users/export.csv.csvrb`), you do not need to specify `handlers`, provided the `formats` key includes `:csv`.
150
+ * Specifying the encoding as 'base64' can help avoid UTF-8 errors.
144
151
 
145
152
  ### Testing
146
153