Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. I was working on #163 and as I mentioned there, it was a bit difficult for me to get familiar with the test suite, so I started to move things around and in the end I got these changes running. I know it's a lot, so I'll try to get a list of what I've done:
Merge all dummy apps
They were almost the same apps, I only had to insert a few version checks, e.g.:
spec/rails_app/app/controllers/users_controller.rb
. This way we have less code to maintain and easier to add a new spec for all versions.Create a few gemfiles
This way you can run
BUNDLE_GEMFILE=spec/gemfiles/Gemfile.rails-X.Y bundle install
to install the gems andBUNDLE_GEMFILE=spec/gemfiles/Gemfile.rails-X.Y bundle exec rspec
to run the specs. I think it's easier to delete and old version when we don't support it anymore. Not sure if we need to add something to the Readme about this.Update github actions to pick up all versions
I had to define the bundler version for Rails 4.2 and exclude a few combunations, e.g. Rails 7 does not support older Ruby versions. Other than that we're running the full matrix.
Fix tests for Rails 6.1 & 7.0
In
lib/axlsx_rails/railtie.rb
we required the template handler only afteraction_view
already loaded, which does not happen in the rspec for some reason. I simply moved the require line out from theon_load
block. As it's just a simple plain old ruby class, it shouldn't do any harm - apart from loading theaction_view
unnecessarily... it was only required to have the template handler in ActionView's namespace (which we shouldn't do, all the gem codes should live under the gem's namespace anyways), so I also renamed the template handler and removed the inclusion ofaction_view
Delete all the
.sh
files as we don't need them anymoreI hope this all makes sense and we can merge it in to make this gem more maintainable