axlsx_rails 0.5.2 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +9 -1
- data/Gemfile +22 -9
- data/Gemfile.lock +155 -137
- data/Gemfile.lock.4.2 +3 -3
- data/Gemfile.lock.5.1 +2 -2
- data/{Gemfile.lock.5.0 → Gemfile.lock.5.2} +23 -68
- data/README.md +63 -38
- data/lib/axlsx_rails/template_handler.rb +10 -3
- data/lib/axlsx_rails/version.rb +1 -1
- data/lib/axlsx_rails.rb +2 -0
- data/spec/axlsx_builder_spec.rb +15 -2
- data/spec/axlsx_request_spec.rb +16 -13
- data/spec/ci.rb +8 -5
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/environments/development.rb +2 -2
- data/spec/dummy_4/db/test.sqlite3 +0 -0
- data/spec/dummy_4/log/test.log +326 -0
- data/spec/dummy_5/db/test.sqlite3 +0 -0
- data/spec/dummy_5/log/test.log +5 -0
- data/spec/{dummy_5 → dummy_5.0}/Rakefile +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/assets/javascripts/application.js +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/assets/stylesheets/application.css +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/controllers/application_controller.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/controllers/home_controller.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/controllers/likes_controller.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/controllers/users_controller.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/helpers/application_helper.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/mailers/notifier.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/models/like.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/models/user.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/home/_cover_sheet.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/home/index.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/home/index.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/home/only_html.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/home/useheader.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/home/withpartial.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/layouts/application.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/layouts/users.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/likes/index.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/likes/index.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/notifier/instructions.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/notifier/instructions.txt.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/users/export.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/users/index.html.erb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/users/index.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/users/noaction.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/users/respond_with.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/app/views/users/send_instructions.xlsx.axlsx +0 -0
- data/spec/{dummy_5 → dummy_5.0}/bin/bundle +0 -0
- data/spec/{dummy_5 → dummy_5.0}/bin/rails +0 -0
- data/spec/{dummy_5 → dummy_5.0}/bin/rake +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/application.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/boot.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/database.yml +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/environment.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/environments/development.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/environments/production.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/environments/test.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/cookies_serializer.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/filter_parameter_logging.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/inflections.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/mime_types.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/secret_token.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/session_store.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/initializers/wrap_parameters.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/locales/en.yml +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/routes.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config/secrets.yml +0 -0
- data/spec/{dummy_5 → dummy_5.0}/config.ru +0 -0
- data/spec/{dummy_5 → dummy_5.0}/db/migrate/20120717192452_create_users.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/db/migrate/20121206210955_create_likes.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/db/schema.rb +0 -0
- data/spec/{dummy_5 → dummy_5.0}/public/404.html +0 -0
- data/spec/{dummy_5 → dummy_5.0}/public/422.html +0 -0
- data/spec/{dummy_5 → dummy_5.0}/public/500.html +0 -0
- data/spec/{dummy_5 → dummy_5.0}/public/favicon.ico +0 -0
- data/spec/dummy_5.1/Rakefile +6 -0
- data/spec/dummy_5.1/app/assets/javascripts/application.js +13 -0
- data/spec/dummy_5.1/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy_5.1/app/controllers/application_controller.rb +5 -0
- data/spec/dummy_5.1/app/controllers/home_controller.rb +56 -0
- data/spec/dummy_5.1/app/controllers/likes_controller.rb +18 -0
- data/spec/dummy_5.1/app/controllers/users_controller.rb +37 -0
- data/spec/dummy_5.1/app/helpers/application_helper.rb +2 -0
- data/spec/dummy_5.1/app/mailers/notifier.rb +14 -0
- data/spec/dummy_5.1/app/models/like.rb +3 -0
- data/spec/dummy_5.1/app/models/user.rb +10 -0
- data/spec/dummy_5.1/app/views/home/_cover_sheet.xlsx.axlsx +3 -0
- data/spec/dummy_5.1/app/views/home/index.html.erb +4 -0
- data/spec/dummy_5.1/app/views/home/index.xlsx.axlsx +8 -0
- data/spec/dummy_5.1/app/views/home/only_html.html.erb +1 -0
- data/spec/dummy_5.1/app/views/home/useheader.xlsx.axlsx +8 -0
- data/spec/dummy_5.1/app/views/home/withpartial.xlsx.axlsx +9 -0
- data/spec/dummy_5.1/app/views/layouts/application.html.erb +12 -0
- data/spec/dummy_5.1/app/views/layouts/users.html.erb +12 -0
- data/spec/dummy_5.1/app/views/likes/index.html.erb +17 -0
- data/spec/dummy_5.1/app/views/likes/index.xlsx.axlsx +7 -0
- data/spec/dummy_5.1/app/views/notifier/instructions.html.erb +14 -0
- data/spec/dummy_5.1/app/views/notifier/instructions.txt.erb +6 -0
- data/spec/dummy_5.1/app/views/users/export.xlsx.axlsx +8 -0
- data/spec/dummy_5.1/app/views/users/index.html.erb +23 -0
- data/spec/dummy_5.1/app/views/users/index.xlsx.axlsx +1 -0
- data/spec/dummy_5.1/app/views/users/noaction.xlsx.axlsx +1 -0
- data/spec/dummy_5.1/app/views/users/respond_with.xlsx.axlsx +8 -0
- data/spec/dummy_5.1/app/views/users/send_instructions.xlsx.axlsx +5 -0
- data/spec/dummy_5.1/bin/bundle +3 -0
- data/spec/dummy_5.1/bin/rails +4 -0
- data/spec/dummy_5.1/bin/rake +4 -0
- data/spec/dummy_5.1/config/application.rb +23 -0
- data/spec/dummy_5.1/config/boot.rb +5 -0
- data/spec/dummy_5.1/config/database.yml +25 -0
- data/spec/dummy_5.1/config/environment.rb +5 -0
- data/spec/dummy_5.1/config/environments/development.rb +37 -0
- data/spec/dummy_5.1/config/environments/production.rb +83 -0
- data/spec/dummy_5.1/config/environments/test.rb +40 -0
- data/spec/dummy_5.1/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy_5.1/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy_5.1/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy_5.1/config/initializers/inflections.rb +16 -0
- data/spec/dummy_5.1/config/initializers/mime_types.rb +4 -0
- data/spec/dummy_5.1/config/initializers/secret_token.rb +2 -0
- data/spec/dummy_5.1/config/initializers/session_store.rb +3 -0
- data/spec/dummy_5.1/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy_5.1/config/locales/en.yml +23 -0
- data/spec/dummy_5.1/config/routes.rb +17 -0
- data/spec/dummy_5.1/config/secrets.yml +22 -0
- data/spec/dummy_5.1/config.ru +4 -0
- data/spec/dummy_5.1/db/migrate/20120717192452_create_users.rb +12 -0
- data/spec/dummy_5.1/db/migrate/20121206210955_create_likes.rb +10 -0
- data/spec/dummy_5.1/db/schema.rb +31 -0
- data/spec/dummy_5.1/db/test.sqlite3 +0 -0
- data/spec/dummy_5.1/log/test.log +3645 -0
- data/spec/dummy_5.1/public/404.html +67 -0
- data/spec/dummy_5.1/public/422.html +67 -0
- data/spec/dummy_5.1/public/500.html +66 -0
- data/spec/dummy_5.1/public/favicon.ico +0 -0
- data/spec/dummy_5.2/Rakefile +6 -0
- data/spec/dummy_5.2/app/assets/javascripts/application.js +13 -0
- data/spec/dummy_5.2/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy_5.2/app/controllers/application_controller.rb +5 -0
- data/spec/dummy_5.2/app/controllers/home_controller.rb +56 -0
- data/spec/dummy_5.2/app/controllers/likes_controller.rb +18 -0
- data/spec/dummy_5.2/app/controllers/users_controller.rb +37 -0
- data/spec/dummy_5.2/app/helpers/application_helper.rb +2 -0
- data/spec/dummy_5.2/app/mailers/notifier.rb +14 -0
- data/spec/dummy_5.2/app/models/like.rb +3 -0
- data/spec/dummy_5.2/app/models/user.rb +10 -0
- data/spec/dummy_5.2/app/views/home/_cover_sheet.xlsx.axlsx +3 -0
- data/spec/dummy_5.2/app/views/home/index.html.erb +4 -0
- data/spec/dummy_5.2/app/views/home/index.xlsx.axlsx +8 -0
- data/spec/dummy_5.2/app/views/home/only_html.html.erb +1 -0
- data/spec/dummy_5.2/app/views/home/useheader.xlsx.axlsx +8 -0
- data/spec/dummy_5.2/app/views/home/withpartial.xlsx.axlsx +9 -0
- data/spec/dummy_5.2/app/views/layouts/application.html.erb +12 -0
- data/spec/dummy_5.2/app/views/layouts/users.html.erb +12 -0
- data/spec/dummy_5.2/app/views/likes/index.html.erb +17 -0
- data/spec/dummy_5.2/app/views/likes/index.xlsx.axlsx +7 -0
- data/spec/dummy_5.2/app/views/notifier/instructions.html.erb +14 -0
- data/spec/dummy_5.2/app/views/notifier/instructions.txt.erb +6 -0
- data/spec/dummy_5.2/app/views/users/export.xlsx.axlsx +8 -0
- data/spec/dummy_5.2/app/views/users/index.html.erb +23 -0
- data/spec/dummy_5.2/app/views/users/index.xlsx.axlsx +1 -0
- data/spec/dummy_5.2/app/views/users/noaction.xlsx.axlsx +1 -0
- data/spec/dummy_5.2/app/views/users/respond_with.xlsx.axlsx +8 -0
- data/spec/dummy_5.2/app/views/users/send_instructions.xlsx.axlsx +5 -0
- data/spec/dummy_5.2/bin/bundle +3 -0
- data/spec/dummy_5.2/bin/rails +4 -0
- data/spec/dummy_5.2/bin/rake +4 -0
- data/spec/dummy_5.2/config/application.rb +23 -0
- data/spec/dummy_5.2/config/boot.rb +5 -0
- data/spec/dummy_5.2/config/database.yml +25 -0
- data/spec/dummy_5.2/config/environment.rb +5 -0
- data/spec/dummy_5.2/config/environments/development.rb +37 -0
- data/spec/dummy_5.2/config/environments/production.rb +83 -0
- data/spec/dummy_5.2/config/environments/test.rb +40 -0
- data/spec/dummy_5.2/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy_5.2/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy_5.2/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy_5.2/config/initializers/inflections.rb +16 -0
- data/spec/dummy_5.2/config/initializers/mime_types.rb +4 -0
- data/spec/dummy_5.2/config/initializers/secret_token.rb +2 -0
- data/spec/dummy_5.2/config/initializers/session_store.rb +3 -0
- data/spec/dummy_5.2/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy_5.2/config/locales/en.yml +23 -0
- data/spec/dummy_5.2/config/routes.rb +17 -0
- data/spec/dummy_5.2/config/secrets.yml +22 -0
- data/spec/dummy_5.2/config.ru +4 -0
- data/spec/dummy_5.2/db/migrate/20120717192452_create_users.rb +12 -0
- data/spec/dummy_5.2/db/migrate/20121206210955_create_likes.rb +10 -0
- data/spec/dummy_5.2/db/schema.rb +31 -0
- data/spec/dummy_5.2/db/test.sqlite3 +0 -0
- data/spec/dummy_5.2/log/test.log +3645 -0
- data/spec/dummy_5.2/public/404.html +67 -0
- data/spec/dummy_5.2/public/422.html +67 -0
- data/spec/dummy_5.2/public/500.html +66 -0
- data/spec/dummy_5.2/public/favicon.ico +0 -0
- data/spec/dummy_6.0/Rakefile +6 -0
- data/spec/dummy_6.0/app/assets/javascripts/application.js +13 -0
- data/spec/dummy_6.0/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy_6.0/app/controllers/application_controller.rb +5 -0
- data/spec/dummy_6.0/app/controllers/home_controller.rb +56 -0
- data/spec/dummy_6.0/app/controllers/likes_controller.rb +18 -0
- data/spec/dummy_6.0/app/controllers/users_controller.rb +37 -0
- data/spec/dummy_6.0/app/helpers/application_helper.rb +2 -0
- data/spec/dummy_6.0/app/mailers/notifier.rb +14 -0
- data/spec/dummy_6.0/app/models/like.rb +3 -0
- data/spec/dummy_6.0/app/models/user.rb +10 -0
- data/spec/dummy_6.0/app/views/home/_cover_sheet.xlsx.axlsx +3 -0
- data/spec/dummy_6.0/app/views/home/index.html.erb +4 -0
- data/spec/dummy_6.0/app/views/home/index.xlsx.axlsx +8 -0
- data/spec/dummy_6.0/app/views/home/only_html.html.erb +1 -0
- data/spec/dummy_6.0/app/views/home/useheader.xlsx.axlsx +8 -0
- data/spec/dummy_6.0/app/views/home/withpartial.xlsx.axlsx +9 -0
- data/spec/dummy_6.0/app/views/layouts/application.html.erb +12 -0
- data/spec/dummy_6.0/app/views/layouts/users.html.erb +12 -0
- data/spec/dummy_6.0/app/views/likes/index.html.erb +17 -0
- data/spec/dummy_6.0/app/views/likes/index.xlsx.axlsx +7 -0
- data/spec/dummy_6.0/app/views/notifier/instructions.html.erb +14 -0
- data/spec/dummy_6.0/app/views/notifier/instructions.txt.erb +6 -0
- data/spec/dummy_6.0/app/views/users/export.xlsx.axlsx +8 -0
- data/spec/dummy_6.0/app/views/users/index.html.erb +23 -0
- data/spec/dummy_6.0/app/views/users/index.xlsx.axlsx +1 -0
- data/spec/dummy_6.0/app/views/users/noaction.xlsx.axlsx +1 -0
- data/spec/dummy_6.0/app/views/users/respond_with.xlsx.axlsx +8 -0
- data/spec/dummy_6.0/app/views/users/send_instructions.xlsx.axlsx +5 -0
- data/spec/dummy_6.0/bin/bundle +3 -0
- data/spec/dummy_6.0/bin/rails +4 -0
- data/spec/dummy_6.0/bin/rake +4 -0
- data/spec/dummy_6.0/config/application.rb +23 -0
- data/spec/dummy_6.0/config/boot.rb +5 -0
- data/spec/dummy_6.0/config/database.yml +25 -0
- data/spec/dummy_6.0/config/environment.rb +5 -0
- data/spec/dummy_6.0/config/environments/development.rb +37 -0
- data/spec/dummy_6.0/config/environments/production.rb +83 -0
- data/spec/dummy_6.0/config/environments/test.rb +40 -0
- data/spec/dummy_6.0/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy_6.0/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy_6.0/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy_6.0/config/initializers/inflections.rb +16 -0
- data/spec/dummy_6.0/config/initializers/mime_types.rb +4 -0
- data/spec/dummy_6.0/config/initializers/secret_token.rb +2 -0
- data/spec/dummy_6.0/config/initializers/session_store.rb +3 -0
- data/spec/dummy_6.0/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy_6.0/config/locales/en.yml +23 -0
- data/spec/dummy_6.0/config/routes.rb +17 -0
- data/spec/dummy_6.0/config/secrets.yml +22 -0
- data/spec/dummy_6.0/config.ru +4 -0
- data/spec/dummy_6.0/db/migrate/20120717192452_create_users.rb +12 -0
- data/spec/dummy_6.0/db/migrate/20121206210955_create_likes.rb +10 -0
- data/spec/dummy_6.0/db/schema.rb +31 -0
- data/spec/dummy_6.0/public/404.html +67 -0
- data/spec/dummy_6.0/public/422.html +67 -0
- data/spec/dummy_6.0/public/500.html +66 -0
- data/spec/dummy_6.0/public/favicon.ico +0 -0
- data/spec/spec_helper.rb +12 -3
- data/spec/test_5.0.sh +1 -1
- data/spec/test_5.1.sh +1 -1
- data/spec/test_5.2.sh +16 -0
- data/spec/test_6.0.sh +16 -0
- data/spec/test_all_rails.sh +4 -2
- metadata +564 -231
@@ -17,46 +17,33 @@ PATH
|
|
17
17
|
GEM
|
18
18
|
remote: http://rubygems.org/
|
19
19
|
specs:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
websocket-driver (~> 0.6.1)
|
24
|
-
actionmailer (5.0.7)
|
25
|
-
actionpack (= 5.0.7)
|
26
|
-
actionview (= 5.0.7)
|
27
|
-
activejob (= 5.0.7)
|
28
|
-
mail (~> 2.5, >= 2.5.4)
|
29
|
-
rails-dom-testing (~> 2.0)
|
30
|
-
actionpack (5.0.7)
|
31
|
-
actionview (= 5.0.7)
|
32
|
-
activesupport (= 5.0.7)
|
20
|
+
actionpack (5.2.0)
|
21
|
+
actionview (= 5.2.0)
|
22
|
+
activesupport (= 5.2.0)
|
33
23
|
rack (~> 2.0)
|
34
|
-
rack-test (
|
24
|
+
rack-test (>= 0.6.3)
|
35
25
|
rails-dom-testing (~> 2.0)
|
36
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
37
|
-
actionview (5.0
|
38
|
-
activesupport (= 5.0
|
27
|
+
actionview (5.2.0)
|
28
|
+
activesupport (= 5.2.0)
|
39
29
|
builder (~> 3.1)
|
40
|
-
|
30
|
+
erubi (~> 1.4)
|
41
31
|
rails-dom-testing (~> 2.0)
|
42
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
43
|
-
|
44
|
-
activesupport (= 5.0
|
45
|
-
|
46
|
-
|
47
|
-
activesupport (= 5.0
|
48
|
-
|
49
|
-
|
50
|
-
activesupport (= 5.0.7)
|
51
|
-
arel (~> 7.0)
|
52
|
-
activesupport (5.0.7)
|
33
|
+
activemodel (5.2.0)
|
34
|
+
activesupport (= 5.2.0)
|
35
|
+
activerecord (5.2.0)
|
36
|
+
activemodel (= 5.2.0)
|
37
|
+
activesupport (= 5.2.0)
|
38
|
+
arel (>= 9.0)
|
39
|
+
activesupport (5.2.0)
|
53
40
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
54
41
|
i18n (>= 0.7, < 2)
|
55
42
|
minitest (~> 5.1)
|
56
43
|
tzinfo (~> 1.1)
|
57
44
|
addressable (2.5.2)
|
58
45
|
public_suffix (>= 2.0.2, < 4.0)
|
59
|
-
arel (
|
46
|
+
arel (9.0.0)
|
60
47
|
axlsx (2.0.1)
|
61
48
|
htmlentities (~> 4.3.1)
|
62
49
|
nokogiri (>= 1.4.1)
|
@@ -81,12 +68,10 @@ GEM
|
|
81
68
|
daemons (1.2.6)
|
82
69
|
diff-lcs (1.3)
|
83
70
|
docile (1.1.5)
|
84
|
-
|
85
|
-
eventmachine (1.2.
|
71
|
+
erubi (1.7.1)
|
72
|
+
eventmachine (1.2.7)
|
86
73
|
ffi (1.9.23)
|
87
74
|
formatador (0.2.5)
|
88
|
-
globalid (0.4.1)
|
89
|
-
activesupport (>= 4.2.0)
|
90
75
|
growl (1.0.3)
|
91
76
|
guard (2.14.2)
|
92
77
|
formatador (>= 0.2.4)
|
@@ -118,14 +103,11 @@ GEM
|
|
118
103
|
crass (~> 1.0.2)
|
119
104
|
nokogiri (>= 1.5.9)
|
120
105
|
lumberjack (1.0.13)
|
121
|
-
mail (2.7.0)
|
122
|
-
mini_mime (>= 0.1.1)
|
123
106
|
method_source (0.8.2)
|
124
107
|
mini_mime (1.0.0)
|
125
108
|
mini_portile2 (2.3.0)
|
126
109
|
minitest (5.11.3)
|
127
110
|
nenv (0.3.0)
|
128
|
-
nio4r (2.3.1)
|
129
111
|
nokogiri (1.8.2)
|
130
112
|
mini_portile2 (~> 2.3.0)
|
131
113
|
notiffany (0.1.1)
|
@@ -139,28 +121,16 @@ GEM
|
|
139
121
|
pry (>= 0.9.10, < 0.11.0)
|
140
122
|
public_suffix (3.0.2)
|
141
123
|
rack (2.0.5)
|
142
|
-
rack-test (0.
|
143
|
-
rack (>= 1.0)
|
144
|
-
rails (5.0.7)
|
145
|
-
actioncable (= 5.0.7)
|
146
|
-
actionmailer (= 5.0.7)
|
147
|
-
actionpack (= 5.0.7)
|
148
|
-
actionview (= 5.0.7)
|
149
|
-
activejob (= 5.0.7)
|
150
|
-
activemodel (= 5.0.7)
|
151
|
-
activerecord (= 5.0.7)
|
152
|
-
activesupport (= 5.0.7)
|
153
|
-
bundler (>= 1.3.0)
|
154
|
-
railties (= 5.0.7)
|
155
|
-
sprockets-rails (>= 2.0.0)
|
124
|
+
rack-test (1.0.0)
|
125
|
+
rack (>= 1.0, < 3)
|
156
126
|
rails-dom-testing (2.0.3)
|
157
127
|
activesupport (>= 4.2.0)
|
158
128
|
nokogiri (>= 1.6)
|
159
129
|
rails-html-sanitizer (1.0.4)
|
160
130
|
loofah (~> 2.2, >= 2.2.2)
|
161
|
-
railties (5.0
|
162
|
-
actionpack (= 5.0
|
163
|
-
activesupport (= 5.0
|
131
|
+
railties (5.2.0)
|
132
|
+
actionpack (= 5.2.0)
|
133
|
+
activesupport (= 5.2.0)
|
164
134
|
method_source
|
165
135
|
rake (>= 0.8.7)
|
166
136
|
thor (>= 0.18.1, < 2.0)
|
@@ -168,9 +138,6 @@ GEM
|
|
168
138
|
rb-fsevent (0.10.3)
|
169
139
|
rb-inotify (0.9.10)
|
170
140
|
ffi (>= 0.5.0, < 2)
|
171
|
-
responders (2.4.0)
|
172
|
-
actionpack (>= 4.2.0, < 5.3)
|
173
|
-
railties (>= 4.2.0, < 5.3)
|
174
141
|
roo (1.13.2)
|
175
142
|
nokogiri
|
176
143
|
rubyzip
|
@@ -208,13 +175,6 @@ GEM
|
|
208
175
|
slop (3.6.0)
|
209
176
|
spreadsheet (1.1.7)
|
210
177
|
ruby-ole (>= 1.0)
|
211
|
-
sprockets (3.7.1)
|
212
|
-
concurrent-ruby (~> 1.0)
|
213
|
-
rack (> 1, < 3)
|
214
|
-
sprockets-rails (3.2.1)
|
215
|
-
actionpack (>= 4.0)
|
216
|
-
activesupport (>= 4.0)
|
217
|
-
sprockets (>= 3.0.0)
|
218
178
|
sqlite3 (1.3.13)
|
219
179
|
term-ansicolor (1.6.0)
|
220
180
|
tins (~> 1.0)
|
@@ -227,10 +187,7 @@ GEM
|
|
227
187
|
tins (1.16.3)
|
228
188
|
tzinfo (1.2.5)
|
229
189
|
thread_safe (~> 0.1)
|
230
|
-
|
231
|
-
websocket-extensions (>= 0.1.0)
|
232
|
-
websocket-extensions (0.1.3)
|
233
|
-
xpath (3.0.0)
|
190
|
+
xpath (3.1.0)
|
234
191
|
nokogiri (~> 1.8)
|
235
192
|
|
236
193
|
PLATFORMS
|
@@ -247,10 +204,8 @@ DEPENDENCIES
|
|
247
204
|
jquery-rails
|
248
205
|
pry
|
249
206
|
pry-nav
|
250
|
-
rails (~> 5.0.0)
|
251
207
|
rake
|
252
208
|
rb-fsevent
|
253
|
-
responders (~> 2.0)
|
254
209
|
roo
|
255
210
|
rspec-rails
|
256
211
|
rubyzip
|
data/README.md
CHANGED
@@ -1,61 +1,54 @@
|
|
1
|
+
Notice: Community Axlsx organization
|
2
|
+
===================================================
|
3
|
+
All Axlsx related gems have been forked or moved to a community organization: http://github.com/caxlsx
|
4
|
+
* [Axlsx](http://github.com/caxlsx/caxlsx)
|
5
|
+
* [acts_as_caxlsx](http://github.com/caxlsx/acts_as_caxlsx)
|
6
|
+
* [axlsx_rails](http://github.com/caxlsx/axlsx_rails)
|
7
|
+
* [activeadmin-caxlsx](http://github.com/caxlsx/activeadmin-caxlsx)
|
8
|
+
|
9
|
+
The gems will be released as is as a starting point to allow releases of other gems that depend on these gems. Submit issues as usual.
|
10
|
+
|
11
|
+
Please consider helping develop and test these gems.
|
12
|
+
|
1
13
|
Axlsx-Rails — Spreadsheet templates for Rails
|
2
14
|
===================================================
|
3
15
|
|
4
|
-
[![Build Status](https://secure.travis-ci.org/
|
16
|
+
[![Build Status](https://secure.travis-ci.org/caxlsx/axlsx_rails.svg?branch=master)](http://travis-ci.org/caxlsx/axlsx_rails)
|
5
17
|
[![Gem
|
6
18
|
Version](https://badge.fury.io/rb/axlsx_rails.svg)](http://badge.fury.io/rb/axlsx_rails)
|
7
|
-
[![Dependency Status](https://gemnasium.com/straydogstudio/axlsx_rails.svg?branch=master)](https://gemnasium.com/straydogstudio/axlsx_rails)
|
8
19
|
[![Coverage
|
9
|
-
Status](https://coveralls.io/repos/
|
20
|
+
Status](https://coveralls.io/repos/caxlsx/axlsx_rails/badge.svg)](https://coveralls.io/r/caxlsx/axlsx_rails)
|
10
21
|
|
11
22
|
![Total downloads](http://ruby-gem-downloads-badge.herokuapp.com/axlsx_rails?type=total)
|
12
|
-
![Downloads for 0.
|
13
|
-
![Downloads for 0.5.
|
14
|
-
![Downloads for latest
|
23
|
+
![Downloads for 0.5.1](http://ruby-gem-downloads-badge.herokuapp.com/axlsx_rails/0.5.1?label=0.5.1)
|
24
|
+
![Downloads for 0.5.2](http://ruby-gem-downloads-badge.herokuapp.com/axlsx_rails/0.5.2?label=0.5.2)
|
25
|
+
![Downloads for 0.6.0 (latest)](http://ruby-gem-downloads-badge.herokuapp.com/axlsx_rails/0.6.0?label=0.6.0)
|
15
26
|
|
16
27
|
## Installation
|
17
28
|
|
18
29
|
In your Gemfile:
|
19
30
|
|
20
31
|
```ruby
|
21
|
-
gem 'rubyzip', '>= 1.2.1'
|
22
|
-
gem 'axlsx', git: 'https://github.com/randym/axlsx.git', ref: 'c8ac844'
|
23
32
|
gem 'axlsx_rails'
|
24
33
|
```
|
25
34
|
|
26
|
-
|
27
|
-
|
28
|
-
If `rubyzip 1.0.0` is needed:
|
29
|
-
|
30
|
-
```ruby
|
31
|
-
gem 'rubyzip', '= 1.0.0'
|
32
|
-
gem 'axlsx', '= 2.0.1'
|
33
|
-
gem 'axlsx_rails'
|
34
|
-
```
|
35
|
-
|
36
|
-
If `rubyzip >= 1.1.0` is needed:
|
37
|
-
|
38
|
-
```ruby
|
39
|
-
gem 'rubyzip', '~> 1.1.0'
|
40
|
-
gem 'axlsx', '2.1.0.pre'
|
41
|
-
gem 'axlsx_rails'
|
42
|
-
```
|
35
|
+
See [previous installations](#previous-installations) if needed.
|
43
36
|
|
44
37
|
## Requirements
|
45
38
|
|
46
|
-
* Rails 4.2, 5.
|
39
|
+
* Tested on Rails 4.2, 5.x and 6.0
|
47
40
|
* For Rails 3.1 or 3.2 use version 3.0
|
48
41
|
* **As of 0.5.0 requires Axlsx 2.0.1, but strongly suggests 2.1.0.pre, which requires rubyzip 1.1.0**
|
49
42
|
* As of Rails 4.1 you must use `render_to_string` to render a mail attachment.
|
50
43
|
|
51
44
|
## FYI
|
52
45
|
|
53
|
-
* This gem depends on [Axlsx](https://github.com/
|
46
|
+
* This gem depends on [Axlsx](https://github.com/caxlsx/axlsx). See [the blog](http://axlsx.blog.randym.net/) or the [examples page](https://github.com/randym/axlsx/blob/master/examples/example.rb) for usage.
|
54
47
|
* Check out [axlsx_styler](https://github.com/sakovias/axlsx_styler) by [sakovias](https://github.com/sakovias) for easier styles and borders!
|
55
48
|
|
56
49
|
## Usage
|
57
50
|
|
58
|
-
Axlsx-Rails provides a renderer and a template handler. It adds the `:xlsx` format and parses `.xlsx.axlsx` templates. This lets you take all the [Axlsx](https://github.com/
|
51
|
+
Axlsx-Rails provides a renderer and a template handler. It adds the `:xlsx` format and parses `.xlsx.axlsx` templates. This lets you take all the [Axlsx](https://github.com/caxlsx/axlsx) code out of your controller or model and place it inside the template, where view code belongs! **See [this blog post](http://axlsx.blog.randym.net/2012/08/excel-on-rails-like-pro-with-axlsxrails.html) for a more complete walkthrough.**
|
59
52
|
|
60
53
|
### Controller
|
61
54
|
|
@@ -85,7 +78,7 @@ wb.add_worksheet(name: "Buttons") do |sheet|
|
|
85
78
|
end
|
86
79
|
```
|
87
80
|
|
88
|
-
This is where you place all your [Axlsx](https://github.com/
|
81
|
+
This is where you place all your [Axlsx](https://github.com/caxlsx/axlsx) specific markup. Add worksheets, fill content, merge cells, add styles. See the [Axlsx examples](https://github.com/caxlsx/axlsx/tree/master/examples/example.rb) page to see what you can do.
|
89
82
|
|
90
83
|
Remember, like in `erb` templates, view helpers are available to use the `.xlsx.axlsx` template.
|
91
84
|
|
@@ -126,7 +119,7 @@ format.xlsx {
|
|
126
119
|
}
|
127
120
|
```
|
128
121
|
|
129
|
-
If you use `render xlsx:` the gem will try to guess the file name:
|
122
|
+
If you use `render xlsx:` the gem will try to guess the file name:
|
130
123
|
|
131
124
|
```ruby
|
132
125
|
# filename of 'buttons'
|
@@ -143,13 +136,13 @@ render xlsx: "action_or_template", filename: "my_new_filename.xlsx"
|
|
143
136
|
|
144
137
|
### Acts As Xlsx
|
145
138
|
|
146
|
-
If you use [acts_as_xlsx](https://github.com/
|
139
|
+
If you use [acts_as_xlsx](https://github.com/caxlsx/acts_as_xlsx), configure the active record normally, but specify the package in the template:
|
147
140
|
|
148
141
|
```ruby
|
149
142
|
User.to_xlsx package: xlsx_package, (other options)
|
150
143
|
```
|
151
144
|
|
152
|
-
**Note:** As of 4/1/2014 Acts As Xlsx is not compatible with Rails 4.1, and generates a warning on 4.0. You may use [my patched fork](https://github.com/
|
145
|
+
**Note:** As of 4/1/2014 Acts As Xlsx is not compatible with Rails 4.1, and generates a warning on 4.0. You may use [my patched fork](https://github.com/caxlsx/acts_as_caxlsx) until it is remedied.
|
153
146
|
|
154
147
|
### Axlsx Package Options
|
155
148
|
|
@@ -213,7 +206,7 @@ class UserMailer < ActionMailer::Base
|
|
213
206
|
end
|
214
207
|
```
|
215
208
|
|
216
|
-
* If the route specifies or suggests the `:xlsx` format you do not need to specify `formats` or `handlers`.
|
209
|
+
* If the route specifies or suggests the `:xlsx` format you do not need to specify `formats` or `handlers`.
|
217
210
|
* 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`.
|
218
211
|
* Specifying the encoding as 'base64' can avoid UTF-8 errors.
|
219
212
|
|
@@ -241,7 +234,7 @@ RSpec.shared_context 'axlsx' do
|
|
241
234
|
let(:template_path) do
|
242
235
|
['app', 'views', template_name]
|
243
236
|
end
|
244
|
-
|
237
|
+
|
245
238
|
# This helper will be used in tests
|
246
239
|
def render_template(locals = {})
|
247
240
|
axlsx_binding = Kernel.binding
|
@@ -255,7 +248,9 @@ RSpec.shared_context 'axlsx' do
|
|
255
248
|
|
256
249
|
# mimics an ActionView::Template class, presenting a 'source' method
|
257
250
|
# to retrieve the content of the template
|
258
|
-
|
251
|
+
filename = Rails.root.join(*template_path).to_s
|
252
|
+
source = Struct.new(:source).new(File.read(filename))
|
253
|
+
axlsx_binding.eval(ActionView::Template::Handlers::AxlsxBuilder.new.call(source), filename)
|
259
254
|
axlsx_binding.local_variable_get(:wb)
|
260
255
|
end
|
261
256
|
end
|
@@ -360,7 +355,7 @@ class UserMailer < ActionMailer::Base
|
|
360
355
|
end
|
361
356
|
```
|
362
357
|
|
363
|
-
If you get these errors, please open an issue and share code so the bug can be isolated. Or comment on issue [#29](https://github.com/
|
358
|
+
If you get these errors, please open an issue and share code so the bug can be isolated. Or comment on issue [#29](https://github.com/caxlsx/axlsx_rails/issues/29) or [#25](https://github.com/caxlsx/axlsx_rails/issues/25).
|
364
359
|
|
365
360
|
### Generated Files Can't Be Opened or Invalid Byte Sequence in UTF-8
|
366
361
|
|
@@ -403,10 +398,36 @@ link_to 'Download spreadsheet', path_to_sheet, data: {turbolinks: false}
|
|
403
398
|
|
404
399
|
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 Axlsx-Rails to see if you are having Axlsx problems. If you can manually create the spreadsheet, create an issue and we will work it out.
|
405
400
|
|
401
|
+
## Previous Installations
|
402
|
+
|
403
|
+
In your Gemfile:
|
404
|
+
|
405
|
+
```ruby
|
406
|
+
gem 'rubyzip', '>= 1.2.1'
|
407
|
+
gem 'axlsx', git: 'https://github.com/randym/axlsx.git', ref: 'c8ac844'
|
408
|
+
gem 'axlsx_rails'
|
409
|
+
```
|
410
|
+
|
411
|
+
If `rubyzip 1.0.0` is needed:
|
412
|
+
|
413
|
+
```ruby
|
414
|
+
gem 'rubyzip', '= 1.0.0'
|
415
|
+
gem 'axlsx', '= 2.0.1'
|
416
|
+
gem 'axlsx_rails'
|
417
|
+
```
|
418
|
+
|
419
|
+
If `rubyzip >= 1.1.0` is needed:
|
420
|
+
|
421
|
+
```ruby
|
422
|
+
gem 'rubyzip', '~> 1.1.0'
|
423
|
+
gem 'axlsx', '2.1.0.pre'
|
424
|
+
gem 'axlsx_rails'
|
425
|
+
```
|
426
|
+
|
406
427
|
## Dependencies
|
407
428
|
|
408
429
|
- [Rails](https://github.com/rails/rails)
|
409
|
-
- [Axlsx](https://github.com/
|
430
|
+
- [Axlsx](https://github.com/caxlsx/axlsx)
|
410
431
|
|
411
432
|
## Authors
|
412
433
|
|
@@ -414,7 +435,7 @@ If you are having problems, try to isolate the issue. Use the console or a scrip
|
|
414
435
|
|
415
436
|
## Contributors
|
416
437
|
|
417
|
-
Many thanks to [contributors](https://github.com/
|
438
|
+
Many thanks to [contributors](https://github.com/caxlsx/axlsx_rails/graphs/contributors):
|
418
439
|
|
419
440
|
* [randym](https://github.com/randym)
|
420
441
|
* [sugi](https://github.com/sugi)
|
@@ -437,6 +458,10 @@ source:
|
|
437
458
|
|
438
459
|
## Change log
|
439
460
|
|
461
|
+
**September 5, 2019**: 0.5.3 release
|
462
|
+
|
463
|
+
- Improved Rails 6.0 compatibility re MIME type
|
464
|
+
|
440
465
|
**May 1st, 2018**: 0.5.2 release
|
441
466
|
|
442
467
|
- Improved Rails 5 compatibility re MIME type
|
@@ -8,10 +8,17 @@ module ActionView
|
|
8
8
|
class AxlsxBuilder
|
9
9
|
|
10
10
|
def default_format
|
11
|
-
|
11
|
+
case
|
12
|
+
when Rails.version.to_f >= 6
|
13
|
+
Mime[:xlsx].symbol
|
14
|
+
when Rails.version.to_f >= 5
|
15
|
+
Mime[:xlsx]
|
16
|
+
else
|
17
|
+
Mime::XLSX
|
18
|
+
end
|
12
19
|
end
|
13
20
|
|
14
|
-
def call(template)
|
21
|
+
def call(template, source = nil)
|
15
22
|
builder = StringIO.new
|
16
23
|
builder << "require 'axlsx';"
|
17
24
|
builder << "xlsx_author = defined?(xlsx_author).nil? ? nil : xlsx_author;"
|
@@ -21,7 +28,7 @@ module ActionView
|
|
21
28
|
builder << ":author => xlsx_author,"
|
22
29
|
builder << ":created_at => xlsx_created_at,"
|
23
30
|
builder << ":use_shared_strings => xlsx_use_shared_strings);"
|
24
|
-
builder << template.source
|
31
|
+
builder << (source || template.source)
|
25
32
|
builder << ";xlsx_package.to_stream.string;"
|
26
33
|
builder.string
|
27
34
|
end
|
data/lib/axlsx_rails/version.rb
CHANGED
data/lib/axlsx_rails.rb
CHANGED
data/spec/axlsx_builder_spec.rb
CHANGED
@@ -18,10 +18,23 @@ describe 'Axlsx template handler' do
|
|
18
18
|
# end
|
19
19
|
|
20
20
|
it "has xlsx format" do
|
21
|
-
|
21
|
+
if Rails::VERSION::MAJOR >= 6
|
22
|
+
expect(handler.default_format).to eq(mime_type.symbol)
|
23
|
+
else
|
24
|
+
expect(handler.default_format).to eq(mime_type)
|
25
|
+
end
|
22
26
|
end
|
23
27
|
|
24
|
-
it "compiles to an excel spreadsheet" do
|
28
|
+
it "compiles to an excel spreadsheet when passing in a source" do
|
29
|
+
xlsx_package, wb = nil
|
30
|
+
source = "wb = xlsx_package.workbook;\nwb.add_worksheet(name: 'Test') do |sheet|\n\tsheet.add_row ['four', 'five', 'six']\n\tsheet.add_row ['d', 'e', 'f']\nend\n"
|
31
|
+
eval( AB.new.call template, source )
|
32
|
+
xlsx_package.serialize('/tmp/axlsx_temp.xlsx')
|
33
|
+
expect{ wb = Roo::Excelx.new('/tmp/axlsx_temp.xlsx') }.to_not raise_error
|
34
|
+
expect(wb.cell(2,3)).to eq('f')
|
35
|
+
end
|
36
|
+
|
37
|
+
it "compiles to an excel spreadsheet when inferring source from template " do
|
25
38
|
xlsx_package, wb = nil
|
26
39
|
eval( AB.new.call template )
|
27
40
|
xlsx_package.serialize('/tmp/axlsx_temp.xlsx')
|
data/spec/axlsx_request_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe 'Axlsx request', :type => :request do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "has a working dummy app" do
|
11
|
-
|
11
|
+
User.create name: 'Elmer', last_name: 'Fudd', address: '1234 Somewhere, Over NY 11111', email: 'elmer@fudd.com'
|
12
12
|
visit '/'
|
13
13
|
expect(page).to have_content("Hey, you")
|
14
14
|
end
|
@@ -60,8 +60,8 @@ describe 'Axlsx request', :type => :request do
|
|
60
60
|
|
61
61
|
it "downloads an excel file from acts_as_xlsx model" do
|
62
62
|
User.destroy_all
|
63
|
-
|
64
|
-
|
63
|
+
User.create name: 'Elmer', last_name: 'Fudd', address: '1234 Somewhere, Over NY 11111', email: 'elmer@fudd.com'
|
64
|
+
User.create name: 'Bugs', last_name: 'Bunny', address: '1234 Left Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
65
65
|
visit '/users.xlsx'
|
66
66
|
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
67
67
|
File.open('/tmp/axlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
@@ -117,6 +117,7 @@ describe 'Axlsx request', :type => :request do
|
|
117
117
|
it "uses respond_with" do
|
118
118
|
User.destroy_all
|
119
119
|
@user = User.create name: 'Responder', last_name: 'Bunny', address: '1234 Right Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
120
|
+
visit "/users/#{@user.id}.xlsx"
|
120
121
|
expect {
|
121
122
|
visit "/users/#{@user.id}.xlsx"
|
122
123
|
}.to_not raise_error
|
@@ -185,15 +186,17 @@ describe 'Axlsx request', :type => :request do
|
|
185
186
|
end
|
186
187
|
end
|
187
188
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
189
|
+
if Rails::VERSION::MAJOR < 6
|
190
|
+
it "downloads an excel file when there is no action" do
|
191
|
+
User.destroy_all
|
192
|
+
User.create name: 'Elmer', last_name: 'Fudd', address: '1234 Somewhere, Over NY 11111', email: 'elmer@fudd.com'
|
193
|
+
User.create name: 'Bugs', last_name: 'Bunny', address: '1234 Left Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
194
|
+
visit '/users/noaction.xlsx'
|
195
|
+
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
196
|
+
File.open('/tmp/axlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
197
|
+
wb = nil
|
198
|
+
expect{ wb = Roo::Excelx.new('/tmp/axlsx_temp.xlsx') }.to_not raise_error
|
199
|
+
expect(wb.cell(3,2)).to eq('Bugs')
|
200
|
+
end
|
198
201
|
end
|
199
202
|
end
|
data/spec/ci.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
if ENV['RAILS_VERSION'] =~ /^
|
4
|
-
puts "Testing Rails
|
5
|
-
exit system('cd spec/
|
3
|
+
if ENV['RAILS_VERSION'] =~ /^6.0/
|
4
|
+
puts "Testing Rails 6.0"
|
5
|
+
exit system('cd spec/dummy_6.0 && bundle install --without debug && rails db:reset && cd ../../ && bundle exec rspec spec')
|
6
|
+
elsif ENV['RAILS_VERSION'] =~ /^5/
|
7
|
+
puts "Testing Rails #{ENV['RAILS_VERSION']}"
|
8
|
+
exit system("cd spec/dummy_#{ENV['RAILS_VERSION']} && bundle install --without debug && rails db:reset && cd ../../ && bundle exec rspec spec")
|
6
9
|
elsif ENV['RAILS_VERSION'] =~ /^4/
|
7
|
-
puts "Testing Rails
|
8
|
-
exit system(
|
10
|
+
puts "Testing Rails #{ENV['RAILS_VERSION'].to_i}"
|
11
|
+
exit system("cd spec/dummy_#{ENV['RAILS_VERSION'].to_i} && bundle install --without debug && rake db:reset && cd ../../ && bundle exec rspec spec")
|
9
12
|
else
|
10
13
|
puts "Testing Rails 3"
|
11
14
|
exit system('cd spec/dummy && bundle install --without debug && bundle exec rake db:create && bundle exec rake db:migrate && cd ../../ && bundle exec rspec spec')
|
@@ -58,7 +58,7 @@ module Dummy
|
|
58
58
|
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
59
59
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
60
60
|
# parameters by using an attr_accessible or attr_protected declaration.
|
61
|
-
config.active_record.whitelist_attributes = false
|
61
|
+
config.active_record.whitelist_attributes = false if Rails::VERSION::MAJOR < 6
|
62
62
|
|
63
63
|
# Enable the asset pipeline
|
64
64
|
config.assets.enabled = true
|
@@ -23,11 +23,11 @@ Dummy::Application.configure do
|
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
24
|
|
25
25
|
# Raise exception on mass assignment protection for Active Record models
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
26
|
+
config.active_record.mass_assignment_sanitizer = :strict if Rails::VERSION::MAJOR < 6
|
27
27
|
|
28
28
|
# Log the query plan for queries taking more than this (works
|
29
29
|
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
30
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5 if Rails::VERSION::MAJOR < 6
|
31
31
|
|
32
32
|
# Do not compress assets
|
33
33
|
config.assets.compress = false
|
Binary file
|