paranoia 2.5.2 → 2.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6122d4c46b302086def8b0beb87e3ca9c06ae7a834d117d7bb7a8b0fce11f80
4
- data.tar.gz: 598b56a3af2868e8cbc8cb50f124b6d9d347dc2ca3af4a78012c01b9a6a281c0
3
+ metadata.gz: 5a82e404509dd15068040f391a794122bc66343af8def462f0eb4e37851b670f
4
+ data.tar.gz: fe04b171c8d485c18a4d41b2603780dfe15efebe1b3fd72d2a9074d0463642ae
5
5
  SHA512:
6
- metadata.gz: 7145f8fcc1e3a7810e96c772d92c8bc6624a30c4e3715ee85e3f34599585c3e2483c4f534790bf5031ff7f46f8c12b70d653182059f9896b5890d0e8c898a339
7
- data.tar.gz: 1537f8613522860bf7f4e571026b1b3fff29f936433d8d0e841780a92173c8749e86a1f5a30800907568d0394b0d618af00ea9f555d45c15841e751ba6906fd5
6
+ metadata.gz: e797a325e51bd15605087eae81c27c622df6b2b3e2c46466b6a3d2f4509e612a3712871e4140abb0530993b6773f59765cab1c10672572f3176c7e32401ecaab
7
+ data.tar.gz: b040f4ea08e809a827172755f7913da31a93aa5a9f7207ac9626fa9dadf848e36b352eb7084687cbee3a553c7f33124e434d291c900ffca3cfbe1dba340d0fb3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # paranoia Changelog
2
2
 
3
+ ## 2.5.3
4
+
5
+ * [#532](https://github.com/rubysherpas/paranoia/pull/532) Fix: correct bug when sentinel_value is not a timestamp
6
+ [Hassanin Ahmed](https://github.com/sas1ni69)
7
+ * [#531](https://github.com/rubysherpas/paranoia/pull/531) Added test case to reproduce bug introduce in v2.5.1
8
+ [Sherif Elkassaby](https://github.com/sherif-nedap)
9
+ * [#529](https://github.com/rubysherpas/paranoia/pull/529) Fix: Do not define a RSpec matcher when RSpec isn't present
10
+ [Sebastian Welther](https://github.com/swelther)
11
+
3
12
  ## 2.5.2
4
13
 
5
14
  * [#526](https://github.com/rubysherpas/paranoia/pull/526) Do not include tests files in packaged gem
@@ -19,7 +28,7 @@
19
28
 
20
29
  * [#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
21
30
  adding support for Rails 7
22
-
31
+
23
32
  [Mathieu Jobin](https://github.com/mathieujobin)
24
33
  * [#515](https://github.com/rubysherpas/paranoia/pull/515) Switch from Travis CI to GitHub Actions
25
34
 
@@ -31,7 +40,7 @@
31
40
 
32
41
  [Jörg Schiller](https://github.com/joergschiller)
33
42
 
34
- * [#483](https://github.com/rubysherpas/paranoia/pull/483) Update JRuby version to 9.2.8.0 + remove EOL Ruby 2.2
43
+ * [#483](https://github.com/rubysherpas/paranoia/pull/483) Update JRuby version to 9.2.8.0 + remove EOL Ruby 2.2
35
44
 
36
45
  [Uwe Kubosch](https://github.com/donv)
37
46
 
@@ -1,4 +1,4 @@
1
- if Rails.env.test?
1
+ if defined?(RSpec)
2
2
  require 'rspec/expectations'
3
3
 
4
4
  # Validate the subject's class did call "acts_as_paranoid"
@@ -23,4 +23,4 @@ if Rails.env.test?
23
23
  end
24
24
  end
25
25
 
26
- end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module Paranoia
2
- VERSION = '2.5.2'.freeze
2
+ VERSION = '2.5.3'.freeze
3
3
  end
data/lib/paranoia.rb CHANGED
@@ -138,7 +138,7 @@ module Paranoia
138
138
  end
139
139
 
140
140
  def paranoia_destroyed?
141
- deletion_time != paranoia_sentinel_value
141
+ paranoia_column_value != paranoia_sentinel_value
142
142
  end
143
143
  alias :deleted? :paranoia_destroyed?
144
144
 
@@ -296,12 +296,16 @@ ActiveSupport.on_load(:active_record) do
296
296
  self.class.paranoia_column
297
297
  end
298
298
 
299
+ def paranoia_column_value
300
+ send(paranoia_column)
301
+ end
302
+
299
303
  def paranoia_sentinel_value
300
304
  self.class.paranoia_sentinel_value
301
305
  end
302
306
 
303
307
  def deletion_time
304
- send(paranoia_column)
308
+ paranoia_column_value.acts_like?(:time) ? paranoia_column_value : deleted_at
305
309
  end
306
310
  end
307
311
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paranoia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - radarlistener@gmail.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-02 00:00:00.000000000 Z
11
+ date: 2022-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: 1.3.6
108
108
  requirements: []
109
- rubygems_version: 3.1.6
109
+ rubygems_version: 3.2.32
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, and 5,