Skip to content

Conversation

@simonoff
Copy link
Member

@simonoff simonoff commented Dec 8, 2023

No description provided.

joshbranham and others added 30 commits October 19, 2022 01:45
* Update Travis configuration

* Drop os, use default

* Use focal for OS

* Restore patch versions of ruby, rvm not pulling latest patch

* Update local test/run.sh script for easier local testing

* Add some old AR back, remove 3+ rubies, drop deprecated codeclimate gem

* Lock sqlite3 for Ruby 2.5

* ActiveRecord 6.0 and 6.1 tests failing, add later

* Drop 2.5

* Update gemspec, pry for dev support

* 5.1.1 AR works, update test/run.sh

* Fix support for ActiveRecord 5.2
In Ruby 3.0, positional arguments and keyword arguments will be
separated. Ruby 2.7 will warn for behaviors that will change in Ruby
3.0.

Co-authored-by: Igor Drozdov <idrozdov@gitlab.com>
Changed inccorectly -> incorrectly on line 412

Co-authored-by: Gabriel <gsturtevant87@gmail.com>
Co-authored-by: Alex Brinkman <alex@enlightenedpixel.com>
Signed-off-by: Josh Branham <josh.php@gmail.com>
As those should be passing or otherwise dealt with by the
time this is merged
…r Rails >= 5.2

Use #write_cast_value instead of #set_attribute_was patch
… with Rails 7

Prefix 'attr_encrypted' to encrypt and decrypt methods to avoid clash with Rails 7

Adopted from PR: #425
This project has been dead since 2018
* Start testing ruby 3

* Exclude older AR and newer Ruby combos

* Add Ruby 3.0.6 as well

* Exclude 3.0.6 and AR 5.x
Rails 7.1 will deprecate using the singleton ActiveSupport::Deprecation
instance. This directly uses the one from ActiveRecord.

Co-authored-by: Josh Branham <josh.php@gmail.com>
* Use Github Actions for CI

* Add back old Rails versions

* Only test Rails 5 on Ruby 2.7

---------

Co-authored-by: Josh Branham <josh.php@gmail.com>
Co-authored-by: Josh Branham <joshbranham@sophie-mba.local>
* Add Josh and Mike to authors

Signed-off-by: Josh Branham <josh.php@gmail.com>

* Update attr_encrypted.gemspec

Signed-off-by: Josh Branham <josh.php@gmail.com>

---------

Signed-off-by: Josh Branham <josh.php@gmail.com>
* Update README.md

Signed-off-by: Josh Branham <josh.php@gmail.com>

* Update README.md

Signed-off-by: Josh Branham <josh.php@gmail.com>

---------

Signed-off-by: Josh Branham <josh.php@gmail.com>
…pend (#457)

For example, when using the master branch of activerecord-multi-tenant, if activerecord-multi-tenant and attr_encrypted are listed in the Gemfile in that order, calling the reload method raises a SystemStackError. This happens because activerecord-multi-tenant extends Active Record’s reload method using prepend, while attr_encrypted extends it using an alias method.

Here’s an example of how extending the same method with both prepend and alias methods in that order can result in a SystemStackError

```
class Hello
  def hello
    'hello'
  end
end

Hello.prepend(Module.new do
  def hello
    super
  end
end)

Hello.class_eval do
  alias orig_hello hello

  def hello
    "#{orig_hello} world"
  end
end

Hello.new.hello #=> SystemStackError
```

However, reversing the order works:

```
class Hello
  def hello
    'hello'
  end
end

Hello.class_eval do
  alias orig_hello hello

  def hello
    "#{orig_hello} world"
  end
end

Hello.prepend(Module.new do
  def hello
    super
  end
end)

Hello.new.hello #=> "hello world"
```

This issue can be resolved by standardizing the method extension to use prepend to avoid conflicts.
Also updated actions/checkout to the latest v4.
The CI failures for Rails 6.0 to 7.0 are caused by changes introduced in concurrent-ruby v1.3.5.

ref: [Rails 7.0.8 fails to create an app with most recent concurrent-ruby version · Issue #54260 · rails/rails](rails/rails#54260)

Update concurrent-ruby to a version below 1.3.5 to fix the tests.
To run CI with Rails 8.0, sqlite3 version 2.1.0 or higher is required.
willnet and others added 7 commits January 23, 2025 18:39
dm-sqlite-adapter is a SQLite adapter for DataMapper.

https://github.com/datamapper/dm-sqlite-adapter

Since support for DataMapper was dropped in version 4.1.0, this gem is no longer needed as a dependency.
Add Rails7.2, 8.0 and Ruby 3.4 to CI matrix
`#attribute_instance_methods_as_symbols` can trigger a query when the
schema cache is not loaded.

We only need the results of this method if
`attribute_instance_methods_as_symbols_available?` is true so we move
this inside the check.

Signed-off-by: Bojan Marjanovic <marjanovic93@gmail.com>
Co-authored-by: Yuri Zubov <yuri.zubov@cleverlabs.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants