workbook_rails 0.1.1 → 0.2.1

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.
Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +12 -7
  3. data/Gemfile.lock +251 -179
  4. data/README.md +24 -30
  5. data/Rakefile +6 -15
  6. data/lib/tasks/workbook_rails_tasks.rake +2 -0
  7. data/lib/workbook_rails/action_controller.rb +20 -18
  8. data/lib/workbook_rails/engine.rb +8 -8
  9. data/lib/workbook_rails/template_handler.rb +9 -7
  10. data/lib/workbook_rails/version.rb +3 -1
  11. data/lib/workbook_rails.rb +3 -2
  12. data/spec/ci.rb +5 -1
  13. data/spec/dummy/Rakefile +3 -1
  14. data/spec/dummy/app/assets/config/manifest.js +3 -0
  15. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  16. data/spec/dummy/app/controllers/home_controller.rb +14 -20
  17. data/spec/dummy/app/controllers/likes_controller.rb +3 -1
  18. data/spec/dummy/app/controllers/users_controller.rb +4 -2
  19. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  20. data/spec/dummy/app/mailers/notifier.rb +6 -5
  21. data/spec/dummy/app/models/like.rb +2 -0
  22. data/spec/dummy/app/models/user.rb +2 -0
  23. data/spec/dummy/bin/bundle +3 -1
  24. data/spec/dummy/bin/rails +3 -1
  25. data/spec/dummy/bin/rake +2 -0
  26. data/spec/dummy/config/application.rb +9 -8
  27. data/spec/dummy/config/boot.rb +4 -2
  28. data/spec/dummy/config/environment.rb +3 -1
  29. data/spec/dummy/config/environments/development.rb +2 -0
  30. data/spec/dummy/config/environments/production.rb +2 -0
  31. data/spec/dummy/config/environments/test.rb +6 -4
  32. data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -0
  33. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -1
  34. data/spec/dummy/config/initializers/filter_parameter_logging.rb +2 -0
  35. data/spec/dummy/config/initializers/inflections.rb +2 -0
  36. data/spec/dummy/config/initializers/mime_types.rb +2 -0
  37. data/spec/dummy/config/initializers/secret_token.rb +3 -1
  38. data/spec/dummy/config/initializers/session_store.rb +2 -0
  39. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
  40. data/spec/dummy/config/routes.rb +13 -12
  41. data/spec/dummy/config.ru +3 -1
  42. data/spec/dummy/db/migrate/20120717192452_create_users.rb +3 -1
  43. data/spec/dummy/db/migrate/20121206210955_create_likes.rb +3 -1
  44. data/spec/dummy/db/schema.rb +19 -22
  45. data/spec/dummy/db/test.sqlite3 +0 -0
  46. data/spec/dummy/log/test.log +7332 -8068
  47. data/spec/spec_helper.rb +19 -12
  48. data/spec/template_handler_spec.rb +13 -16
  49. data/spec/test_7.2.sh +6 -0
  50. data/spec/test_8.0.sh +6 -0
  51. data/spec/test_8.1.sh +6 -0
  52. data/spec/test_all_rails.sh +10 -4
  53. data/spec/workbook_mailer_spec.rb +9 -4
  54. data/spec/workbook_renderer_spec.rb +22 -16
  55. data/spec/workbook_request_spec.rb +78 -77
  56. metadata +26 -142
  57. data/spec/test_3.2.sh +0 -4
  58. data/spec/test_4.0.sh +0 -4
  59. data/spec/test_4.1.sh +0 -4
  60. data/spec/test_4.2.sh +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1fd926c3fdeb525629c6923b117185e4a69eb9a8
4
- data.tar.gz: 0fad69c2f19078c7f0071a6d93eb0ba201c39e47
2
+ SHA256:
3
+ metadata.gz: 59888c905d996c59225f4f4f6b20ec16f0eb849cd30326f8f8c5f217eb0a766c
4
+ data.tar.gz: a94ef7862f9e37d3967c3312672d740e9b819673d2f9cd56b256457b353f4b61
5
5
  SHA512:
6
- metadata.gz: 5f4e7a1d55a326776cb12a32734cf9eec6046cfdebe6270fe3ecaceb9622be0dab18023b10112a19f6ee82171f63316b2df6201c88fea23289a95509ed0d154e
7
- data.tar.gz: 21925dac1cf348a03169609d9d4bcbb7c7697449f314397f82d6a8e5e0562a2961256e82f9dee0a0e5ffd30607eaf781fbb30c2aa92d43d60bc31baee48435ef
6
+ metadata.gz: 2918be57d144c3d6c219f2132768f5abe7eb932c2d6fcc260b13a1df71ccae024cff238911cd184cbe3318a581205cb9dad6f92f8dc6dc5d0d2092d2f0842d24
7
+ data.tar.gz: b5ed51f1aeb8922eeeeb76be199a31fed68b6b1eb4de3dd2921aeb69fc32d964952a395d5ddf92d14acd3e58308b7903f0e3320ce5af3b452499d1dbd2a46622
data/Gemfile CHANGED
@@ -1,21 +1,26 @@
1
- source "http://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Declare your gem's dependencies in axlsx_rails.gemspec.
4
6
  # Bundler will treat runtime dependencies like base dependencies, and
5
7
  # development dependencies will be added by default to the :development group.
6
8
  gemspec
7
9
 
8
- gem 'rails', "~> 4.2.0"
9
- gem 'responders', '~> 2.0'
10
-
11
- # jquery-rails is used by the dummy application
12
- gem "jquery-rails"
10
+ gem 'rails', '~> 8.1.0'
11
+ gem 'responders', '~> 3.0'
13
12
 
14
13
  # Declare any dependencies that are still in development here instead of in
15
14
  # your gemspec. These might include edge Rails or gems from your path or
16
15
  # Git. Remember to move these dependencies to your gemspec before releasing
17
16
  # your gem to rubygems.org.
18
- gem 'capybara', '~> 2.1'
19
17
 
20
18
  # To use debugger
21
19
  # gem 'pry-debugger'
20
+ group :test do
21
+ gem 'capybara', '~> 2.1'
22
+ gem 'rspec-rails'
23
+ gem 'simplecov', '>= 0.22', require: false
24
+ gem 'simplecov_json_formatter'
25
+ gem 'sqlite3'
26
+ end
data/Gemfile.lock CHANGED
@@ -1,188 +1,264 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workbook_rails (0.1.1)
5
- actionpack (>= 3.2)
4
+ workbook_rails (0.2.1)
5
+ actionpack (>= 7.2)
6
6
  workbook (>= 0.4.10)
7
7
 
8
8
  GEM
9
- remote: http://rubygems.org/
9
+ remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.2.6)
12
- actionpack (= 4.2.6)
13
- actionview (= 4.2.6)
14
- activejob (= 4.2.6)
15
- mail (~> 2.5, >= 2.5.4)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
17
- actionpack (4.2.6)
18
- actionview (= 4.2.6)
19
- activesupport (= 4.2.6)
20
- rack (~> 1.6)
21
- rack-test (~> 0.6.2)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- actionview (4.2.6)
25
- activesupport (= 4.2.6)
11
+ action_text-trix (2.1.19)
12
+ railties
13
+ actioncable (8.1.4.1)
14
+ actionpack (= 8.1.4.1)
15
+ activesupport (= 8.1.4.1)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (>= 0.6.1)
18
+ zeitwerk (~> 2.6)
19
+ actionmailbox (8.1.4.1)
20
+ actionpack (= 8.1.4.1)
21
+ activejob (= 8.1.4.1)
22
+ activerecord (= 8.1.4.1)
23
+ activestorage (= 8.1.4.1)
24
+ activesupport (= 8.1.4.1)
25
+ mail (>= 2.8.0)
26
+ actionmailer (8.1.4.1)
27
+ actionpack (= 8.1.4.1)
28
+ actionview (= 8.1.4.1)
29
+ activejob (= 8.1.4.1)
30
+ activesupport (= 8.1.4.1)
31
+ mail (>= 2.8.0)
32
+ rails-dom-testing (~> 2.2)
33
+ actionpack (8.1.4.1)
34
+ actionview (= 8.1.4.1)
35
+ activesupport (= 8.1.4.1)
36
+ nokogiri (>= 1.8.5)
37
+ rack (>= 2.2.4)
38
+ rack-session (>= 1.0.1)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.2)
41
+ rails-html-sanitizer (~> 1.6)
42
+ useragent (~> 0.16)
43
+ actiontext (8.1.4.1)
44
+ action_text-trix (~> 2.1.15)
45
+ actionpack (= 8.1.4.1)
46
+ activerecord (= 8.1.4.1)
47
+ activestorage (= 8.1.4.1)
48
+ activesupport (= 8.1.4.1)
49
+ globalid (>= 0.6.0)
50
+ nokogiri (>= 1.8.5)
51
+ actionview (8.1.4.1)
52
+ activesupport (= 8.1.4.1)
26
53
  builder (~> 3.1)
27
- erubis (~> 2.7.0)
28
- rails-dom-testing (~> 1.0, >= 1.0.5)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- activejob (4.2.6)
31
- activesupport (= 4.2.6)
32
- globalid (>= 0.3.0)
33
- activemodel (4.2.6)
34
- activesupport (= 4.2.6)
35
- builder (~> 3.1)
36
- activerecord (4.2.6)
37
- activemodel (= 4.2.6)
38
- activesupport (= 4.2.6)
39
- arel (~> 6.0)
40
- activesupport (4.2.6)
41
- i18n (~> 0.7)
42
- json (~> 1.7, >= 1.7.7)
43
- minitest (~> 5.1)
44
- thread_safe (~> 0.3, >= 0.3.4)
45
- tzinfo (~> 1.1)
46
- addressable (2.4.0)
47
- arel (6.0.3)
48
- axlsx (2.1.0.pre)
49
- htmlentities (~> 4.3.1)
50
- nokogiri (>= 1.4.1)
51
- rubyzip (~> 1.1.7)
52
- builder (3.2.2)
53
- capybara (2.7.0)
54
+ erubi (~> 1.11)
55
+ rails-dom-testing (~> 2.2)
56
+ rails-html-sanitizer (~> 1.6, >= 1.7.2)
57
+ activejob (8.1.4.1)
58
+ activesupport (= 8.1.4.1)
59
+ globalid (>= 0.3.6)
60
+ activemodel (8.1.4.1)
61
+ activesupport (= 8.1.4.1)
62
+ activerecord (8.1.4.1)
63
+ activemodel (= 8.1.4.1)
64
+ activesupport (= 8.1.4.1)
65
+ timeout (>= 0.4.0)
66
+ activestorage (8.1.4.1)
67
+ actionpack (= 8.1.4.1)
68
+ activejob (= 8.1.4.1)
69
+ activerecord (= 8.1.4.1)
70
+ activesupport (= 8.1.4.1)
71
+ marcel (~> 1.0)
72
+ activesupport (8.1.4.1)
73
+ base64
74
+ bigdecimal
75
+ concurrent-ruby (~> 1.0, >= 1.3.1)
76
+ connection_pool (>= 2.2.5)
77
+ drb
78
+ i18n (>= 1.6, < 2)
79
+ json
80
+ logger (>= 1.4.2)
81
+ minitest (>= 5.1)
82
+ securerandom (>= 0.3)
83
+ tzinfo (~> 2.0, >= 2.0.5)
84
+ uri (>= 0.13.1)
85
+ addressable (2.10.0)
86
+ public_suffix (>= 2.0.2, < 8.0)
87
+ base64 (0.3.0)
88
+ bigdecimal (4.1.3)
89
+ builder (3.3.0)
90
+ capybara (2.18.0)
54
91
  addressable
55
- mime-types (>= 1.16)
92
+ mini_mime (>= 0.1.3)
56
93
  nokogiri (>= 1.3.3)
57
94
  rack (>= 1.0.0)
58
95
  rack-test (>= 0.5.4)
59
- xpath (~> 2.0)
60
- coderay (1.1.1)
61
- concurrent-ruby (1.0.1)
62
- coveralls (0.8.13)
63
- json (~> 1.8)
64
- simplecov (~> 0.11.0)
65
- term-ansicolor (~> 1.3)
66
- thor (~> 0.19.1)
67
- tins (~> 1.6.0)
68
- diff-lcs (1.2.5)
69
- docile (1.1.5)
70
- erubis (2.7.0)
71
- globalid (0.3.6)
72
- activesupport (>= 4.1.0)
73
- growl (1.0.3)
74
- htmlentities (4.3.4)
75
- i18n (0.7.0)
76
- jquery-rails (4.1.1)
77
- rails-dom-testing (>= 1, < 3)
78
- railties (>= 4.2.0)
79
- thor (>= 0.14, < 2.0)
80
- json (1.8.3)
81
- loofah (2.0.3)
82
- nokogiri (>= 1.5.9)
83
- mail (2.6.4)
84
- mime-types (>= 1.16, < 4)
85
- method_source (0.8.2)
86
- mime-types (3.0)
87
- mime-types-data (~> 3.2015)
88
- mime-types-data (3.2016.0221)
89
- mini_portile2 (2.0.0)
90
- minitest (5.8.4)
91
- nokogiri (1.6.7.2)
92
- mini_portile2 (~> 2.0.0.rc2)
93
- pry (0.10.3)
94
- coderay (~> 1.1.0)
95
- method_source (~> 0.8.1)
96
- slop (~> 3.4)
97
- pry-nav (0.2.4)
98
- pry (>= 0.9.10, < 0.11.0)
99
- rack (1.6.4)
100
- rack-test (0.6.3)
101
- rack (>= 1.0)
102
- rails (4.2.6)
103
- actionmailer (= 4.2.6)
104
- actionpack (= 4.2.6)
105
- actionview (= 4.2.6)
106
- activejob (= 4.2.6)
107
- activemodel (= 4.2.6)
108
- activerecord (= 4.2.6)
109
- activesupport (= 4.2.6)
110
- bundler (>= 1.3.0, < 2.0)
111
- railties (= 4.2.6)
112
- sprockets-rails
113
- rails-deprecated_sanitizer (1.0.3)
114
- activesupport (>= 4.2.0.alpha)
115
- rails-dom-testing (1.0.7)
116
- activesupport (>= 4.2.0.beta, < 5.0)
117
- nokogiri (~> 1.6.0)
118
- rails-deprecated_sanitizer (>= 1.0.1)
119
- rails-html-sanitizer (1.0.3)
120
- loofah (~> 2.0)
121
- railties (4.2.6)
122
- actionpack (= 4.2.6)
123
- activesupport (= 4.2.6)
124
- rake (>= 0.8.7)
125
- thor (>= 0.18.1, < 2.0)
126
- rake (10.5.0)
127
- rb-fsevent (0.9.7)
128
- rchardet (1.6.1)
129
- responders (2.1.2)
130
- railties (>= 4.2.0, < 5.1)
131
- roo (2.3.2)
132
- nokogiri (~> 1)
133
- rubyzip (~> 1.1, < 2.0.0)
134
- rspec-core (3.4.4)
135
- rspec-support (~> 3.4.0)
136
- rspec-expectations (3.4.0)
96
+ xpath (>= 2.0, < 4.0)
97
+ caxlsx (4.5.0)
98
+ htmlentities (~> 4.3, >= 4.3.4)
99
+ marcel (~> 1.0)
100
+ nokogiri (~> 1.10, >= 1.10.4)
101
+ rubyzip (>= 2.4, < 4)
102
+ concurrent-ruby (1.3.8)
103
+ connection_pool (3.0.3)
104
+ crass (1.0.8)
105
+ csv (3.3.7)
106
+ date (3.6.0)
107
+ diff-lcs (1.6.2)
108
+ drb (2.2.3)
109
+ erb (6.0.7)
110
+ erubi (1.13.1)
111
+ globalid (1.4.0)
112
+ activesupport (>= 6.1)
113
+ htmlentities (4.4.2)
114
+ i18n (1.15.2)
115
+ concurrent-ruby (~> 1.0)
116
+ io-console (0.9.5)
117
+ irb (1.19.0)
118
+ pp (>= 0.6.0)
119
+ prism (>= 1.3.0)
120
+ rdoc (>= 4.0.0)
121
+ reline (>= 0.4.2)
122
+ json (2.21.2)
123
+ logger (1.7.0)
124
+ loofah (2.25.3)
125
+ crass (~> 1.0.2)
126
+ nokogiri (>= 1.19.5)
127
+ mail (2.9.1)
128
+ logger
129
+ mini_mime (>= 0.1.1)
130
+ net-imap
131
+ net-pop
132
+ net-smtp
133
+ marcel (1.2.1)
134
+ mini_mime (1.1.5)
135
+ mini_portile2 (2.8.9)
136
+ minitest (6.1.0)
137
+ drb (~> 2.0)
138
+ prism (>= 1.5, < 3)
139
+ net-imap (0.6.8)
140
+ date
141
+ net-protocol
142
+ net-pop (0.1.2)
143
+ net-protocol
144
+ net-protocol (0.4.0)
145
+ timeout
146
+ net-smtp (0.5.2)
147
+ net-protocol
148
+ nio4r (2.7.5)
149
+ nokogiri (1.19.7)
150
+ mini_portile2 (~> 2.8.2)
151
+ racc (~> 1.4)
152
+ pp (0.6.4)
153
+ prettyprint
154
+ prettyprint (0.2.1)
155
+ prism (2.1.0)
156
+ public_suffix (7.0.5)
157
+ racc (1.8.1)
158
+ rack (3.2.9)
159
+ rack-session (2.1.2)
160
+ base64 (>= 0.1.0)
161
+ rack (>= 3.0.0)
162
+ rack-test (2.3.0)
163
+ rack (>= 1.3)
164
+ rackup (2.3.1)
165
+ rack (>= 3)
166
+ rails (8.1.4.1)
167
+ actioncable (= 8.1.4.1)
168
+ actionmailbox (= 8.1.4.1)
169
+ actionmailer (= 8.1.4.1)
170
+ actionpack (= 8.1.4.1)
171
+ actiontext (= 8.1.4.1)
172
+ actionview (= 8.1.4.1)
173
+ activejob (= 8.1.4.1)
174
+ activemodel (= 8.1.4.1)
175
+ activerecord (= 8.1.4.1)
176
+ activestorage (= 8.1.4.1)
177
+ activesupport (= 8.1.4.1)
178
+ bundler (>= 1.15.0)
179
+ railties (= 8.1.4.1)
180
+ rails-dom-testing (2.3.0)
181
+ activesupport (>= 5.0.0)
182
+ minitest
183
+ nokogiri (>= 1.6)
184
+ rails-html-sanitizer (1.7.2)
185
+ loofah (~> 2.25, >= 2.25.3)
186
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
187
+ railties (8.1.4.1)
188
+ actionpack (= 8.1.4.1)
189
+ activesupport (= 8.1.4.1)
190
+ irb (~> 1.13)
191
+ rackup (>= 1.0.0)
192
+ rake (>= 12.2)
193
+ thor (~> 1.0, >= 1.2.2)
194
+ tsort (>= 0.2)
195
+ zeitwerk (~> 2.6)
196
+ rake (13.4.2)
197
+ rbs (4.2.0)
198
+ logger
199
+ prism (>= 1.6.0)
200
+ tsort
201
+ rchardet (1.10.2)
202
+ rdoc (8.1.0)
203
+ erb
204
+ prism (>= 1.6.0)
205
+ rbs (>= 4.0.0)
206
+ tsort
207
+ reline (0.7.0)
208
+ io-console (~> 0.5)
209
+ responders (3.2.1)
210
+ actionpack (>= 7.0)
211
+ railties (>= 7.0)
212
+ rspec-core (3.13.7)
213
+ rspec-support (~> 3.13.0)
214
+ rspec-expectations (3.13.6)
137
215
  diff-lcs (>= 1.2.0, < 2.0)
138
- rspec-support (~> 3.4.0)
139
- rspec-mocks (3.4.1)
216
+ rspec-support (~> 3.13.0)
217
+ rspec-mocks (3.13.9)
140
218
  diff-lcs (>= 1.2.0, < 2.0)
141
- rspec-support (~> 3.4.0)
142
- rspec-rails (3.4.2)
143
- actionpack (>= 3.0, < 4.3)
144
- activesupport (>= 3.0, < 4.3)
145
- railties (>= 3.0, < 4.3)
146
- rspec-core (~> 3.4.0)
147
- rspec-expectations (~> 3.4.0)
148
- rspec-mocks (~> 3.4.0)
149
- rspec-support (~> 3.4.0)
150
- rspec-support (3.4.1)
151
- ruby-ole (1.2.12)
152
- rubyzip (1.1.7)
153
- simplecov (0.11.2)
154
- docile (~> 1.1.0)
155
- json (~> 1.8)
156
- simplecov-html (~> 0.10.0)
157
- simplecov-html (0.10.0)
158
- slop (3.6.0)
159
- spreadsheet (1.1.2)
160
- ruby-ole (>= 1.0)
161
- sprockets (3.6.0)
219
+ rspec-support (~> 3.13.0)
220
+ rspec-rails (8.1.0)
221
+ actionpack (>= 7.2)
222
+ activesupport (>= 7.2)
223
+ railties (>= 7.2)
224
+ rspec-core (>= 3.13.0, < 5.0.0)
225
+ rspec-expectations (>= 3.13.0, < 5.0.0)
226
+ rspec-mocks (>= 3.13.0, < 5.0.0)
227
+ rspec-support (>= 3.13.0, < 5.0.0)
228
+ rspec-support (3.13.8)
229
+ ruby-ole (1.2.13.1)
230
+ rubyzip (3.7.0)
231
+ securerandom (0.4.1)
232
+ simplecov (1.3.2)
233
+ simplecov_json_formatter (0.1.4)
234
+ spreadsheet (1.3.5)
235
+ bigdecimal
236
+ logger
237
+ ruby-ole
238
+ sqlite3 (2.10.2)
239
+ mini_portile2 (~> 2.8.0)
240
+ thor (1.5.0)
241
+ timeout (0.6.1)
242
+ tsort (0.2.0)
243
+ tzinfo (2.0.6)
162
244
  concurrent-ruby (~> 1.0)
163
- rack (> 1, < 3)
164
- sprockets-rails (3.0.4)
165
- actionpack (>= 4.0)
166
- activesupport (>= 4.0)
167
- sprockets (>= 3.0.0)
168
- sqlite3 (1.3.11)
169
- term-ansicolor (1.3.2)
170
- tins (~> 1.0)
171
- thor (0.19.1)
172
- thread_safe (0.3.5)
173
- tins (1.6.0)
174
- tzinfo (1.2.2)
175
- thread_safe (~> 0.1)
176
- workbook (0.5)
177
- axlsx (~> 2.1.0.pre)
178
- json (~> 1.8)
179
- nokogiri (~> 1.6)
180
- rake (~> 10.0)
181
- rchardet (~> 1.3)
182
- roo (~> 2.3)
183
- spreadsheet (~> 1.0)
184
- xpath (2.0.0)
185
- nokogiri (~> 1.3)
245
+ uri (1.1.2)
246
+ useragent (0.16.11)
247
+ websocket-driver (0.9.0)
248
+ base64
249
+ websocket-extensions (>= 0.2.0)
250
+ websocket-extensions (0.2.0)
251
+ workbook (0.9.1)
252
+ caxlsx (> 3.0)
253
+ csv (> 3.0.0)
254
+ json (> 2.3)
255
+ nokogiri (> 1.10)
256
+ rchardet (>= 1.8.0)
257
+ rubyzip (>= 1.2.1, > 1.2)
258
+ spreadsheet (> 1.2)
259
+ xpath (3.2.0)
260
+ nokogiri (~> 1.8)
261
+ zeitwerk (2.8.3)
186
262
 
187
263
  PLATFORMS
188
264
  ruby
@@ -190,18 +266,14 @@ PLATFORMS
190
266
  DEPENDENCIES
191
267
  bundler
192
268
  capybara (~> 2.1)
193
- coveralls
194
- growl
195
- jquery-rails
196
- pry
197
- pry-nav
198
- rails (~> 4.2.0)
269
+ rails (~> 8.1.0)
199
270
  rake
200
- rb-fsevent
201
- responders (~> 2.0)
271
+ responders (~> 3.0)
202
272
  rspec-rails
273
+ simplecov (>= 0.22)
274
+ simplecov_json_formatter
203
275
  sqlite3
204
276
  workbook_rails!
205
277
 
206
278
  BUNDLED WITH
207
- 1.11.2
279
+ 4.1.0
data/README.md CHANGED
@@ -3,13 +3,12 @@ Workbook-Rails &mdash; Workbook templates for Rails views
3
3
 
4
4
  [![Gem
5
5
  Version](https://badge.fury.io/rb/workbook_rails.svg)](http://badge.fury.io/rb/workbook_rails)
6
- [![Build Status](https://secure.travis-ci.org/Programatica/workbook_rails.png?branch=master)](http://travis-ci.org/Programatica/workbook_rails)
7
- [![Dependency Status](https://gemnasium.com/Programatica/workbook_rails.png?branch=master)](https://gemnasium.com/Programatica/workbook_rails)
8
- [![Coverage
9
- Status](https://coveralls.io/repos/Programatica/workbook_rails/badge.png)](https://coveralls.io/r/Programatica/workbook_rails)
6
+ [![Build Status](https://github.com/scambra/workbook_rails/actions/workflows/ruby.yml/badge.svg)](https://github.com/scambra/workbook_rails/actions/workflows/ruby.yml)
7
+ [Code quality and coverage on Qlty](https://qlty.sh/gh/scambra/projects/workbook_rails)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
10
9
 
11
10
 
12
- ##Installation
11
+ ## Installation
13
12
 
14
13
  In your Gemfile:
15
14
 
@@ -17,21 +16,22 @@ In your Gemfile:
17
16
  gem 'workbook_rails'
18
17
  ```
19
18
 
20
- ##Requirements
19
+ ## Requirements
21
20
 
22
- * Rails 3.2, 4.0, 4.1 or 4.2 (tested)
21
+ * Ruby 3.2 or newer
22
+ * Rails >= 7.2 and <= 8.1 (tested)
23
23
  * **Workbook 0.4.16 requires Axlsx 2.0.1, which requires rubyzip 1.0.0**
24
24
  * You must use `render_to_string` to render a mail attachment.
25
25
 
26
- ##FYI
26
+ ## FYI
27
27
 
28
28
  * This gem depends on [Workbook](https://github.com/murb/workbook). See [README](https://github.com/murb/workbook) or [rdoc](http://www.rubydoc.info/github/murb/workbook) for usage.
29
29
 
30
- ##Usage
30
+ ## Usage
31
31
 
32
32
  Workbook-Rails provides a renderer and a template handler. It adds the `:xlsx` and `:xls` formats and parses `.wb` templates. This lets you take all the [Workbook](https://github.com/murb/workbook) code out of your controller or model and place it inside the template, where view code belongs!
33
33
 
34
- ###Controller
34
+ ### Controller
35
35
 
36
36
  To use Workbook-Rails set your instance variables in your controller and configure the response if needed:
37
37
 
@@ -46,7 +46,7 @@ class ButtonController < ApplicationController
46
46
  end
47
47
  ```
48
48
 
49
- ###Template
49
+ ### Template
50
50
 
51
51
  Create the template with the `.xlsx.wb` extension (`action_name.xlsx.wb` for example.) [**Watch out for typos!**](#troubleshooting) In the template, use workbook variable to create your spreadsheet:
52
52
 
@@ -63,7 +63,7 @@ Remember, like in `erb` templates, view helpers are available to use the `.wb` t
63
63
 
64
64
  That's it. Call your action and your spreadsheet will be delivered.
65
65
 
66
- ###Rendering Options
66
+ ### Rendering Options
67
67
 
68
68
  You can call render in any of the following ways:
69
69
 
@@ -78,7 +78,7 @@ render xlsx: 'buttons'
78
78
  render xlsx: 'latest_buttons', template: 'featured/latest'
79
79
  ```
80
80
 
81
- ###Multi-format Templates
81
+ ### Multi-format Templates
82
82
 
83
83
  You can create a template with `.wb` extension, without format, and use for generating different spreadsheets formats, such as xls and xlsx, using respond_to and format param.
84
84
 
@@ -91,7 +91,7 @@ respond_to do |format|
91
91
  end
92
92
  ```
93
93
 
94
- ###Disposition
94
+ ### Disposition
95
95
 
96
96
  To specify a disposition (such as `inline` so the spreadsheet is opened inside the browser), use the `disposition` option:
97
97
 
@@ -101,7 +101,7 @@ render xlsx: "buttons", disposition: 'inline'
101
101
 
102
102
  If `render xlsx:` is called, the disposition defaults to `attachment`.
103
103
 
104
- ###File name
104
+ ### File name
105
105
 
106
106
  If Rails calls Workbook through default channels (because you use `format.xlsx {}` for example) you must set the filename using the response header:
107
107
 
@@ -120,13 +120,7 @@ render xlsx: 'buttons'
120
120
  render xlsx: 'latest_buttons', template: 'featured/latest'
121
121
  ```
122
122
 
123
- If that fails, pass the `:filename` parameter:
124
-
125
- ```ruby
126
- render xlsx: "action_or_template", filename: "my_new_filename.xlsx"
127
- ```
128
-
129
- ###Partials
123
+ ### Partials
130
124
 
131
125
  Partials work as expected:
132
126
 
@@ -143,7 +137,7 @@ sheet.name = "Cover Sheet"
143
137
  sheet.table.push ['Cover', 'Sheet']
144
138
  ```
145
139
 
146
- ###Mailers
140
+ ### Mailers
147
141
 
148
142
  To use an xlsx template to render a mail attachment, use the following syntax:
149
143
 
@@ -160,16 +154,16 @@ end
160
154
  * If the route specifies or suggests the `:xlsx` format you do not need to specify `formats` or `handlers`.
161
155
  * If the template (`users/export`) can refer to only one file (the xlsx.axlsx template), you do not need to specify `handlers`, provided the `formats` includes `:xlsx`.
162
156
 
163
- ###Scripts
157
+ ### Scripts
164
158
 
165
159
  To generate a template within a script, you need to instantiate an ActionView context. Here are two gists showing how to perform this:
166
160
 
167
161
  * [Using rails runner](https://gist.github.com/straydogstudio/323139591f2cc5d48fbc)
168
162
  * [Without rails runner](https://gist.github.com/straydogstudio/dceb775ead81470cea70)
169
163
 
170
- ##Troubleshooting
164
+ ## Troubleshooting
171
165
 
172
- ###Mispellings
166
+ ### Mispellings
173
167
 
174
168
  **It is easy to get the spelling wrong in the extension name, the format.xlsx statement, or in a render call.** Here are some possibilities:
175
169
 
@@ -198,19 +192,19 @@ If the request format matches you should be able to call:
198
192
 
199
193
  This is a breaking change if you have the old syntax!
200
194
 
201
- ###What to do
195
+ ### What to do
202
196
 
203
197
  If you are having problems, try to isolate the issue. Use the console or a script to make sure your data is good. Then create the spreadsheet line by line without Workbook-Rails to see if you are having Workbook problems. If you can manually create the spreadsheet, create an issue and we will work it out.
204
198
 
205
- ##Dependencies
199
+ ## Dependencies
206
200
 
207
201
  - [Rails](https://github.com/rails/rails)
208
202
  - [Workbook](https://github.com/murb/workbook)
209
203
 
210
- ##Authors
204
+ ## Authors
211
205
 
212
206
  * [Sergio Cambra](https://github.com/scambra)
213
207
 
214
- ##Thanks
208
+ ## Thanks
215
209
 
216
210
  Many thanks to [straydogstudio](https://github.com/straydogstudio) for [axlsx_rails](https://github.com/straydogstudio/axlsx_rails), which this gem is based in.