with_advisory_lock 4.6.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +80 -0
  3. data/.gitignore +2 -0
  4. data/.tool-versions +1 -1
  5. data/Appraisals +34 -18
  6. data/CHANGELOG.md +9 -0
  7. data/Gemfile +0 -12
  8. data/README.md +17 -6
  9. data/gemfiles/{activerecord_6.0.gemfile → activerecord_6.1.gemfile} +4 -2
  10. data/gemfiles/{activerecord_5.2.gemfile → activerecord_7.0.gemfile} +4 -2
  11. data/gemfiles/activerecord_7.1.gemfile +14 -0
  12. data/lib/with_advisory_lock/base.rb +16 -2
  13. data/lib/with_advisory_lock/concern.rb +16 -16
  14. data/lib/with_advisory_lock/database_adapter_support.rb +4 -41
  15. data/lib/with_advisory_lock/failed_to_acquire_lock.rb +7 -0
  16. data/lib/with_advisory_lock/flock.rb +4 -3
  17. data/lib/with_advisory_lock/mysql.rb +5 -5
  18. data/lib/with_advisory_lock/postgresql.rb +9 -7
  19. data/lib/with_advisory_lock/version.rb +3 -1
  20. data/lib/with_advisory_lock.rb +1 -2
  21. data/test/concern_test.rb +23 -10
  22. data/test/lock_test.rb +61 -28
  23. data/test/nesting_test.rb +14 -79
  24. data/test/options_test.rb +35 -33
  25. data/test/parallelism_test.rb +35 -37
  26. data/test/shared_test.rb +93 -90
  27. data/test/test_helper.rb +52 -0
  28. data/test/test_models.rb +9 -7
  29. data/test/thread_test.rb +23 -22
  30. data/test/transaction_test.rb +34 -36
  31. data/with_advisory_lock.gemspec +24 -23
  32. metadata +25 -41
  33. data/.travis.yml +0 -38
  34. data/gemfiles/activerecord_4.2.gemfile +0 -19
  35. data/gemfiles/activerecord_5.0.gemfile +0 -19
  36. data/gemfiles/activerecord_5.1.gemfile +0 -19
  37. data/lib/with_advisory_lock/mysql_no_nesting.rb +0 -20
  38. data/lib/with_advisory_lock/nested_advisory_lock_error.rb +0 -14
  39. data/test/database.yml +0 -17
  40. data/test/minitest_helper.rb +0 -40
  41. data/tests.sh +0 -11
data/tests.sh DELETED
@@ -1,11 +0,0 @@
1
- #!/bin/bash -e
2
- export DB
3
-
4
- for RUBY in 2.4.0 jruby-1.7.13 ; do
5
- rbenv local $RUBY
6
- for DB in mysql postgresql sqlite ; do
7
- echo "$DB | $(ruby -v)"
8
- # appraisal bundle update
9
- appraisal rake test --verbose
10
- done
11
- done