Skip to content

Commit

Permalink
Merge branch 'core' into feature/dirty-tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieujobin committed Sep 1, 2023
2 parents 2e4938b + 1db8402 commit cabecf1
Show file tree
Hide file tree
Showing 12 changed files with 952 additions and 141 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,51 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: build

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
rails: ["~> 7.0.0", "~> 6.1.0", "~> 6.0.0"]
ruby: ["3.2.2", "3.1.4", "3.0.6", "2.7.8"]
include:
- ruby: 3.2
rails: 'edge'
# single test failure with jruby
#- ruby: jruby-9.4
# rails: '~> 7.0.0'
- ruby: 2.6
rails: '~> 6.1.0'
- ruby: 2.6
rails: '~> 6.0.0'
- ruby: 2.6
rails: '~> 5.2.0'
- ruby: 2.6
rails: '~> 5.1.0'
- ruby: 2.5
rails: '~> 6.0.0'
- ruby: 2.5
rails: '~> 5.2.0'
- ruby: 2.5
rails: '~> 5.1.0'
#os: ubuntu-latest
#arch: x64

env:
RAILS: ${{ matrix.rails }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

147 changes: 145 additions & 2 deletions CHANGELOG.md
@@ -1,5 +1,148 @@
# paranoia Changelog

## 2.6.2

* [#441](https://github.com/rubysherpas/paranoia/pull/441) Recursive restore with has_many/one through assocs (#441)
[Emil Ong](https://github.com/emilong)

## 2.6.1

* [#535](https://github.com/rubysherpas/paranoia/pull/535) Allow to skip updating paranoia_destroy_attributes for records while really_destroy!
[Anton Bogdanov](https://github.com/kortirso)

## 2.6.0

* [#512](https://github.com/rubysherpas/paranoia/pull/512) Quote table names; Mysql 8 has keywords that might match table names which cause an exception.
* [#476](https://github.com/rubysherpas/paranoia/pull/476) Fix syntax error in documentation.
* [#485](https://github.com/rubysherpas/paranoia/pull/485) Rollback transaction if destroy aborted.
* [#522](https://github.com/rubysherpas/paranoia/pull/522) Add failing tests for association with abort on destroy.
* [#513](https://github.com/rubysherpas/paranoia/pull/513) Fix create callback called on destroy.

## 2.5.3

* [#532](https://github.com/rubysherpas/paranoia/pull/532) Fix: correct bug when sentinel_value is not a timestamp
[Hassanin Ahmed](https://github.com/sas1ni69)
* [#531](https://github.com/rubysherpas/paranoia/pull/531) Added test case to reproduce bug introduce in v2.5.1
[Sherif Elkassaby](https://github.com/sherif-nedap)
* [#529](https://github.com/rubysherpas/paranoia/pull/529) Fix: Do not define a RSpec matcher when RSpec isn't present
[Sebastian Welther](https://github.com/swelther)

## 2.5.2

* [#526](https://github.com/rubysherpas/paranoia/pull/526) Do not include tests files in packaged gem

[Jason Fleetwood-Boldt](https://github.com/jasonfb)
* [#492](https://github.com/rubysherpas/paranoia/pull/492) Warn if acts_as_paranoid is called more than once on the same model

[Ignatius Reza](https://github.com/ignatiusreza)

## 2.5.1

* [#481](https://github.com/rubysherpas/paranoia/pull/481) Replaces hard coded `deleted_at` with `paranoia_column`.

[Hassanin Ahmed](https://github.com/sas1ni69)

## 2.5.0

* [#516](https://github.com/rubysherpas/paranoia/pull/516) Add support for ActiveRecord 7.0, drop support for EOL Ruby < 2.5 and Rails < 5.1
adding support for Rails 7

[Mathieu Jobin](https://github.com/mathieujobin)
* [#515](https://github.com/rubysherpas/paranoia/pull/515) Switch from Travis CI to GitHub Actions

[Shinichi Maeshima](https://github.com/willnet)

## 2.4.3

* [#503](https://github.com/rubysherpas/paranoia/pull/503) Bump activerecord dependency for Rails 6.1

[Jörg Schiller](https://github.com/joergschiller)

* [#483](https://github.com/rubysherpas/paranoia/pull/483) Update JRuby version to 9.2.8.0 + remove EOL Ruby 2.2

[Uwe Kubosch](https://github.com/donv)

* [#482](https://github.com/rubysherpas/paranoia/pull/482) Fix after_commit for Rails 6

[Ashwin Hegde](https://github.com/hashwin)

## 2.4.2

* [#470](https://github.com/rubysherpas/paranoia/pull/470) Add support for ActiveRecord 6.0

[Anton Kolodii](https://github.com/iggant), [Jared Norman](https://github.com/jarednorman)

## 2.4.1

* [#435](https://github.com/rubysherpas/paranoia/pull/435) Monkeypatch activerecord relations to work with rails 5.2.0

[Bartosz Bonisławski (@bbonislawski)](https://github.com/bbonislawski)

## 2.4.0

* [#423](https://github.com/rubysherpas/paranoia/pull/423) Add `paranoia_destroy` and `paranoia_delete` aliases

[John Hawthorn (@jhawthorn)](https://github.com/jhawthorn)

* [#408](https://github.com/rubysherpas/paranoia/pull/408) Fix instance variable `@_disable_counter_cache` not initialized warning.

[Akira Matsuda (@amatsuda)](https://github.com/amatsuda)

* [#412](https://github.com/rubysherpas/paranoia/pull/412) Fix `really_destroy!` behavior with `sentinel_value`

[Steve Rice (@steverice)](https://github.com/steverice)

## 2.3.1

* [#397](https://github.com/rubysherpas/paranoia/pull/397) Bump active record max version to support 5.1 final

## 2.3.0 (2017-04-14)

* [#393](https://github.com/rubysherpas/paranoia/pull/393) Drop support for Rails 4.1 and begin supporting Rails 5.1.

[Miklós Fazekas (@mfazekas)](https://github.com/mfazekas)

* [#391](https://github.com/rubysherpas/paranoia/pull/391) Use Contributor Covenant Version 1.4

[Ben A. Morgan (@BenMorganIO)](https://github.com/BenMorganIO)

* [#390](https://github.com/rubysherpas/paranoia/pull/390) Fix counter cache with double destroy, really_destroy, and restore

[Chris Oliver (@excid3)](https://github.com/excid3)

* [#389](https://github.com/rubysherpas/paranoia/pull/389) Added association not soft destroyed validator

_Fixes [#380](https://github.com/rubysherpas/paranoia/issues/380)_

[Edward Poot (@edwardmp)](https://github.com/edwardmp)

* [#383](https://github.com/rubysherpas/paranoia/pull/383) Add recovery window feature

_Fixes [#359](https://github.com/rubysherpas/paranoia/issues/359)_

[Andrzej Piątyszek (@konto-andrzeja)](https://github.com/konto-andrzeja)


## 2.2.1 (2017-02-15)

* [#371](https://github.com/rubysherpas/paranoia/pull/371) Use ActiveSupport.on_load to correctly re-open ActiveRecord::Base

_Fixes [#335](https://github.com/rubysherpas/paranoia/issues/335) and [#381](https://github.com/rubysherpas/paranoia/issues/381)._

[Iaan Krynauw (@iaankrynauw)](https://github.com/iaankrynauw)

* [#377](https://github.com/rubysherpas/paranoia/pull/377) Touch record on paranoia-destroy.

_Fixes [#296](https://github.com/rubysherpas/paranoia/issues/296)._

[René (@rbr)](https://github.com/rbr)

* [#379](https://github.com/rubysherpas/paranoia/pull/379) Fixes a problem of ambiguous table names when using only_deleted method.

_Fixes [#26](https://github.com/rubysherpas/paranoia/issues/26) and [#27](https://github.com/rubysherpas/paranoia/pull/27)._

[Thomas Romera (@Erowlin)](https://github.com/Erowlin)

## 2.2.0 (2016-10-21)

* Ruby 2.0 or greater is required
Expand All @@ -24,15 +167,15 @@

* `#destroyed?` is no longer overridden. Use `#paranoia_destroyed?` for the existing behaviour. [Washington Luiz](https://github.com/huoxito)
* `#persisted?` is no longer overridden.
* ActiveRecord 4.0 no longer has `#destroy!` as an alias for `#really_destroy`.
* ActiveRecord 4.0 no longer has `#destroy!` as an alias for `#really_destroy!`.
* `#destroy` will now raise an exception if called on a readonly record.
* `#destroy` on a hard deleted record is now a successful noop.
* `#destroy` on a new record will set deleted_at (previously this raised an error)
* `#destroy` and `#delete` always return self when successful.

### Bug Fixes

* Calling `#destroy` twice will not hard-delete records. Use `#really_destroy` if this is desired.
* Calling `#destroy` twice will not hard-delete records. Use `#really_destroy!` if this is desired.
* Fix errors on non-paranoid has_one dependent associations

## 2.0.5 (2015-01-22)
Expand Down
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at ben@benmorgan.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
28 changes: 20 additions & 8 deletions Gemfile
@@ -1,20 +1,32 @@
source 'https://rubygems.org'

gem 'sqlite3', platforms: [:ruby]
sqlite = ENV['SQLITE_VERSION']

if sqlite
gem 'sqlite3', sqlite, platforms: [:ruby]
else
gem 'sqlite3', platforms: [:ruby]
end

platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter', github: 'jruby/activerecord-jdbc-adapter', branch: 'rails-5'
gem 'activerecord-jdbcsqlite3-adapter'
end

platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubysl-test-unit'
gem 'rubinius-developer_tools'
if RUBY_ENGINE == 'rbx'
platforms :rbx do
gem 'rubinius-developer_tools'
gem 'rubysl', '~> 2.0'
gem 'rubysl-test-unit'
end
end

rails = ENV['RAILS'] || '~> 4.2.0'
rails = ENV['RAILS'] || '~> 6.0.4'

gem 'rails', rails
if rails == 'edge'
gem 'rails', github: 'rails/rails'
else
gem 'rails', rails
end

# Specify your gem's dependencies in paranoia.gemspec
gemspec

0 comments on commit cabecf1

Please sign in to comment.