Skip to content

Commit

Permalink
rails 7.1 test suite (#32)
Browse files Browse the repository at this point in the history
* rails 7.1 test suite

* add note
  • Loading branch information
waymondo authored Dec 24, 2023
1 parent d4589df commit 8817276
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- "3.2"
rails:
- "7.0"
# - "7.1"
- "7.1"

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- *Breaking Change* - Support for Ruby 2.7 and Rails 6.1 is dropped
- *Breaking Change* - The default scoping clause that controls the inherited table SQL construction
changes from a where clause using `tableoid`s to using `FROM ONLY`.
- fixes an issue for Rails 7.1 regarding accessing version table columns through aliased attributes

## 0.14.3

Expand Down
9 changes: 6 additions & 3 deletions lib/hoardable/version_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ def version_class
self.table_name = "#{table_name.singularize}#{VERSION_TABLE_SUFFIX}"

alias_method :readonly?, :persisted?
alias_attribute :hoardable_operation, :_operation
alias_attribute :hoardable_event_uuid, :_event_uuid
alias_attribute :hoardable_during, :_during

[:operation, :event_uuid, :during].each do |symbol|
define_method("hoardable_#{symbol}") do
public_send("_#{symbol}")
end
end

# @!scope class
# @!method trashed
Expand Down
3 changes: 2 additions & 1 deletion test/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
class Dummy < Rails::Application
config.load_defaults Rails::VERSION::STRING.to_f
config.eager_load = false
config.active_storage.service_configurations = {}
config.active_storage.service_configurations = { local: { service: "Disk", root: "tmp/storage" } }
config.active_storage.service = :local
config.paths['config/database'] = ['test/config/database.yml']
config.paths['db/migrate'] = ['tmp/db/migrate']
config.active_record.encryption&.key_derivation_salt = SecureRandom.hex
Expand Down

0 comments on commit 8817276

Please sign in to comment.