csv_rb 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile +24 -0
  4. data/Gemfile.lock +250 -0
  5. data/Guardfile +16 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +510 -0
  8. data/Rakefile +29 -0
  9. data/lib/csv_rb/action_controller.rb +66 -0
  10. data/lib/csv_rb/plain_builder.rb +27 -0
  11. data/lib/csv_rb/railtie.rb +16 -0
  12. data/lib/csv_rb/stream_csv_deflator.rb +25 -0
  13. data/lib/csv_rb/template_handler.rb +31 -0
  14. data/lib/csv_rb/version.rb +5 -0
  15. data/lib/csv_rb.rb +6 -0
  16. data/lib/tasks/csv_rb_tasks.rake +4 -0
  17. data/spec/ci.rb +4 -0
  18. data/spec/csv_rb_builder_spec.rb +39 -0
  19. data/spec/csv_rb_mailer_spec.rb +17 -0
  20. data/spec/csv_rb_renderer_spec.rb +18 -0
  21. data/spec/csv_rb_request_spec.rb +220 -0
  22. data/spec/dummy/Rakefile +6 -0
  23. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  24. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  25. data/spec/dummy/app/controllers/application_controller.rb +7 -0
  26. data/spec/dummy/app/controllers/home_controller.rb +58 -0
  27. data/spec/dummy/app/controllers/likes_controller.rb +20 -0
  28. data/spec/dummy/app/controllers/users_controller.rb +39 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  30. data/spec/dummy/app/mailers/notifier.rb +14 -0
  31. data/spec/dummy/app/models/like.rb +3 -0
  32. data/spec/dummy/app/models/user.rb +24 -0
  33. data/spec/dummy/app/views/home/_cover_sheet.csv.csvrb +1 -0
  34. data/spec/dummy/app/views/home/index.csv.csvrb +2 -0
  35. data/spec/dummy/app/views/home/index.html.erb +4 -0
  36. data/spec/dummy/app/views/home/only_html.html.erb +2 -0
  37. data/spec/dummy/app/views/home/useheader.csv.csvrb +1 -0
  38. data/spec/dummy/app/views/home/withpartial.csv.csvrb +2 -0
  39. data/spec/dummy/app/views/layouts/application.html.erb +12 -0
  40. data/spec/dummy/app/views/layouts/users.html.erb +12 -0
  41. data/spec/dummy/app/views/likes/index.csv.csvrb +4 -0
  42. data/spec/dummy/app/views/likes/index.html.erb +17 -0
  43. data/spec/dummy/app/views/notifier/instructions.html.erb +14 -0
  44. data/spec/dummy/app/views/notifier/instructions.txt.erb +6 -0
  45. data/spec/dummy/app/views/users/export.csv.csvrb +1 -0
  46. data/spec/dummy/app/views/users/index.csv.csvrb +1 -0
  47. data/spec/dummy/app/views/users/index.html.erb +23 -0
  48. data/spec/dummy/app/views/users/noaction.csv.csvrb +1 -0
  49. data/spec/dummy/app/views/users/respond_with.csv.csvrb +1 -0
  50. data/spec/dummy/app/views/users/send_instructions.csv.csvrb +2 -0
  51. data/spec/dummy/bin/bundle +3 -0
  52. data/spec/dummy/bin/rails +4 -0
  53. data/spec/dummy/bin/rake +4 -0
  54. data/spec/dummy/config/application.rb +22 -0
  55. data/spec/dummy/config/boot.rb +5 -0
  56. data/spec/dummy/config/database.yml +25 -0
  57. data/spec/dummy/config/environment.rb +5 -0
  58. data/spec/dummy/config/environments/development.rb +37 -0
  59. data/spec/dummy/config/environments/production.rb +83 -0
  60. data/spec/dummy/config/environments/test.rb +40 -0
  61. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  62. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  63. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/spec/dummy/config/initializers/inflections.rb +16 -0
  65. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  66. data/spec/dummy/config/initializers/secret_token.rb +2 -0
  67. data/spec/dummy/config/initializers/session_store.rb +3 -0
  68. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  69. data/spec/dummy/config/locales/en.yml +23 -0
  70. data/spec/dummy/config/routes.rb +17 -0
  71. data/spec/dummy/config/secrets.yml +22 -0
  72. data/spec/dummy/config.ru +4 -0
  73. data/spec/dummy/db/development.sqlite3 +0 -0
  74. data/spec/dummy/db/migrate/20120717192452_create_users.rb +12 -0
  75. data/spec/dummy/db/migrate/20121206210955_create_likes.rb +10 -0
  76. data/spec/dummy/db/schema.rb +31 -0
  77. data/spec/dummy/db/test.sqlite3 +0 -0
  78. data/spec/dummy/log/development.log +257 -0
  79. data/spec/dummy/log/test.log +25347 -0
  80. data/spec/dummy/public/404.html +67 -0
  81. data/spec/dummy/public/422.html +67 -0
  82. data/spec/dummy/public/500.html +66 -0
  83. data/spec/dummy/public/favicon.ico +0 -0
  84. data/spec/reset_gems.sh +2 -0
  85. data/spec/spec_helper.rb +39 -0
  86. data/spec/test_5.2.sh +16 -0
  87. data/spec/test_all_rails.sh +4 -0
  88. data/spec/test_revert.sh +3 -0
  89. metadata +413 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 54fdb2ba3c988ea18ef59aa17b3302981cda0716289165e9b64427f2a9bcc0e7
4
+ data.tar.gz: 160dad5d4976eea5f3d4d09a099ee7cc8ec8a4a299b7e2f914544e980383ab45
5
+ SHA512:
6
+ metadata.gz: 8e68ea49b2d0b0b2db5a48fc15f934182608929e5625d4643ce291bb21a20bc97e697a91116d53ee2b80e514cad1115566e5a638e8ce708f75e6a9a172cf8b0e
7
+ data.tar.gz: 75685dacbf121d7ec2d96cb5833a348ddc830930bf6eb332ab2a321a88e917a783946325f0adf525f7292fabf3b56f621cdc7519666e54bad4b343dca68b2795
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Change log
2
+
3
+ **June 6, 2019**: 0.0.1 release
4
+
5
+ - Initial posting.
data/Gemfile ADDED
@@ -0,0 +1,24 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in csv_rb.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ ENV["RAILS_VERSION"] ||= '5.2.3'
9
+ gem 'rails', "~> 5.2.3"
10
+ gem 'responders', '~> 2.0'
11
+
12
+ # jquery-rails is used by the dummy application
13
+
14
+
15
+ # Declare any dependencies that are still in development here instead of in
16
+ # your gemspec. These might include edge Rails or gems from your path or
17
+ # Git. Remember to move these dependencies to your gemspec before releasing
18
+ # your gem to rubygems.org.
19
+ gem "jquery-rails"
20
+ gem "thin"
21
+ gem 'capybara', '~> 2.1'
22
+
23
+ # To use debugger
24
+ # gem 'pry-debugger'
data/Gemfile.lock ADDED
@@ -0,0 +1,250 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ csv_rb (0.5.2)
5
+ actionpack (>= 3.1)
6
+ csv (>= 3.1.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actioncable (5.2.3)
12
+ actionpack (= 5.2.3)
13
+ nio4r (~> 2.0)
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)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.2.3)
22
+ actionview (= 5.2.3)
23
+ activesupport (= 5.2.3)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.2.3)
29
+ activesupport (= 5.2.3)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.2.3)
35
+ activesupport (= 5.2.3)
36
+ 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)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.3)
48
+ concurrent-ruby (~> 1.0, >= 1.0.2)
49
+ i18n (>= 0.7, < 2)
50
+ minitest (~> 5.1)
51
+ 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)
56
+ capybara (2.18.0)
57
+ addressable
58
+ mini_mime (>= 0.1.3)
59
+ nokogiri (>= 1.3.3)
60
+ rack (>= 1.0.0)
61
+ rack-test (>= 0.5.4)
62
+ xpath (>= 2.0, < 4.0)
63
+ coderay (1.1.2)
64
+ concurrent-ruby (1.1.5)
65
+ coveralls (0.8.23)
66
+ json (>= 1.8, < 3)
67
+ simplecov (~> 0.16.1)
68
+ term-ansicolor (~> 1.3)
69
+ thor (>= 0.19.4, < 2.0)
70
+ tins (~> 1.6)
71
+ crass (1.0.4)
72
+ csv (3.1.1)
73
+ daemons (1.3.1)
74
+ diff-lcs (1.3)
75
+ docile (1.3.1)
76
+ erubi (1.8.0)
77
+ eventmachine (1.2.7)
78
+ ffi (1.11.1)
79
+ formatador (0.2.5)
80
+ globalid (0.4.2)
81
+ activesupport (>= 4.2.0)
82
+ growl (1.0.3)
83
+ guard (2.15.0)
84
+ formatador (>= 0.2.4)
85
+ listen (>= 2.7, < 4.0)
86
+ lumberjack (>= 1.0.12, < 2.0)
87
+ nenv (~> 0.1)
88
+ notiffany (~> 0.0)
89
+ pry (>= 0.9.12)
90
+ shellany (~> 0.0)
91
+ thor (>= 0.18.1)
92
+ guard-compat (1.2.1)
93
+ guard-rspec (4.7.3)
94
+ guard (~> 2.1)
95
+ guard-compat (~> 1.1)
96
+ rspec (>= 2.99.0, < 4.0)
97
+ i18n (1.6.0)
98
+ concurrent-ruby (~> 1.0)
99
+ jquery-rails (4.3.3)
100
+ rails-dom-testing (>= 1, < 3)
101
+ railties (>= 4.2.0)
102
+ 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)
109
+ crass (~> 1.0.2)
110
+ nokogiri (>= 1.5.9)
111
+ lumberjack (1.0.13)
112
+ mail (2.7.1)
113
+ mini_mime (>= 0.1.1)
114
+ marcel (0.3.3)
115
+ mimemagic (~> 0.3.2)
116
+ method_source (0.9.2)
117
+ mimemagic (0.3.3)
118
+ mini_mime (1.0.1)
119
+ mini_portile2 (2.4.0)
120
+ minitest (5.11.3)
121
+ nenv (0.3.0)
122
+ nio4r (2.3.1)
123
+ nokogiri (1.10.3)
124
+ mini_portile2 (~> 2.4.0)
125
+ notiffany (0.1.1)
126
+ nenv (~> 0.1)
127
+ shellany (~> 0.0)
128
+ pry (0.12.2)
129
+ coderay (~> 1.1.0)
130
+ method_source (~> 0.9.0)
131
+ pry-nav (0.3.0)
132
+ pry (>= 0.9.10, < 0.13.0)
133
+ public_suffix (3.1.0)
134
+ rack (2.0.7)
135
+ rack-test (1.1.0)
136
+ 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)
147
+ bundler (>= 1.3.0)
148
+ railties (= 5.2.3)
149
+ sprockets-rails (>= 2.0.0)
150
+ rails-dom-testing (2.0.3)
151
+ activesupport (>= 4.2.0)
152
+ 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)
158
+ method_source
159
+ 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)
164
+ 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)
170
+ 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.0)
177
+ rspec-support (~> 3.8.0)
178
+ rspec-expectations (3.8.3)
179
+ diff-lcs (>= 1.2.0, < 2.0)
180
+ rspec-support (~> 3.8.0)
181
+ rspec-mocks (3.8.0)
182
+ 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.0)
193
+ ruby_dep (1.5.0)
194
+ rubyzip (1.2.3)
195
+ shellany (0.0.1)
196
+ simplecov (0.16.1)
197
+ docile (~> 1.1)
198
+ json (>= 1.8, < 3)
199
+ simplecov-html (~> 0.10.0)
200
+ simplecov-html (0.10.2)
201
+ sprockets (3.7.2)
202
+ concurrent-ruby (~> 1.0)
203
+ rack (> 1, < 3)
204
+ sprockets-rails (3.2.1)
205
+ actionpack (>= 4.0)
206
+ activesupport (>= 4.0)
207
+ sprockets (>= 3.0.0)
208
+ sqlite3 (1.4.1)
209
+ term-ansicolor (1.7.1)
210
+ tins (~> 1.0)
211
+ thin (1.7.2)
212
+ daemons (~> 1.0, >= 1.0.9)
213
+ eventmachine (~> 1.0, >= 1.0.4)
214
+ rack (>= 1, < 3)
215
+ thor (0.20.3)
216
+ thread_safe (0.3.6)
217
+ tins (1.20.3)
218
+ tzinfo (1.2.5)
219
+ thread_safe (~> 0.1)
220
+ websocket-driver (0.7.0)
221
+ websocket-extensions (>= 0.1.0)
222
+ websocket-extensions (0.1.3)
223
+ xpath (3.2.0)
224
+ nokogiri (~> 1.8)
225
+
226
+ PLATFORMS
227
+ ruby
228
+
229
+ DEPENDENCIES
230
+ bundler
231
+ capybara (~> 2.1)
232
+ coveralls
233
+ csv_rb!
234
+ growl
235
+ guard-rspec
236
+ jquery-rails
237
+ pry
238
+ pry-nav
239
+ rails (~> 5.2.3)
240
+ rake
241
+ rb-fsevent
242
+ rdoc
243
+ responders (~> 2.0)
244
+ roo
245
+ rspec-rails
246
+ sqlite3
247
+ thin
248
+
249
+ BUNDLED WITH
250
+ 2.0.1
data/Guardfile ADDED
@@ -0,0 +1,16 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'rspec', :version => 2 do
5
+ watch(%r{spec/.+_spec\.rb$})
6
+ watch('spec/spec_helper.rb') { "spec" }
7
+ watch(%r{spec/support/.+\.rb$}) { "spec" }
8
+
9
+ watch(%r{spec/dummy/app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
10
+ watch(%r{spec/dummy/app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
11
+ watch(%r{spec/dummy/app/controllers/.+\.rb$}) { ["spec/csvrb_renderer_spec.rb", "spec/csvrb_builder_spec.rb", "csvrb_request_spec.rb"] }
12
+ watch('lib/csv_rb/action_controller.rb') { ["spec/csvrb_renderer_spec.rb", "spec/csvrb_request_spec.rb"] }
13
+ watch('lib/csv_rb/template_handler.rb') { "spec/csvrb_builder_spec.rb" }
14
+ watch(%r{spec/dummy/app/mailers/.+\.rb$}) { "spec/csvrb_mailer_spec.rb" }
15
+ watch(%r{spec/dummy/app/views/.+\.erb}) { "spec/csvrb_request_spec.rb" }
16
+ end
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.