caxlsx_rails 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +34 -18
- data/caxlsx_rails.gemspec +33 -0
- data/lib/axlsx_rails/railtie.rb +3 -2
- data/lib/axlsx_rails/template_handler.rb +24 -28
- data/lib/axlsx_rails/version.rb +1 -1
- metadata +5 -731
- data/Gemfile +0 -53
- data/Gemfile.lock +0 -263
- data/Gemfile.lock.5.2 +0 -263
- data/Gemfile.lock.6.0 +0 -282
- data/Guardfile +0 -16
- data/Rakefile +0 -29
- data/spec/axlsx_builder_spec.rb +0 -48
- data/spec/axlsx_mailer_spec.rb +0 -15
- data/spec/axlsx_renderer_spec.rb +0 -16
- data/spec/axlsx_request_spec.rb +0 -202
- data/spec/ci.rb +0 -15
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/controllers/home_controller.rb +0 -54
- data/spec/dummy/app/controllers/likes_controller.rb +0 -18
- data/spec/dummy/app/controllers/users_controller.rb +0 -27
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/notifier.rb +0 -14
- data/spec/dummy/app/models/like.rb +0 -3
- data/spec/dummy/app/models/user.rb +0 -10
- data/spec/dummy/app/views/home/_cover_sheet.xlsx.axlsx +0 -3
- data/spec/dummy/app/views/home/index.html.erb +0 -4
- data/spec/dummy/app/views/home/index.xlsx.axlsx +0 -8
- data/spec/dummy/app/views/home/useheader.xlsx.axlsx +0 -8
- data/spec/dummy/app/views/home/withpartial.xlsx.axlsx +0 -9
- data/spec/dummy/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy/app/views/likes/index.html.erb +0 -17
- data/spec/dummy/app/views/likes/index.xlsx.axlsx +0 -7
- data/spec/dummy/app/views/notifier/instructions.html.erb +0 -14
- data/spec/dummy/app/views/users/index.html.erb +0 -23
- data/spec/dummy/app/views/users/index.xlsx.axlsx +0 -1
- data/spec/dummy/app/views/users/respond_with.xlsx.axlsx +0 -8
- data/spec/dummy/app/views/users/send_instructions.xlsx.axlsx +0 -5
- data/spec/dummy/config/application.rb +0 -70
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -11
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -39
- data/spec/dummy/config/environments/production.rb +0 -69
- data/spec/dummy/config/environments/test.rb +0 -40
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -8
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20120717192452_create_users.rb +0 -12
- data/spec/dummy/db/migrate/20121206210955_create_likes.rb +0 -10
- data/spec/dummy/db/schema.rb +0 -32
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy_4/Rakefile +0 -6
- data/spec/dummy_4/app/assets/javascripts/application.js +0 -13
- data/spec/dummy_4/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy_4/app/controllers/application_controller.rb +0 -5
- data/spec/dummy_4/app/controllers/home_controller.rb +0 -56
- data/spec/dummy_4/app/controllers/likes_controller.rb +0 -18
- data/spec/dummy_4/app/controllers/users_controller.rb +0 -27
- data/spec/dummy_4/app/helpers/application_helper.rb +0 -2
- data/spec/dummy_4/app/mailers/notifier.rb +0 -14
- data/spec/dummy_4/app/models/like.rb +0 -3
- data/spec/dummy_4/app/models/user.rb +0 -10
- data/spec/dummy_4/app/views/home/_cover_sheet.xlsx.axlsx +0 -3
- data/spec/dummy_4/app/views/home/index.html.erb +0 -4
- data/spec/dummy_4/app/views/home/index.xlsx.axlsx +0 -8
- data/spec/dummy_4/app/views/home/only_html.html.erb +0 -1
- data/spec/dummy_4/app/views/home/useheader.xlsx.axlsx +0 -8
- data/spec/dummy_4/app/views/home/withpartial.xlsx.axlsx +0 -9
- data/spec/dummy_4/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy_4/app/views/layouts/users.html.erb +0 -12
- data/spec/dummy_4/app/views/likes/index.html.erb +0 -17
- data/spec/dummy_4/app/views/likes/index.xlsx.axlsx +0 -7
- data/spec/dummy_4/app/views/notifier/instructions.html.erb +0 -14
- data/spec/dummy_4/app/views/notifier/instructions.txt.erb +0 -6
- data/spec/dummy_4/app/views/users/export.xlsx.axlsx +0 -8
- data/spec/dummy_4/app/views/users/index.html.erb +0 -23
- data/spec/dummy_4/app/views/users/index.xlsx.axlsx +0 -1
- data/spec/dummy_4/app/views/users/noaction.xlsx.axlsx +0 -1
- data/spec/dummy_4/app/views/users/respond_with.xlsx.axlsx +0 -8
- data/spec/dummy_4/app/views/users/send_instructions.xlsx.axlsx +0 -5
- data/spec/dummy_4/bin/bundle +0 -3
- data/spec/dummy_4/bin/rails +0 -4
- data/spec/dummy_4/bin/rake +0 -4
- data/spec/dummy_4/config/application.rb +0 -23
- data/spec/dummy_4/config/boot.rb +0 -5
- data/spec/dummy_4/config/database.yml +0 -25
- data/spec/dummy_4/config/environment.rb +0 -5
- data/spec/dummy_4/config/environments/development.rb +0 -37
- data/spec/dummy_4/config/environments/production.rb +0 -83
- data/spec/dummy_4/config/environments/test.rb +0 -40
- data/spec/dummy_4/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy_4/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy_4/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy_4/config/initializers/inflections.rb +0 -16
- data/spec/dummy_4/config/initializers/mime_types.rb +0 -4
- data/spec/dummy_4/config/initializers/secret_token.rb +0 -2
- data/spec/dummy_4/config/initializers/session_store.rb +0 -3
- data/spec/dummy_4/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy_4/config/locales/en.yml +0 -23
- data/spec/dummy_4/config/routes.rb +0 -17
- data/spec/dummy_4/config/secrets.yml +0 -22
- data/spec/dummy_4/config.ru +0 -4
- data/spec/dummy_4/db/migrate/20120717192452_create_users.rb +0 -12
- data/spec/dummy_4/db/migrate/20121206210955_create_likes.rb +0 -10
- data/spec/dummy_4/db/schema.rb +0 -32
- data/spec/dummy_4/public/404.html +0 -67
- data/spec/dummy_4/public/422.html +0 -67
- data/spec/dummy_4/public/500.html +0 -66
- data/spec/dummy_4/public/favicon.ico +0 -0
- data/spec/dummy_5.0/Rakefile +0 -6
- data/spec/dummy_5.0/app/assets/javascripts/application.js +0 -13
- data/spec/dummy_5.0/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy_5.0/app/controllers/application_controller.rb +0 -5
- data/spec/dummy_5.0/app/controllers/home_controller.rb +0 -56
- data/spec/dummy_5.0/app/controllers/likes_controller.rb +0 -18
- data/spec/dummy_5.0/app/controllers/users_controller.rb +0 -37
- data/spec/dummy_5.0/app/helpers/application_helper.rb +0 -2
- data/spec/dummy_5.0/app/mailers/notifier.rb +0 -14
- data/spec/dummy_5.0/app/models/like.rb +0 -3
- data/spec/dummy_5.0/app/models/user.rb +0 -10
- data/spec/dummy_5.0/app/views/home/_cover_sheet.xlsx.axlsx +0 -3
- data/spec/dummy_5.0/app/views/home/index.html.erb +0 -4
- data/spec/dummy_5.0/app/views/home/index.xlsx.axlsx +0 -8
- data/spec/dummy_5.0/app/views/home/only_html.html.erb +0 -1
- data/spec/dummy_5.0/app/views/home/useheader.xlsx.axlsx +0 -8
- data/spec/dummy_5.0/app/views/home/withpartial.xlsx.axlsx +0 -9
- data/spec/dummy_5.0/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy_5.0/app/views/layouts/users.html.erb +0 -12
- data/spec/dummy_5.0/app/views/likes/index.html.erb +0 -17
- data/spec/dummy_5.0/app/views/likes/index.xlsx.axlsx +0 -7
- data/spec/dummy_5.0/app/views/notifier/instructions.html.erb +0 -14
- data/spec/dummy_5.0/app/views/notifier/instructions.txt.erb +0 -6
- data/spec/dummy_5.0/app/views/users/export.xlsx.axlsx +0 -8
- data/spec/dummy_5.0/app/views/users/index.html.erb +0 -23
- data/spec/dummy_5.0/app/views/users/index.xlsx.axlsx +0 -1
- data/spec/dummy_5.0/app/views/users/noaction.xlsx.axlsx +0 -1
- data/spec/dummy_5.0/app/views/users/respond_with.xlsx.axlsx +0 -8
- data/spec/dummy_5.0/app/views/users/send_instructions.xlsx.axlsx +0 -5
- data/spec/dummy_5.0/bin/bundle +0 -3
- data/spec/dummy_5.0/bin/rails +0 -4
- data/spec/dummy_5.0/bin/rake +0 -4
- data/spec/dummy_5.0/config/application.rb +0 -23
- data/spec/dummy_5.0/config/boot.rb +0 -5
- data/spec/dummy_5.0/config/database.yml +0 -25
- data/spec/dummy_5.0/config/environment.rb +0 -5
- data/spec/dummy_5.0/config/environments/development.rb +0 -37
- data/spec/dummy_5.0/config/environments/production.rb +0 -83
- data/spec/dummy_5.0/config/environments/test.rb +0 -40
- data/spec/dummy_5.0/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy_5.0/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy_5.0/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy_5.0/config/initializers/inflections.rb +0 -16
- data/spec/dummy_5.0/config/initializers/mime_types.rb +0 -4
- data/spec/dummy_5.0/config/initializers/secret_token.rb +0 -2
- data/spec/dummy_5.0/config/initializers/session_store.rb +0 -3
- data/spec/dummy_5.0/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy_5.0/config/locales/en.yml +0 -23
- data/spec/dummy_5.0/config/routes.rb +0 -17
- data/spec/dummy_5.0/config/secrets.yml +0 -22
- data/spec/dummy_5.0/config.ru +0 -4
- data/spec/dummy_5.0/db/migrate/20120717192452_create_users.rb +0 -12
- data/spec/dummy_5.0/db/migrate/20121206210955_create_likes.rb +0 -10
- data/spec/dummy_5.0/db/schema.rb +0 -31
- data/spec/dummy_5.0/public/404.html +0 -67
- data/spec/dummy_5.0/public/422.html +0 -67
- data/spec/dummy_5.0/public/500.html +0 -66
- data/spec/dummy_5.0/public/favicon.ico +0 -0
- data/spec/dummy_5.1/Rakefile +0 -6
- data/spec/dummy_5.1/app/assets/javascripts/application.js +0 -13
- data/spec/dummy_5.1/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy_5.1/app/controllers/application_controller.rb +0 -5
- data/spec/dummy_5.1/app/controllers/home_controller.rb +0 -56
- data/spec/dummy_5.1/app/controllers/likes_controller.rb +0 -18
- data/spec/dummy_5.1/app/controllers/users_controller.rb +0 -37
- data/spec/dummy_5.1/app/helpers/application_helper.rb +0 -2
- data/spec/dummy_5.1/app/mailers/notifier.rb +0 -14
- data/spec/dummy_5.1/app/models/like.rb +0 -3
- data/spec/dummy_5.1/app/models/user.rb +0 -10
- data/spec/dummy_5.1/app/views/home/_cover_sheet.xlsx.axlsx +0 -3
- data/spec/dummy_5.1/app/views/home/index.html.erb +0 -4
- data/spec/dummy_5.1/app/views/home/index.xlsx.axlsx +0 -8
- data/spec/dummy_5.1/app/views/home/only_html.html.erb +0 -1
- data/spec/dummy_5.1/app/views/home/useheader.xlsx.axlsx +0 -8
- data/spec/dummy_5.1/app/views/home/withpartial.xlsx.axlsx +0 -9
- data/spec/dummy_5.1/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy_5.1/app/views/layouts/users.html.erb +0 -12
- data/spec/dummy_5.1/app/views/likes/index.html.erb +0 -17
- data/spec/dummy_5.1/app/views/likes/index.xlsx.axlsx +0 -7
- data/spec/dummy_5.1/app/views/notifier/instructions.html.erb +0 -14
- data/spec/dummy_5.1/app/views/notifier/instructions.txt.erb +0 -6
- data/spec/dummy_5.1/app/views/users/export.xlsx.axlsx +0 -8
- data/spec/dummy_5.1/app/views/users/index.html.erb +0 -23
- data/spec/dummy_5.1/app/views/users/index.xlsx.axlsx +0 -1
- data/spec/dummy_5.1/app/views/users/noaction.xlsx.axlsx +0 -1
- data/spec/dummy_5.1/app/views/users/respond_with.xlsx.axlsx +0 -8
- data/spec/dummy_5.1/app/views/users/send_instructions.xlsx.axlsx +0 -5
- data/spec/dummy_5.1/bin/bundle +0 -3
- data/spec/dummy_5.1/bin/rails +0 -4
- data/spec/dummy_5.1/bin/rake +0 -4
- data/spec/dummy_5.1/config/application.rb +0 -23
- data/spec/dummy_5.1/config/boot.rb +0 -5
- data/spec/dummy_5.1/config/database.yml +0 -25
- data/spec/dummy_5.1/config/environment.rb +0 -5
- data/spec/dummy_5.1/config/environments/development.rb +0 -37
- data/spec/dummy_5.1/config/environments/production.rb +0 -83
- data/spec/dummy_5.1/config/environments/test.rb +0 -40
- data/spec/dummy_5.1/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy_5.1/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy_5.1/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy_5.1/config/initializers/inflections.rb +0 -16
- data/spec/dummy_5.1/config/initializers/mime_types.rb +0 -4
- data/spec/dummy_5.1/config/initializers/secret_token.rb +0 -2
- data/spec/dummy_5.1/config/initializers/session_store.rb +0 -3
- data/spec/dummy_5.1/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy_5.1/config/locales/en.yml +0 -23
- data/spec/dummy_5.1/config/routes.rb +0 -17
- data/spec/dummy_5.1/config/secrets.yml +0 -22
- data/spec/dummy_5.1/config.ru +0 -4
- data/spec/dummy_5.1/db/migrate/20120717192452_create_users.rb +0 -12
- data/spec/dummy_5.1/db/migrate/20121206210955_create_likes.rb +0 -10
- data/spec/dummy_5.1/db/schema.rb +0 -31
- data/spec/dummy_5.1/public/404.html +0 -67
- data/spec/dummy_5.1/public/422.html +0 -67
- data/spec/dummy_5.1/public/500.html +0 -66
- data/spec/dummy_5.1/public/favicon.ico +0 -0
- data/spec/dummy_5.2/Rakefile +0 -6
- data/spec/dummy_5.2/app/assets/javascripts/application.js +0 -13
- data/spec/dummy_5.2/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy_5.2/app/controllers/application_controller.rb +0 -5
- data/spec/dummy_5.2/app/controllers/home_controller.rb +0 -56
- data/spec/dummy_5.2/app/controllers/likes_controller.rb +0 -18
- data/spec/dummy_5.2/app/controllers/users_controller.rb +0 -37
- data/spec/dummy_5.2/app/helpers/application_helper.rb +0 -2
- data/spec/dummy_5.2/app/mailers/notifier.rb +0 -14
- data/spec/dummy_5.2/app/models/like.rb +0 -3
- data/spec/dummy_5.2/app/models/user.rb +0 -10
- data/spec/dummy_5.2/app/views/home/_cover_sheet.xlsx.axlsx +0 -3
- data/spec/dummy_5.2/app/views/home/index.html.erb +0 -4
- data/spec/dummy_5.2/app/views/home/index.xlsx.axlsx +0 -8
- data/spec/dummy_5.2/app/views/home/only_html.html.erb +0 -1
- data/spec/dummy_5.2/app/views/home/useheader.xlsx.axlsx +0 -8
- data/spec/dummy_5.2/app/views/home/withpartial.xlsx.axlsx +0 -9
- data/spec/dummy_5.2/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy_5.2/app/views/layouts/users.html.erb +0 -12
- data/spec/dummy_5.2/app/views/likes/index.html.erb +0 -17
- data/spec/dummy_5.2/app/views/likes/index.xlsx.axlsx +0 -7
- data/spec/dummy_5.2/app/views/notifier/instructions.html.erb +0 -14
- data/spec/dummy_5.2/app/views/notifier/instructions.txt.erb +0 -6
- data/spec/dummy_5.2/app/views/users/export.xlsx.axlsx +0 -8
- data/spec/dummy_5.2/app/views/users/index.html.erb +0 -23
- data/spec/dummy_5.2/app/views/users/index.xlsx.axlsx +0 -1
- data/spec/dummy_5.2/app/views/users/noaction.xlsx.axlsx +0 -1
- data/spec/dummy_5.2/app/views/users/respond_with.xlsx.axlsx +0 -8
- data/spec/dummy_5.2/app/views/users/send_instructions.xlsx.axlsx +0 -5
- data/spec/dummy_5.2/bin/bundle +0 -3
- data/spec/dummy_5.2/bin/rails +0 -4
- data/spec/dummy_5.2/bin/rake +0 -4
- data/spec/dummy_5.2/config/application.rb +0 -23
- data/spec/dummy_5.2/config/boot.rb +0 -5
- data/spec/dummy_5.2/config/database.yml +0 -25
- data/spec/dummy_5.2/config/environment.rb +0 -5
- data/spec/dummy_5.2/config/environments/development.rb +0 -37
- data/spec/dummy_5.2/config/environments/production.rb +0 -83
- data/spec/dummy_5.2/config/environments/test.rb +0 -40
- data/spec/dummy_5.2/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy_5.2/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy_5.2/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy_5.2/config/initializers/inflections.rb +0 -16
- data/spec/dummy_5.2/config/initializers/mime_types.rb +0 -4
- data/spec/dummy_5.2/config/initializers/secret_token.rb +0 -2
- data/spec/dummy_5.2/config/initializers/session_store.rb +0 -3
- data/spec/dummy_5.2/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy_5.2/config/locales/en.yml +0 -23
- data/spec/dummy_5.2/config/routes.rb +0 -17
- data/spec/dummy_5.2/config/secrets.yml +0 -22
- data/spec/dummy_5.2/config.ru +0 -4
- data/spec/dummy_5.2/db/migrate/20120717192452_create_users.rb +0 -12
- data/spec/dummy_5.2/db/migrate/20121206210955_create_likes.rb +0 -10
- data/spec/dummy_5.2/db/schema.rb +0 -31
- data/spec/dummy_5.2/db/test.sqlite3 +0 -0
- data/spec/dummy_5.2/log/test.log +0 -1032
- data/spec/dummy_5.2/public/404.html +0 -67
- data/spec/dummy_5.2/public/422.html +0 -67
- data/spec/dummy_5.2/public/500.html +0 -66
- data/spec/dummy_5.2/public/favicon.ico +0 -0
- data/spec/dummy_6.0/Rakefile +0 -6
- data/spec/dummy_6.0/app/assets/javascripts/application.js +0 -13
- data/spec/dummy_6.0/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy_6.0/app/controllers/application_controller.rb +0 -5
- data/spec/dummy_6.0/app/controllers/home_controller.rb +0 -56
- data/spec/dummy_6.0/app/controllers/likes_controller.rb +0 -18
- data/spec/dummy_6.0/app/controllers/users_controller.rb +0 -37
- data/spec/dummy_6.0/app/helpers/application_helper.rb +0 -2
- data/spec/dummy_6.0/app/mailers/notifier.rb +0 -14
- data/spec/dummy_6.0/app/models/like.rb +0 -3
- data/spec/dummy_6.0/app/models/user.rb +0 -10
- data/spec/dummy_6.0/app/views/home/_cover_sheet.xlsx.axlsx +0 -3
- data/spec/dummy_6.0/app/views/home/index.html.erb +0 -4
- data/spec/dummy_6.0/app/views/home/index.xlsx.axlsx +0 -8
- data/spec/dummy_6.0/app/views/home/only_html.html.erb +0 -1
- data/spec/dummy_6.0/app/views/home/useheader.xlsx.axlsx +0 -8
- data/spec/dummy_6.0/app/views/home/withpartial.xlsx.axlsx +0 -9
- data/spec/dummy_6.0/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy_6.0/app/views/layouts/users.html.erb +0 -12
- data/spec/dummy_6.0/app/views/likes/index.html.erb +0 -17
- data/spec/dummy_6.0/app/views/likes/index.xlsx.axlsx +0 -7
- data/spec/dummy_6.0/app/views/notifier/instructions.html.erb +0 -14
- data/spec/dummy_6.0/app/views/notifier/instructions.txt.erb +0 -6
- data/spec/dummy_6.0/app/views/users/export.xlsx.axlsx +0 -8
- data/spec/dummy_6.0/app/views/users/index.html.erb +0 -23
- data/spec/dummy_6.0/app/views/users/index.xlsx.axlsx +0 -1
- data/spec/dummy_6.0/app/views/users/noaction.xlsx.axlsx +0 -1
- data/spec/dummy_6.0/app/views/users/respond_with.xlsx.axlsx +0 -8
- data/spec/dummy_6.0/app/views/users/send_instructions.xlsx.axlsx +0 -5
- data/spec/dummy_6.0/bin/bundle +0 -3
- data/spec/dummy_6.0/bin/rails +0 -4
- data/spec/dummy_6.0/bin/rake +0 -4
- data/spec/dummy_6.0/config/application.rb +0 -23
- data/spec/dummy_6.0/config/boot.rb +0 -5
- data/spec/dummy_6.0/config/database.yml +0 -25
- data/spec/dummy_6.0/config/environment.rb +0 -5
- data/spec/dummy_6.0/config/environments/development.rb +0 -37
- data/spec/dummy_6.0/config/environments/production.rb +0 -83
- data/spec/dummy_6.0/config/environments/test.rb +0 -40
- data/spec/dummy_6.0/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy_6.0/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy_6.0/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy_6.0/config/initializers/inflections.rb +0 -16
- data/spec/dummy_6.0/config/initializers/mime_types.rb +0 -4
- data/spec/dummy_6.0/config/initializers/secret_token.rb +0 -2
- data/spec/dummy_6.0/config/initializers/session_store.rb +0 -3
- data/spec/dummy_6.0/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy_6.0/config/locales/en.yml +0 -23
- data/spec/dummy_6.0/config/routes.rb +0 -17
- data/spec/dummy_6.0/config/secrets.yml +0 -22
- data/spec/dummy_6.0/config.ru +0 -4
- data/spec/dummy_6.0/db/migrate/20120717192452_create_users.rb +0 -12
- data/spec/dummy_6.0/db/migrate/20121206210955_create_likes.rb +0 -10
- data/spec/dummy_6.0/db/schema.rb +0 -31
- data/spec/dummy_6.0/db/test.sqlite3 +0 -0
- data/spec/dummy_6.0/log/test.log +0 -364
- data/spec/dummy_6.0/public/404.html +0 -67
- data/spec/dummy_6.0/public/422.html +0 -67
- data/spec/dummy_6.0/public/500.html +0 -66
- data/spec/dummy_6.0/public/favicon.ico +0 -0
- data/spec/reset_gems.sh +0 -2
- data/spec/spec_helper.rb +0 -53
- data/spec/test_3.1.sh +0 -16
- data/spec/test_3.2.sh +0 -16
- data/spec/test_4.0.sh +0 -16
- data/spec/test_4.1.sh +0 -16
- data/spec/test_4.2.sh +0 -16
- data/spec/test_5.0.sh +0 -16
- data/spec/test_5.1.sh +0 -16
- data/spec/test_5.2.sh +0 -16
- data/spec/test_6.0.sh +0 -16
- data/spec/test_all_rails.sh +0 -8
- data/spec/test_revert.sh +0 -3
data/Gemfile.lock.6.0
DELETED
@@ -1,282 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/caxlsx/acts_as_caxlsx.git
|
3
|
-
revision: 48e76cf6f0a7a135de59207e73c3167c4f0bd9fb
|
4
|
-
specs:
|
5
|
-
acts_as_caxlsx (1.0.6)
|
6
|
-
activerecord (>= 2.3.9)
|
7
|
-
caxlsx (>= 3.0.0)
|
8
|
-
i18n (>= 0.4.1)
|
9
|
-
|
10
|
-
PATH
|
11
|
-
remote: .
|
12
|
-
specs:
|
13
|
-
caxlsx_rails (0.6.2)
|
14
|
-
actionpack (>= 3.1)
|
15
|
-
caxlsx (>= 3.0)
|
16
|
-
|
17
|
-
GEM
|
18
|
-
remote: http://rubygems.org/
|
19
|
-
specs:
|
20
|
-
actioncable (6.1.4.7)
|
21
|
-
actionpack (= 6.1.4.7)
|
22
|
-
activesupport (= 6.1.4.7)
|
23
|
-
nio4r (~> 2.0)
|
24
|
-
websocket-driver (>= 0.6.1)
|
25
|
-
actionmailbox (6.1.4.7)
|
26
|
-
actionpack (= 6.1.4.7)
|
27
|
-
activejob (= 6.1.4.7)
|
28
|
-
activerecord (= 6.1.4.7)
|
29
|
-
activestorage (= 6.1.4.7)
|
30
|
-
activesupport (= 6.1.4.7)
|
31
|
-
mail (>= 2.7.1)
|
32
|
-
actionmailer (6.1.4.7)
|
33
|
-
actionpack (= 6.1.4.7)
|
34
|
-
actionview (= 6.1.4.7)
|
35
|
-
activejob (= 6.1.4.7)
|
36
|
-
activesupport (= 6.1.4.7)
|
37
|
-
mail (~> 2.5, >= 2.5.4)
|
38
|
-
rails-dom-testing (~> 2.0)
|
39
|
-
actionpack (6.1.4.7)
|
40
|
-
actionview (= 6.1.4.7)
|
41
|
-
activesupport (= 6.1.4.7)
|
42
|
-
rack (~> 2.0, >= 2.0.9)
|
43
|
-
rack-test (>= 0.6.3)
|
44
|
-
rails-dom-testing (~> 2.0)
|
45
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
46
|
-
actiontext (6.1.4.7)
|
47
|
-
actionpack (= 6.1.4.7)
|
48
|
-
activerecord (= 6.1.4.7)
|
49
|
-
activestorage (= 6.1.4.7)
|
50
|
-
activesupport (= 6.1.4.7)
|
51
|
-
nokogiri (>= 1.8.5)
|
52
|
-
actionview (6.1.4.7)
|
53
|
-
activesupport (= 6.1.4.7)
|
54
|
-
builder (~> 3.1)
|
55
|
-
erubi (~> 1.4)
|
56
|
-
rails-dom-testing (~> 2.0)
|
57
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
58
|
-
activejob (6.1.4.7)
|
59
|
-
activesupport (= 6.1.4.7)
|
60
|
-
globalid (>= 0.3.6)
|
61
|
-
activemodel (6.1.4.7)
|
62
|
-
activesupport (= 6.1.4.7)
|
63
|
-
activerecord (6.1.4.7)
|
64
|
-
activemodel (= 6.1.4.7)
|
65
|
-
activesupport (= 6.1.4.7)
|
66
|
-
activestorage (6.1.4.7)
|
67
|
-
actionpack (= 6.1.4.7)
|
68
|
-
activejob (= 6.1.4.7)
|
69
|
-
activerecord (= 6.1.4.7)
|
70
|
-
activesupport (= 6.1.4.7)
|
71
|
-
marcel (~> 1.0.0)
|
72
|
-
mini_mime (>= 1.1.0)
|
73
|
-
activesupport (6.1.4.7)
|
74
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
75
|
-
i18n (>= 1.6, < 2)
|
76
|
-
minitest (>= 5.1)
|
77
|
-
tzinfo (~> 2.0)
|
78
|
-
zeitwerk (~> 2.3)
|
79
|
-
addressable (2.8.0)
|
80
|
-
public_suffix (>= 2.0.2, < 5.0)
|
81
|
-
builder (3.2.4)
|
82
|
-
capybara (2.18.0)
|
83
|
-
addressable
|
84
|
-
mini_mime (>= 0.1.3)
|
85
|
-
nokogiri (>= 1.3.3)
|
86
|
-
rack (>= 1.0.0)
|
87
|
-
rack-test (>= 0.5.4)
|
88
|
-
xpath (>= 2.0, < 4.0)
|
89
|
-
caxlsx (3.2.0)
|
90
|
-
htmlentities (~> 4.3, >= 4.3.4)
|
91
|
-
marcel (~> 1.0)
|
92
|
-
nokogiri (~> 1.10, >= 1.10.4)
|
93
|
-
rubyzip (>= 1.3.0, < 3)
|
94
|
-
coderay (1.1.3)
|
95
|
-
concurrent-ruby (1.1.9)
|
96
|
-
coveralls (0.8.23)
|
97
|
-
json (>= 1.8, < 3)
|
98
|
-
simplecov (~> 0.16.1)
|
99
|
-
term-ansicolor (~> 1.3)
|
100
|
-
thor (>= 0.19.4, < 2.0)
|
101
|
-
tins (~> 1.6)
|
102
|
-
crass (1.0.6)
|
103
|
-
daemons (1.4.1)
|
104
|
-
diff-lcs (1.5.0)
|
105
|
-
docile (1.4.0)
|
106
|
-
erubi (1.10.0)
|
107
|
-
eventmachine (1.2.7)
|
108
|
-
ffi (1.15.5)
|
109
|
-
formatador (1.1.0)
|
110
|
-
globalid (1.0.0)
|
111
|
-
activesupport (>= 5.0)
|
112
|
-
growl (1.0.3)
|
113
|
-
guard (2.18.0)
|
114
|
-
formatador (>= 0.2.4)
|
115
|
-
listen (>= 2.7, < 4.0)
|
116
|
-
lumberjack (>= 1.0.12, < 2.0)
|
117
|
-
nenv (~> 0.1)
|
118
|
-
notiffany (~> 0.0)
|
119
|
-
pry (>= 0.13.0)
|
120
|
-
shellany (~> 0.0)
|
121
|
-
thor (>= 0.18.1)
|
122
|
-
guard-compat (1.2.1)
|
123
|
-
guard-rspec (4.7.3)
|
124
|
-
guard (~> 2.1)
|
125
|
-
guard-compat (~> 1.1)
|
126
|
-
rspec (>= 2.99.0, < 4.0)
|
127
|
-
htmlentities (4.3.4)
|
128
|
-
i18n (1.10.0)
|
129
|
-
concurrent-ruby (~> 1.0)
|
130
|
-
jquery-rails (4.4.0)
|
131
|
-
rails-dom-testing (>= 1, < 3)
|
132
|
-
railties (>= 4.2.0)
|
133
|
-
thor (>= 0.14, < 2.0)
|
134
|
-
json (2.6.1)
|
135
|
-
listen (3.7.1)
|
136
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
137
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
138
|
-
loofah (2.14.0)
|
139
|
-
crass (~> 1.0.2)
|
140
|
-
nokogiri (>= 1.5.9)
|
141
|
-
lumberjack (1.2.8)
|
142
|
-
mail (2.7.1)
|
143
|
-
mini_mime (>= 0.1.1)
|
144
|
-
marcel (1.0.2)
|
145
|
-
method_source (1.0.0)
|
146
|
-
mini_mime (1.1.2)
|
147
|
-
minitest (5.15.0)
|
148
|
-
nenv (0.3.0)
|
149
|
-
nio4r (2.5.8)
|
150
|
-
nokogiri (1.13.3-x86_64-darwin)
|
151
|
-
racc (~> 1.4)
|
152
|
-
notiffany (0.1.3)
|
153
|
-
nenv (~> 0.1)
|
154
|
-
shellany (~> 0.0)
|
155
|
-
pry (0.14.1)
|
156
|
-
coderay (~> 1.1)
|
157
|
-
method_source (~> 1.0)
|
158
|
-
pry-nav (1.0.0)
|
159
|
-
pry (>= 0.9.10, < 0.15)
|
160
|
-
public_suffix (4.0.6)
|
161
|
-
racc (1.6.0)
|
162
|
-
rack (2.2.3)
|
163
|
-
rack-test (1.1.0)
|
164
|
-
rack (>= 1.0, < 3)
|
165
|
-
rails (6.1.4.7)
|
166
|
-
actioncable (= 6.1.4.7)
|
167
|
-
actionmailbox (= 6.1.4.7)
|
168
|
-
actionmailer (= 6.1.4.7)
|
169
|
-
actionpack (= 6.1.4.7)
|
170
|
-
actiontext (= 6.1.4.7)
|
171
|
-
actionview (= 6.1.4.7)
|
172
|
-
activejob (= 6.1.4.7)
|
173
|
-
activemodel (= 6.1.4.7)
|
174
|
-
activerecord (= 6.1.4.7)
|
175
|
-
activestorage (= 6.1.4.7)
|
176
|
-
activesupport (= 6.1.4.7)
|
177
|
-
bundler (>= 1.15.0)
|
178
|
-
railties (= 6.1.4.7)
|
179
|
-
sprockets-rails (>= 2.0.0)
|
180
|
-
rails-dom-testing (2.0.3)
|
181
|
-
activesupport (>= 4.2.0)
|
182
|
-
nokogiri (>= 1.6)
|
183
|
-
rails-html-sanitizer (1.4.2)
|
184
|
-
loofah (~> 2.3)
|
185
|
-
railties (6.1.4.7)
|
186
|
-
actionpack (= 6.1.4.7)
|
187
|
-
activesupport (= 6.1.4.7)
|
188
|
-
method_source
|
189
|
-
rake (>= 0.13)
|
190
|
-
thor (~> 1.0)
|
191
|
-
rake (13.0.6)
|
192
|
-
rb-fsevent (0.11.1)
|
193
|
-
rb-inotify (0.10.1)
|
194
|
-
ffi (~> 1.0)
|
195
|
-
responders (3.0.1)
|
196
|
-
actionpack (>= 5.0)
|
197
|
-
railties (>= 5.0)
|
198
|
-
roo (2.8.3)
|
199
|
-
nokogiri (~> 1)
|
200
|
-
rubyzip (>= 1.3.0, < 3.0.0)
|
201
|
-
rspec (3.11.0)
|
202
|
-
rspec-core (~> 3.11.0)
|
203
|
-
rspec-expectations (~> 3.11.0)
|
204
|
-
rspec-mocks (~> 3.11.0)
|
205
|
-
rspec-core (3.11.0)
|
206
|
-
rspec-support (~> 3.11.0)
|
207
|
-
rspec-expectations (3.11.0)
|
208
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
209
|
-
rspec-support (~> 3.11.0)
|
210
|
-
rspec-mocks (3.11.0)
|
211
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
212
|
-
rspec-support (~> 3.11.0)
|
213
|
-
rspec-rails (5.1.1)
|
214
|
-
actionpack (>= 5.2)
|
215
|
-
activesupport (>= 5.2)
|
216
|
-
railties (>= 5.2)
|
217
|
-
rspec-core (~> 3.10)
|
218
|
-
rspec-expectations (~> 3.10)
|
219
|
-
rspec-mocks (~> 3.10)
|
220
|
-
rspec-support (~> 3.10)
|
221
|
-
rspec-support (3.11.0)
|
222
|
-
rubyzip (2.3.2)
|
223
|
-
shellany (0.0.1)
|
224
|
-
simplecov (0.16.1)
|
225
|
-
docile (~> 1.1)
|
226
|
-
json (>= 1.8, < 3)
|
227
|
-
simplecov-html (~> 0.10.0)
|
228
|
-
simplecov-html (0.10.2)
|
229
|
-
sprockets (3.7.2)
|
230
|
-
concurrent-ruby (~> 1.0)
|
231
|
-
rack (> 1, < 3)
|
232
|
-
sprockets-rails (3.4.2)
|
233
|
-
actionpack (>= 5.2)
|
234
|
-
activesupport (>= 5.2)
|
235
|
-
sprockets (>= 3.0.0)
|
236
|
-
sqlite3 (1.4.2)
|
237
|
-
sync (0.5.0)
|
238
|
-
term-ansicolor (1.7.1)
|
239
|
-
tins (~> 1.0)
|
240
|
-
thin (1.8.1)
|
241
|
-
daemons (~> 1.0, >= 1.0.9)
|
242
|
-
eventmachine (~> 1.0, >= 1.0.4)
|
243
|
-
rack (>= 1, < 3)
|
244
|
-
thor (1.2.1)
|
245
|
-
tins (1.31.0)
|
246
|
-
sync
|
247
|
-
tzinfo (2.0.4)
|
248
|
-
concurrent-ruby (~> 1.0)
|
249
|
-
websocket-driver (0.7.5)
|
250
|
-
websocket-extensions (>= 0.1.0)
|
251
|
-
websocket-extensions (0.1.5)
|
252
|
-
xpath (3.2.0)
|
253
|
-
nokogiri (~> 1.8)
|
254
|
-
zeitwerk (2.5.4)
|
255
|
-
|
256
|
-
PLATFORMS
|
257
|
-
x86_64-darwin-17
|
258
|
-
|
259
|
-
DEPENDENCIES
|
260
|
-
acts_as_caxlsx!
|
261
|
-
bundler
|
262
|
-
capybara (~> 2.1)
|
263
|
-
caxlsx_rails!
|
264
|
-
coveralls
|
265
|
-
growl
|
266
|
-
guard-rspec
|
267
|
-
jquery-rails
|
268
|
-
pry
|
269
|
-
pry-nav
|
270
|
-
rails (~> 6)
|
271
|
-
rake
|
272
|
-
rb-fsevent
|
273
|
-
responders (~> 3.0)
|
274
|
-
roo
|
275
|
-
rspec-rails
|
276
|
-
rubyzip
|
277
|
-
sprockets (~> 3.0)
|
278
|
-
sqlite3
|
279
|
-
thin
|
280
|
-
|
281
|
-
BUNDLED WITH
|
282
|
-
2.2.19
|
data/Guardfile
DELETED
@@ -1,16 +0,0 @@
|
|
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/axlsx_renderer_spec.rb", "spec/axlsx_builder_spec.rb", "axlsx_request_spec.rb"] }
|
12
|
-
watch('lib/axlsx_rails/action_controller.rb') { ["spec/axlsx_renderer_spec.rb", "spec/axlsx_request_spec.rb"] }
|
13
|
-
watch('lib/axlsx_rails/template_handler.rb') { "spec/axlsx_builder_spec.rb" }
|
14
|
-
watch(%r{spec/dummy/app/mailers/.+\.rb$}) { "spec/axlsx_mailer_spec.rb" }
|
15
|
-
watch(%r{spec/dummy/app/views/.+\.erb}) { "spec/axlsx_request_spec.rb" }
|
16
|
-
end
|
data/Rakefile
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
begin
|
3
|
-
require 'bundler/setup'
|
4
|
-
rescue LoadError
|
5
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
-
end
|
7
|
-
begin
|
8
|
-
require 'rdoc/task'
|
9
|
-
rescue LoadError
|
10
|
-
require 'rdoc/rdoc'
|
11
|
-
require 'rake/rdoctask'
|
12
|
-
RDoc::Task = Rake::RDocTask
|
13
|
-
end
|
14
|
-
|
15
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
-
rdoc.rdoc_dir = 'rdoc'
|
17
|
-
rdoc.title = 'CaxlsxRails'
|
18
|
-
rdoc.options << '--line-numbers'
|
19
|
-
rdoc.rdoc_files.include('README.rdoc')
|
20
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
-
end
|
22
|
-
|
23
|
-
require "rspec/core/rake_task"
|
24
|
-
RSpec::Core::RakeTask.new('spec')
|
25
|
-
|
26
|
-
task :default => :spec
|
27
|
-
|
28
|
-
Bundler::GemHelper.install_tasks
|
29
|
-
|
data/spec/axlsx_builder_spec.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe 'Axlsx template handler' do
|
4
|
-
|
5
|
-
AB = ActionView::Template::Handlers::AxlsxBuilder
|
6
|
-
VT = Struct.new(:source)
|
7
|
-
|
8
|
-
let( :handler ) { AB.new }
|
9
|
-
|
10
|
-
let( :template ) do
|
11
|
-
VT.new("wb = xlsx_package.workbook;\nwb.add_worksheet(name: 'Test') do |sheet|\n\tsheet.add_row ['one', 'two', 'three']\n\tsheet.add_row ['a', 'b', 'c']\nend\n")
|
12
|
-
end
|
13
|
-
|
14
|
-
context "Rails #{Rails.version}" do
|
15
|
-
# for testing if the author is set
|
16
|
-
# before do
|
17
|
-
# Rails.stub_chain(:application, :config, :axlsx_author).and_return( 'Elmer Fudd' )
|
18
|
-
# end
|
19
|
-
|
20
|
-
it "has xlsx format" do
|
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
|
26
|
-
end
|
27
|
-
|
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
|
38
|
-
xlsx_package, wb = nil
|
39
|
-
eval( AB.new.call template )
|
40
|
-
xlsx_package.serialize('/tmp/axlsx_temp.xlsx')
|
41
|
-
expect{ wb = Roo::Excelx.new('/tmp/axlsx_temp.xlsx') }.to_not raise_error
|
42
|
-
expect(wb.cell(2,3)).to eq('c')
|
43
|
-
end
|
44
|
-
|
45
|
-
#TODO:
|
46
|
-
# Test if author field is set - does roo parse that?
|
47
|
-
end
|
48
|
-
end
|
data/spec/axlsx_mailer_spec.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "Mailer", type: :request do
|
4
|
-
before :each do
|
5
|
-
@user = User.create name: 'Elmer', last_name: 'Fudd', address: '1234 Somewhere, Over NY 11111', email: 'elmer@fudd.com'
|
6
|
-
end
|
7
|
-
|
8
|
-
it "attaches an xlsx file" do
|
9
|
-
visit "/users/#{@user.id}/send_instructions"
|
10
|
-
last_email = ActionMailer::Base.deliveries.last
|
11
|
-
expect(last_email.to).to eq([@user.email])
|
12
|
-
expect(last_email.attachments.first).to be
|
13
|
-
expect(last_email.attachments.first.content_type).to match(/#{mime_type}/)
|
14
|
-
end
|
15
|
-
end
|
data/spec/axlsx_renderer_spec.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require'spec_helper'
|
2
|
-
|
3
|
-
describe 'Axlsx renderer' do
|
4
|
-
|
5
|
-
it "is registered" do
|
6
|
-
ActionController::Renderers::RENDERERS.include?(:xlsx)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "has mime type" do
|
10
|
-
mime = mime_type
|
11
|
-
expect(mime).to be
|
12
|
-
expect(mime.to_sym).to eq(:xlsx)
|
13
|
-
expect(mime.to_s).to eq("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
data/spec/axlsx_request_spec.rb
DELETED
@@ -1,202 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
describe 'Caxlsx request', :type => :request do
|
3
|
-
|
4
|
-
after(:each) do
|
5
|
-
if File.exists? '/tmp/caxlsx_temp.xlsx'
|
6
|
-
File.unlink '/tmp/caxlsx_temp.xlsx'
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
it "has a working dummy app" do
|
11
|
-
User.create name: 'Elmer', last_name: 'Fudd', address: '1234 Somewhere, Over NY 11111', email: 'elmer@fudd.com'
|
12
|
-
visit '/'
|
13
|
-
expect(page).to have_content("Hey, you")
|
14
|
-
end
|
15
|
-
|
16
|
-
it "downloads an excel file from default respond_to" do
|
17
|
-
visit '/home.xlsx'
|
18
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
19
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
20
|
-
wb = nil
|
21
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
22
|
-
expect(wb.cell(2,1)).to eq('Untie!')
|
23
|
-
end
|
24
|
-
|
25
|
-
it "downloads an excel file from respond_to while specifying filename" do
|
26
|
-
visit '/useheader.xlsx'
|
27
|
-
|
28
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s)
|
29
|
-
expect(page.response_headers['Content-Disposition']).to include("filename=\"filename_test.xlsx\"")
|
30
|
-
|
31
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
32
|
-
wb = nil
|
33
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
34
|
-
expect(wb.cell(2,1)).to eq('Untie!')
|
35
|
-
end
|
36
|
-
|
37
|
-
it "downloads an excel file from respond_to while specifying filename in direct format" do
|
38
|
-
visit '/useheader.xlsx?set_direct=true'
|
39
|
-
|
40
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
41
|
-
expect(page.response_headers['Content-Disposition']).to include("filename=\"filename_test.xlsx\"")
|
42
|
-
|
43
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
44
|
-
wb = nil
|
45
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
46
|
-
expect(wb.cell(2,1)).to eq('Untie!')
|
47
|
-
end
|
48
|
-
|
49
|
-
it "downloads an excel file from render statement with filename" do
|
50
|
-
visit '/another.xlsx'
|
51
|
-
|
52
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type)
|
53
|
-
expect(page.response_headers['Content-Disposition']).to include("filename=\"filename_test.xlsx\"")
|
54
|
-
|
55
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
56
|
-
wb = nil
|
57
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
58
|
-
expect(wb.cell(2,1)).to eq('Untie!')
|
59
|
-
end
|
60
|
-
|
61
|
-
it "downloads an excel file from acts_as_xlsx model" do
|
62
|
-
User.destroy_all
|
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
|
-
visit '/users.xlsx'
|
66
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
67
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
68
|
-
wb = nil
|
69
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
70
|
-
expect(wb.cell(3,2)).to eq('Bugs')
|
71
|
-
end
|
72
|
-
|
73
|
-
it "downloads an excel file with partial" do
|
74
|
-
visit '/withpartial.xlsx'
|
75
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
76
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
77
|
-
wb = nil
|
78
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
79
|
-
expect(wb.cell(1,1,wb.sheets[0])).to eq('Cover')
|
80
|
-
expect(wb.cell(2,1,wb.sheets[1])).to eq("Untie!")
|
81
|
-
end
|
82
|
-
|
83
|
-
it "handles nested resources" do
|
84
|
-
User.destroy_all
|
85
|
-
@user = User.create name: 'Bugs', last_name: 'Bunny', address: '1234 Left Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
86
|
-
@user.likes.create(:name => 'Carrots')
|
87
|
-
@user.likes.create(:name => 'Celery')
|
88
|
-
visit "/users/#{@user.id}/likes.xlsx"
|
89
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + "; charset=utf-8")
|
90
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
91
|
-
wb = nil
|
92
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
93
|
-
expect(wb.cell(1,1)).to eq('Bugs')
|
94
|
-
expect(wb.cell(2,1)).to eq('Carrots')
|
95
|
-
expect(wb.cell(3,1)).to eq('Celery')
|
96
|
-
end
|
97
|
-
|
98
|
-
it "handles reference to absolute paths" do
|
99
|
-
User.destroy_all
|
100
|
-
@user = User.create name: 'Bugs', last_name: 'Bunny', address: '1234 Left Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
101
|
-
visit "/users/#{@user.id}/render_elsewhere.xlsx"
|
102
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s)
|
103
|
-
[[1,false],[3,true],[4,true],[5,false]].reverse.each do |s|
|
104
|
-
visit "/home/render_elsewhere.xlsx?type=#{s[0]}"
|
105
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type.to_s + (s[1] ? "; charset=utf-8" : ''))
|
106
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
107
|
-
wb = nil
|
108
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
109
|
-
if s[0] == 5
|
110
|
-
expect(wb.cell(1,1)).to eq('Bad')
|
111
|
-
else
|
112
|
-
expect(wb.cell(2,2)).to eq('Bugs')
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
it "uses respond_with" do
|
118
|
-
User.destroy_all
|
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"
|
121
|
-
expect {
|
122
|
-
visit "/users/#{@user.id}.xlsx"
|
123
|
-
}.to_not raise_error
|
124
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
125
|
-
wb = nil
|
126
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
127
|
-
expect(wb.cell(2,1)).to eq('Untie!')
|
128
|
-
end
|
129
|
-
|
130
|
-
it "ignores layout" do
|
131
|
-
User.destroy_all
|
132
|
-
@user = User.create name: 'Responder', last_name: 'Bunny', address: '1234 Right Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
133
|
-
expect {
|
134
|
-
visit "/users/export/#{@user.id}.xlsx"
|
135
|
-
}.to_not raise_error
|
136
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
137
|
-
wb = nil
|
138
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
139
|
-
expect(wb.cell(2,1)).to eq('Untie!')
|
140
|
-
end
|
141
|
-
|
142
|
-
unless Rails.version < '3.2'
|
143
|
-
it "handles missing format with render :xlsx" do
|
144
|
-
visit '/another'
|
145
|
-
|
146
|
-
expect(page.response_headers['Content-Type']).to eq(mime_type)
|
147
|
-
expect(page.response_headers['Content-Disposition']).to include("filename=\"filename_test.xlsx\"")
|
148
|
-
|
149
|
-
File.open('/tmp/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
150
|
-
wb = nil
|
151
|
-
# wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx')
|
152
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to raise_error(Zip::ZipError)
|
153
|
-
# wb.cell(2,1).should == 'Untie!'
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
|
-
unless Rails.version < '4.0'
|
158
|
-
Capybara.register_driver :mime_all do |app|
|
159
|
-
Capybara::RackTest::Driver.new(app, headers: { 'HTTP_ACCEPT' => '*/*' })
|
160
|
-
end
|
161
|
-
|
162
|
-
def puts_def_formats(title)
|
163
|
-
puts "default formats #{title.ljust(30)}: #{ActionView::Base.default_formats}"
|
164
|
-
end
|
165
|
-
|
166
|
-
it "mime all with render :xlsx and then :html" do
|
167
|
-
# puts_def_formats 'before'
|
168
|
-
ActionView::Base.default_formats.delete :xlsx # see notes
|
169
|
-
# puts_def_formats 'in my project'
|
170
|
-
Capybara.current_driver = :mime_all
|
171
|
-
visit '/another'
|
172
|
-
# puts_def_formats 'after render xlsx with */*'
|
173
|
-
expect{
|
174
|
-
visit '/home/only_html'
|
175
|
-
}.to_not raise_error
|
176
|
-
ActionView::Base.default_formats.push :xlsx # see notes
|
177
|
-
|
178
|
-
# Output:
|
179
|
-
# default formats before : [:html, :text, :js, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :xlsx]
|
180
|
-
# default formats in my project : [:html, :text, :js, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip]
|
181
|
-
# default formats after render xlsx with */* : [:xlsx, :text, :js, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip]
|
182
|
-
|
183
|
-
# Failure/Error: visit '/home/only_html'
|
184
|
-
# ActionView::MissingTemplate:
|
185
|
-
# Missing template home/only_html, application/only_html with {:locale=>[:en], :formats=>[:xlsx, :text, :js, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :axlsx]}.
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
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/caxlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
197
|
-
wb = nil
|
198
|
-
expect{ wb = Roo::Excelx.new('/tmp/caxlsx_temp.xlsx') }.to_not raise_error
|
199
|
-
expect(wb.cell(3,2)).to eq('Bugs')
|
200
|
-
end
|
201
|
-
end
|
202
|
-
end
|
data/spec/ci.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
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")
|
9
|
-
elsif ENV['RAILS_VERSION'] =~ /^4/
|
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")
|
12
|
-
else
|
13
|
-
puts "Testing Rails 3"
|
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')
|
15
|
-
end
|
data/spec/dummy/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
-
|
5
|
-
require File.expand_path('../config/application', __FILE__)
|
6
|
-
|
7
|
-
Dummy::Application.load_tasks
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
//= require jquery
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|