csv_rb 5.2.2 → 5.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c60c49358c05932a1c10df405f647211f6b15baf31b2bc5d6cd1357c70845a7
4
- data.tar.gz: cca5a2640ccbe35d39112d404325a118fa571f93859338b43810d24111d61b35
3
+ metadata.gz: a71f29b994889a9e7b6c8ff1eb86540cb765687e384a73dc365238e0f73683d6
4
+ data.tar.gz: 25c0b2a833af41527e81bf7bcbf9f0bc716a743d7175dea6ed1d7f32d2256c58
5
5
  SHA512:
6
- metadata.gz: 9923a666acaa90c8469d56bad8aa810385f576b1cd90cc4129a034968aa1a0bba1c4a5a78285834daa1219af45d76474a860b90b91c8a255dbb35f0ab228558d
7
- data.tar.gz: ad2815d606d507f21f159699b62eed88559c1315f677e101af13cce274cde6a5ff4a7c701ec359dbb43b804a25c66344705302a8ba338d53492111e72ec996db
6
+ metadata.gz: c2ffa06bd35d044f675675ced0874d363835f6e1b8593a2571fd4efafc017128c49bbe1079c99c6ad1fd22f7cbbeeca06623ba8a472fb5d0eedadaf364b76bad
7
+ data.tar.gz: b879b6d1fe48074dd3205aab6ffac29bb3cfb50024d1e27269c2c66b1811e2353c889cbfeebd7774f8d721e719bb3e5e6a8843a05790f264c88f919e3aabc443
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
- **June 6, 2019**: 0.0.1 release
3
+ **June 6, 2019**: 5.2.1 release
4
4
 
5
5
  - Initial posting.
6
+
7
+ **June 7, 2019**: 5.2.2 release
8
+
9
+ - Add csv.set method
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv_rb (5.2.2)
4
+ csv_rb (5.2.3)
5
5
  actionpack (~> 5.2)
6
6
  csv (>= 3.1.0)
7
7
 
@@ -29,17 +29,19 @@ ActionController::Renderers.add :csv do |filename, options|
29
29
  file_name = "#{options.delete(:filename) || filename.gsub(/^.*\//,'')}#{options.delete(:with_time) ? "-#{Time.zone.now.to_s}" : ''}.csv".sub(/(\.csv)+$/, '.csv')
30
30
 
31
31
  response.headers["Content-Type"] = "text/csv; charset=utf-8"
32
-
32
+
33
33
  unless options.delete(:allow_cache)
34
+ with_compression = !options.delete(:skip_compression)
35
+
34
36
  expires_now
35
37
  response.headers["X-Accel-Buffering"] = 'no'
36
38
  response.headers["Content-Type"] = "text/csv; charset=utf-8"
37
- response.headers["Content-Encoding"] = 'deflate'
39
+ response.headers["Content-Encoding"] = 'deflate' if with_compression
38
40
  response.headers["Content-Disposition"] = %(attachment; filename="#{file_name}")
39
41
 
40
42
 
41
43
  return self.response_body = Enumerator.new do |y|
42
- csv = CSVRb::StreamCSVDeflator.new(y)
44
+ csv = CSVRb::StreamCSVDeflator.new(y, with_compression)
43
45
  instance_eval lookup_context.find_template(options[:template], options[:prefixes], options[:partial], options.dup.merge(formats: [:csv])).source
44
46
  csv.close
45
47
  end
@@ -1,7 +1,8 @@
1
1
  module CSVRb
2
2
  class StreamCSVDeflator
3
- def initialize(enum)
3
+ def initialize(enum, with_compression = true)
4
4
  @enum = enum
5
+ @with_compression = with_compression
5
6
  @deflator = Zlib::Deflate.new
6
7
  end
7
8
 
@@ -10,12 +11,13 @@ module CSVRb
10
11
  end
11
12
 
12
13
  def set(value)
13
- y << value
14
+ y << compress(value)
14
15
  end
15
16
 
16
17
  def stream(row)
17
- v = CSV.generate_line(row, force_quotes: true, encoding: 'utf-8')
18
- y << @deflator.deflate(v, Zlib::SYNC_FLUSH)
18
+ y << compress(
19
+ CSV.generate_line(row, force_quotes: true, encoding: 'utf-8')
20
+ )
19
21
  end
20
22
 
21
23
  def <<(row)
@@ -23,7 +25,15 @@ module CSVRb
23
25
  end
24
26
 
25
27
  def close
26
- y << @deflator.flush(Zlib::FINISH)
28
+ y << @deflator.flush(Zlib::FINISH) if @with_compression
27
29
  end
30
+
31
+ private
32
+ def compress(value)
33
+ @with_compression \
34
+ ? @deflator.deflate(value, Zlib::SYNC_FLUSH) \
35
+ : value
36
+ end
37
+
28
38
  end
29
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CSVRb
4
- VERSION = '5.2.2'
4
+ VERSION = '5.2.3'
5
5
  end
Binary file
@@ -25805,3 +25805,430 @@ Processing by UsersController#show as CSV
25805
25805
  Rendering users/respond_with.csv.csvrb
25806
25806
  Rendered users/respond_with.csv.csvrb (0.2ms)
25807
25807
  Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)
25808
+  (0.0ms) begin transaction
25809
+ User Create (0.2ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:47:13.667750"], ["updated_at", "2019-06-07 16:47:13.667750"]]
25810
+  (53.3ms) commit transaction
25811
+ Started GET "/users/521/send_instructions" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25812
+ Processing by UsersController#send_instructions as HTML
25813
+ Parameters: {"user_id"=>"521"}
25814
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 521], ["LIMIT", 1]]
25815
+ Rendering users/send_instructions.csv.csvrb
25816
+ Rendered users/send_instructions.csv.csvrb (0.5ms)
25817
+ Rendering notifier/instructions.html.erb
25818
+ Rendered notifier/instructions.html.erb (0.7ms)
25819
+ Notifier#instructions: processed outbound mail in 103.3ms
25820
+ Sent mail to elmer@fudd.com (6.6ms)
25821
+ Date: Fri, 07 Jun 2019 10:47:13 -0600
25822
+ From: noreply@company.com
25823
+ To: elmer@fudd.com
25824
+ Message-ID: <5cfa9511cf935_36462ad0422599683366a@archlinux.mail>
25825
+ Subject: Instructions
25826
+ Mime-Version: 1.0
25827
+ Content-Type: multipart/mixed;
25828
+ boundary="--==_mimepart_5cfa9511ce95a_36462ad04225996833559";
25829
+ charset=UTF-8
25830
+ Content-Transfer-Encoding: 7bit
25831
+
25832
+
25833
+ ----==_mimepart_5cfa9511ce95a_36462ad04225996833559
25834
+ Content-Type: text/html;
25835
+ charset=UTF-8
25836
+ Content-Transfer-Encoding: 7bit
25837
+
25838
+ <!DOCTYPE html>
25839
+ <html>
25840
+ <head>
25841
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
25842
+ </head>
25843
+ <body>
25844
+ <h1>Instructions</h1>
25845
+ <p>
25846
+ You have successfully signed up to example.com,
25847
+ your username is: elmer@fudd.com.<br/>
25848
+ </p>
25849
+ <p>Thanks for joining and have a great day!</p>
25850
+ </body>
25851
+ </html>
25852
+
25853
+ ----==_mimepart_5cfa9511ce95a_36462ad04225996833559
25854
+ Content-Type: text/csv;
25855
+ charset=UTF-8
25856
+ Content-Transfer-Encoding: base64
25857
+ Content-Disposition: attachment;
25858
+ filename=user_521.csv
25859
+ Content-ID: <5cfa9511d0090_36462ad04225996833795@archlinux.mail>
25860
+
25861
+ IjUyMSIsIkVsbWVyIiwiZWxtZXJAZnVkZC5jb20iDQoiIiwiSW5zdHJ1Y3Rp
25862
+ b25zIiwiIg0K
25863
+
25864
+ ----==_mimepart_5cfa9511ce95a_36462ad04225996833559--
25865
+
25866
+ Rendering text template
25867
+ Rendered text template (0.4ms)
25868
+ Completed 200 OK in 115ms (Views: 0.8ms | ActiveRecord: 0.1ms)
25869
+ User Load (0.1ms) SELECT "users".* FROM "users"
25870
+  (0.0ms) begin transaction
25871
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 520]]
25872
+  (3.1ms) commit transaction
25873
+  (0.0ms) begin transaction
25874
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 521]]
25875
+  (2.3ms) commit transaction
25876
+  (0.0ms) begin transaction
25877
+ User Create (0.6ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:47:13.868467"], ["updated_at", "2019-06-07 16:47:13.868467"]]
25878
+  (2.1ms) commit transaction
25879
+  (0.0ms) begin transaction
25880
+ Like Create (0.1ms) INSERT INTO "likes" ("name", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Carrots"], ["user_id", 522], ["created_at", "2019-06-07 16:47:13.892543"], ["updated_at", "2019-06-07 16:47:13.892543"]]
25881
+  (2.0ms) commit transaction
25882
+  (0.1ms) begin transaction
25883
+ Like Create (0.3ms) INSERT INTO "likes" ("name", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Celery"], ["user_id", 522], ["created_at", "2019-06-07 16:47:13.896296"], ["updated_at", "2019-06-07 16:47:13.896296"]]
25884
+  (2.0ms) commit transaction
25885
+ Started GET "/users/522/likes.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25886
+ Processing by LikesController#index as CSV
25887
+ Parameters: {"user_id"=>"522"}
25888
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 522], ["LIMIT", 1]]
25889
+ Rendering likes/index.csv.csvrb
25890
+ Like Load (0.2ms) SELECT "likes".* FROM "likes" WHERE "likes"."user_id" = ? [["user_id", 522]]
25891
+ Rendered likes/index.csv.csvrb (1.9ms)
25892
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms)
25893
+ Started GET "/home.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25894
+ Processing by HomeController#index as CSV
25895
+ Rendering home/index.csv.csvrb
25896
+ Rendered home/index.csv.csvrb (0.3ms)
25897
+ Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)
25898
+  (0.1ms) begin transaction
25899
+ User Create (0.2ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:47:13.917721"], ["updated_at", "2019-06-07 16:47:13.917721"]]
25900
+  (2.8ms) commit transaction
25901
+ Started GET "/" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25902
+ Processing by HomeController#index as HTML
25903
+ Rendering home/index.html.erb within layouts/application
25904
+ Rendered home/index.html.erb within layouts/application (0.7ms)
25905
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
25906
+ Started GET "/useheader.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25907
+ Processing by HomeController#useheader as CSV
25908
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
25909
+ Started GET "/useheader.csv?set_direct=true" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25910
+ Processing by HomeController#useheader as CSV
25911
+ Parameters: {"set_direct"=>"true"}
25912
+ Rendering home/useheader.csv.csvrb
25913
+ Rendered home/useheader.csv.csvrb (0.4ms)
25914
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
25915
+ Started GET "/another.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25916
+ Processing by HomeController#another as CSV
25917
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
25918
+ User Load (0.1ms) SELECT "users".* FROM "users"
25919
+  (0.0ms) begin transaction
25920
+ User Destroy (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 522]]
25921
+  (2.0ms) commit transaction
25922
+  (0.0ms) begin transaction
25923
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 523]]
25924
+  (1.7ms) commit transaction
25925
+  (0.0ms) begin transaction
25926
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:47:13.942605"], ["updated_at", "2019-06-07 16:47:13.942605"]]
25927
+  (2.2ms) commit transaction
25928
+  (0.0ms) begin transaction
25929
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:47:13.945876"], ["updated_at", "2019-06-07 16:47:13.945876"]]
25930
+  (2.3ms) commit transaction
25931
+ Started GET "/users.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25932
+ Processing by UsersController#index as CSV
25933
+ Rendering users/index.csv.csvrb
25934
+ User Load (0.1ms) SELECT "users".* FROM "users"
25935
+ Rendered users/index.csv.csvrb (0.8ms)
25936
+ Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.1ms)
25937
+ Started GET "/withpartial.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25938
+ Processing by HomeController#withpartial as CSV
25939
+ Rendering home/withpartial.csv.csvrb
25940
+ Rendered home/_cover_sheet.csv.csvrb (0.2ms)
25941
+ Rendered home/withpartial.csv.csvrb (0.7ms)
25942
+ Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
25943
+ Started GET "/another" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25944
+ Processing by HomeController#another as */*
25945
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
25946
+ Started GET "/another" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25947
+ Processing by HomeController#another as HTML
25948
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
25949
+ User Load (0.1ms) SELECT "users".* FROM "users"
25950
+  (0.0ms) begin transaction
25951
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 524]]
25952
+  (1.6ms) commit transaction
25953
+  (0.0ms) begin transaction
25954
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 525]]
25955
+  (1.5ms) commit transaction
25956
+  (0.0ms) begin transaction
25957
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:47:13.964018"], ["updated_at", "2019-06-07 16:47:13.964018"]]
25958
+  (1.6ms) commit transaction
25959
+ Started GET "/users/526/render_elsewhere.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25960
+ Processing by LikesController#render_elsewhere as CSV
25961
+ Parameters: {"user_id"=>"526"}
25962
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 526], ["LIMIT", 1]]
25963
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
25964
+ User Load (0.1ms) SELECT "users".* FROM "users"
25965
+ User Load (0.0ms) SELECT "users".* FROM "users"
25966
+  (0.0ms) begin transaction
25967
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 526]]
25968
+  (1.8ms) commit transaction
25969
+  (0.0ms) begin transaction
25970
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:47:13.971924"], ["updated_at", "2019-06-07 16:47:13.971924"]]
25971
+  (1.9ms) commit transaction
25972
+  (0.0ms) begin transaction
25973
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:47:13.974433"], ["updated_at", "2019-06-07 16:47:13.974433"]]
25974
+  (1.6ms) commit transaction
25975
+ Started GET "/users/noaction.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25976
+ User Load (0.1ms) SELECT "users".* FROM "users"
25977
+  (0.0ms) begin transaction
25978
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 527]]
25979
+  (2.0ms) commit transaction
25980
+  (0.0ms) begin transaction
25981
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 528]]
25982
+  (2.2ms) commit transaction
25983
+  (0.0ms) begin transaction
25984
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Responder"], ["last_name", "Bunny"], ["address", "1234 Right Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:47:13.984913"], ["updated_at", "2019-06-07 16:47:13.984913"]]
25985
+  (2.0ms) commit transaction
25986
+ Started GET "/users/export/529.csv" for 127.0.0.1 at 2019-06-07 10:47:13 -0600
25987
+ Processing by UsersController#export as CSV
25988
+ Parameters: {"id"=>"529"}
25989
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 529], ["LIMIT", 1]]
25990
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
25991
+ User Load (0.1ms) SELECT "users".* FROM "users"
25992
+  (0.0ms) begin transaction
25993
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 529]]
25994
+  (1.5ms) commit transaction
25995
+  (0.0ms) begin transaction
25996
+ User Create (0.2ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Responder"], ["last_name", "Bunny"], ["address", "1234 Right Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:47:14.000146"], ["updated_at", "2019-06-07 16:47:14.000146"]]
25997
+  (1.7ms) commit transaction
25998
+ Started GET "/users/530.csv" for 127.0.0.1 at 2019-06-07 10:47:14 -0600
25999
+ Processing by UsersController#show as CSV
26000
+ Parameters: {"id"=>"530"}
26001
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 530], ["LIMIT", 1]]
26002
+ Rendering users/respond_with.csv.csvrb
26003
+ Rendered users/respond_with.csv.csvrb (0.2ms)
26004
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
26005
+  (0.0ms) begin transaction
26006
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:48:07.479951"], ["updated_at", "2019-06-07 16:48:07.479951"]]
26007
+  (3.8ms) commit transaction
26008
+ Started GET "/users/531/send_instructions" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26009
+ Processing by UsersController#send_instructions as HTML
26010
+ Parameters: {"user_id"=>"531"}
26011
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 531], ["LIMIT", 1]]
26012
+ Rendering users/send_instructions.csv.csvrb
26013
+ Rendered users/send_instructions.csv.csvrb (0.2ms)
26014
+ Rendering notifier/instructions.html.erb
26015
+ Rendered notifier/instructions.html.erb (0.8ms)
26016
+ Notifier#instructions: processed outbound mail in 98.6ms
26017
+ Sent mail to elmer@fudd.com (6.3ms)
26018
+ Date: Fri, 07 Jun 2019 10:48:07 -0600
26019
+ From: noreply@company.com
26020
+ To: elmer@fudd.com
26021
+ Message-ID: <5cfa954791fec_36742b01b692f95471878@archlinux.mail>
26022
+ Subject: Instructions
26023
+ Mime-Version: 1.0
26024
+ Content-Type: multipart/mixed;
26025
+ boundary="--==_mimepart_5cfa9547910e7_36742b01b692f9547174f";
26026
+ charset=UTF-8
26027
+ Content-Transfer-Encoding: 7bit
26028
+
26029
+
26030
+ ----==_mimepart_5cfa9547910e7_36742b01b692f9547174f
26031
+ Content-Type: text/html;
26032
+ charset=UTF-8
26033
+ Content-Transfer-Encoding: 7bit
26034
+
26035
+ <!DOCTYPE html>
26036
+ <html>
26037
+ <head>
26038
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
26039
+ </head>
26040
+ <body>
26041
+ <h1>Instructions</h1>
26042
+ <p>
26043
+ You have successfully signed up to example.com,
26044
+ your username is: elmer@fudd.com.<br/>
26045
+ </p>
26046
+ <p>Thanks for joining and have a great day!</p>
26047
+ </body>
26048
+ </html>
26049
+
26050
+ ----==_mimepart_5cfa9547910e7_36742b01b692f9547174f
26051
+ Content-Type: text/csv;
26052
+ charset=UTF-8
26053
+ Content-Transfer-Encoding: base64
26054
+ Content-Disposition: attachment;
26055
+ filename=user_531.csv
26056
+ Content-ID: <5cfa95479273c_36742b01b692f954719ba@archlinux.mail>
26057
+
26058
+ IjUzMSIsIkVsbWVyIiwiZWxtZXJAZnVkZC5jb20iDQoiIiwiSW5zdHJ1Y3Rp
26059
+ b25zIiwiIg0K
26060
+
26061
+ ----==_mimepart_5cfa9547910e7_36742b01b692f9547174f--
26062
+
26063
+ Rendering text template
26064
+ Rendered text template (0.0ms)
26065
+ Completed 200 OK in 109ms (Views: 0.8ms | ActiveRecord: 0.1ms)
26066
+  (0.0ms) begin transaction
26067
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:48:07.604991"], ["updated_at", "2019-06-07 16:48:07.604991"]]
26068
+  (2.6ms) commit transaction
26069
+ Started GET "/" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26070
+ Processing by HomeController#index as HTML
26071
+ Rendering home/index.html.erb within layouts/application
26072
+ Rendered home/index.html.erb within layouts/application (0.3ms)
26073
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
26074
+ Started GET "/home.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26075
+ Processing by HomeController#index as CSV
26076
+ Rendering home/index.csv.csvrb
26077
+ Rendered home/index.csv.csvrb (0.2ms)
26078
+ Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
26079
+ User Load (0.1ms) SELECT "users".* FROM "users"
26080
+  (0.0ms) begin transaction
26081
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 530]]
26082
+  (2.1ms) commit transaction
26083
+  (0.0ms) begin transaction
26084
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 531]]
26085
+  (2.0ms) commit transaction
26086
+  (0.0ms) begin transaction
26087
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 532]]
26088
+  (1.5ms) commit transaction
26089
+  (0.0ms) begin transaction
26090
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:48:07.627330"], ["updated_at", "2019-06-07 16:48:07.627330"]]
26091
+  (1.5ms) commit transaction
26092
+ Started GET "/users/533/render_elsewhere.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26093
+ Processing by LikesController#render_elsewhere as CSV
26094
+ Parameters: {"user_id"=>"533"}
26095
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 533], ["LIMIT", 1]]
26096
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.1ms)
26097
+ User Load (0.0ms) SELECT "users".* FROM "users"
26098
+ Started GET "/home/render_elsewhere.csv?type=5" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26099
+ Processing by HomeController#render_elsewhere as CSV
26100
+ Parameters: {"type"=>"5"}
26101
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
26102
+ Started GET "/home/render_elsewhere.csv?type=4" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26103
+ Processing by HomeController#render_elsewhere as CSV
26104
+ Parameters: {"type"=>"4"}
26105
+ Rendering users/index.csv.csvrb
26106
+ User Load (0.0ms) SELECT "users".* FROM "users"
26107
+ Rendered users/index.csv.csvrb (0.4ms)
26108
+ Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
26109
+ Started GET "/home/render_elsewhere.csv?type=3" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26110
+ Processing by HomeController#render_elsewhere as CSV
26111
+ Parameters: {"type"=>"3"}
26112
+ Rendering users/index.csv.csvrb
26113
+ User Load (0.0ms) SELECT "users".* FROM "users"
26114
+ Rendered users/index.csv.csvrb (0.3ms)
26115
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
26116
+ Started GET "/home/render_elsewhere.csv?type=1" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26117
+ Processing by HomeController#render_elsewhere as CSV
26118
+ Parameters: {"type"=>"1"}
26119
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
26120
+ User Load (0.0ms) SELECT "users".* FROM "users"
26121
+ Started GET "/useheader.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26122
+ Processing by HomeController#useheader as CSV
26123
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
26124
+ Started GET "/another" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26125
+ Processing by HomeController#another as */*
26126
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
26127
+ Started GET "/home/only_html" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26128
+ Processing by HomeController#only_html as */*
26129
+ Rendering home/only_html.html.erb within layouts/application
26130
+ Rendered home/only_html.html.erb within layouts/application (0.1ms)
26131
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
26132
+ User Load (0.1ms) SELECT "users".* FROM "users"
26133
+  (0.0ms) begin transaction
26134
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 533]]
26135
+  (1.7ms) commit transaction
26136
+  (0.0ms) begin transaction
26137
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:48:07.657169"], ["updated_at", "2019-06-07 16:48:07.657169"]]
26138
+  (1.5ms) commit transaction
26139
+  (0.1ms) begin transaction
26140
+ Like Create (0.1ms) INSERT INTO "likes" ("name", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Carrots"], ["user_id", 534], ["created_at", "2019-06-07 16:48:07.671154"], ["updated_at", "2019-06-07 16:48:07.671154"]]
26141
+  (2.2ms) commit transaction
26142
+  (0.0ms) begin transaction
26143
+ Like Create (0.1ms) INSERT INTO "likes" ("name", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Celery"], ["user_id", 534], ["created_at", "2019-06-07 16:48:07.674222"], ["updated_at", "2019-06-07 16:48:07.674222"]]
26144
+  (2.3ms) commit transaction
26145
+ Started GET "/users/534/likes.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26146
+ Processing by LikesController#index as CSV
26147
+ Parameters: {"user_id"=>"534"}
26148
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 534], ["LIMIT", 1]]
26149
+ Rendering likes/index.csv.csvrb
26150
+ Like Load (0.1ms) SELECT "likes".* FROM "likes" WHERE "likes"."user_id" = ? [["user_id", 534]]
26151
+ Rendered likes/index.csv.csvrb (0.9ms)
26152
+ Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)
26153
+ User Load (0.0ms) SELECT "users".* FROM "users"
26154
+  (0.0ms) begin transaction
26155
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 534]]
26156
+  (1.8ms) commit transaction
26157
+  (0.0ms) begin transaction
26158
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:48:07.682888"], ["updated_at", "2019-06-07 16:48:07.682888"]]
26159
+  (1.7ms) commit transaction
26160
+  (0.0ms) begin transaction
26161
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:48:07.685274"], ["updated_at", "2019-06-07 16:48:07.685274"]]
26162
+  (1.5ms) commit transaction
26163
+ Started GET "/users.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26164
+ Processing by UsersController#index as CSV
26165
+ Rendering users/index.csv.csvrb
26166
+ User Load (0.0ms) SELECT "users".* FROM "users"
26167
+ Rendered users/index.csv.csvrb (0.4ms)
26168
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
26169
+ User Load (0.0ms) SELECT "users".* FROM "users"
26170
+  (0.0ms) begin transaction
26171
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 535]]
26172
+  (1.5ms) commit transaction
26173
+  (0.0ms) begin transaction
26174
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 536]]
26175
+  (1.5ms) commit transaction
26176
+  (0.0ms) begin transaction
26177
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Elmer"], ["last_name", "Fudd"], ["address", "1234 Somewhere, Over NY 11111"], ["email", "elmer@fudd.com"], ["created_at", "2019-06-07 16:48:07.693329"], ["updated_at", "2019-06-07 16:48:07.693329"]]
26178
+  (1.5ms) commit transaction
26179
+  (0.0ms) begin transaction
26180
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Bugs"], ["last_name", "Bunny"], ["address", "1234 Left Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:48:07.695994"], ["updated_at", "2019-06-07 16:48:07.695994"]]
26181
+  (1.8ms) commit transaction
26182
+ Started GET "/users/noaction.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26183
+ Processing by UsersController#noaction as CSV
26184
+ Rendering users/noaction.csv.csvrb
26185
+ User Load (0.1ms) SELECT "users".* FROM "users"
26186
+ Rendered users/noaction.csv.csvrb (0.6ms)
26187
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.1ms)
26188
+ Started GET "/another" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26189
+ Processing by HomeController#another as HTML
26190
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
26191
+ Started GET "/useheader.csv?set_direct=true" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26192
+ Processing by HomeController#useheader as CSV
26193
+ Parameters: {"set_direct"=>"true"}
26194
+ Rendering home/useheader.csv.csvrb
26195
+ Rendered home/useheader.csv.csvrb (0.2ms)
26196
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
26197
+ Started GET "/another.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26198
+ Processing by HomeController#another as CSV
26199
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
26200
+ Started GET "/withpartial.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26201
+ Processing by HomeController#withpartial as CSV
26202
+ Rendering home/withpartial.csv.csvrb
26203
+ Rendered home/_cover_sheet.csv.csvrb (0.1ms)
26204
+ Rendered home/withpartial.csv.csvrb (0.5ms)
26205
+ Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
26206
+ User Load (0.1ms) SELECT "users".* FROM "users"
26207
+  (0.0ms) begin transaction
26208
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 537]]
26209
+  (2.2ms) commit transaction
26210
+  (0.0ms) begin transaction
26211
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 538]]
26212
+  (1.4ms) commit transaction
26213
+  (0.0ms) begin transaction
26214
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Responder"], ["last_name", "Bunny"], ["address", "1234 Right Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:48:07.714351"], ["updated_at", "2019-06-07 16:48:07.714351"]]
26215
+  (1.5ms) commit transaction
26216
+ Started GET "/users/export/539.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26217
+ Processing by UsersController#export as CSV
26218
+ Parameters: {"id"=>"539"}
26219
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 539], ["LIMIT", 1]]
26220
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.1ms)
26221
+ User Load (0.1ms) SELECT "users".* FROM "users"
26222
+  (0.0ms) begin transaction
26223
+ User Destroy (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 539]]
26224
+  (1.5ms) commit transaction
26225
+  (0.0ms) begin transaction
26226
+ User Create (0.1ms) INSERT INTO "users" ("name", "last_name", "address", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "Responder"], ["last_name", "Bunny"], ["address", "1234 Right Turn, Albuquerque NM 22222"], ["email", "bugs@bunny.com"], ["created_at", "2019-06-07 16:48:07.721183"], ["updated_at", "2019-06-07 16:48:07.721183"]]
26227
+  (1.5ms) commit transaction
26228
+ Started GET "/users/540.csv" for 127.0.0.1 at 2019-06-07 10:48:07 -0600
26229
+ Processing by UsersController#show as CSV
26230
+ Parameters: {"id"=>"540"}
26231
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 540], ["LIMIT", 1]]
26232
+ Rendering users/respond_with.csv.csvrb
26233
+ Rendered users/respond_with.csv.csvrb (0.2ms)
26234
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.2
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampson Crowley