mongoid-paranoia 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 59731997a59d8f8be2add9159f4eb4a740b425e0
4
- data.tar.gz: 5c0020e86db647cf5426da8834f1ed2265fcb463
3
+ metadata.gz: fc24c0ced97e7874f1ede67769d583404566c9d1
4
+ data.tar.gz: 0de95f0da7e4629b174c6cd913f14d0253fd878c
5
5
  SHA512:
6
- metadata.gz: ba0d358116ee84d045c25a31229fa33824aaee2347d3f98a76ac35f9fa0f2e3c268dfca237be1fef87ee3279512e236bc19e1e6b58cb518fe07209c2d7251b95
7
- data.tar.gz: 44bec194e46f7dcedb7d7fb55c9d0b55847f5885d1de31045578624c07519097247c014142fb9c2e159bb22065322bb56d898877b21079d2c1b74307b816fd0b
6
+ metadata.gz: 4d8c7d26685e95732fd05d271448842213729afc0b5f7fc239be52272a84a8cc8dff643652365f27df8ad14af28b7e4264843fa374ca28b8cdf811e1a4e15b28
7
+ data.tar.gz: 022abe0146a850af533e7233e8861ab3957603927e09e48754e7b42cd68db60e9dc05624ba43c2d3b59367f867bd0c4afeade4a4625191eb8f91ce3adc039ee9
data/README.md CHANGED
@@ -3,7 +3,13 @@
3
3
  **Important:** This gem is an extraction of [Mongoid::Paranoia](http://mongoid.org/en/mongoid/v3/extras.html#paranoia) from the official [mongoid](http://mongoid.org) gem.
4
4
  Since Mongoid::Paranoia was removed in the `4.0.0` release of Mongoid, this gem re-enables the functionality of paranoid documents.
5
5
 
6
- **Please submit only bug and security fixes**. Neither I will accept new features nor changes to existing APIs. Please consider forking the project if you want new features to appear! :)
6
+ **Please submit only bug and security fixes**. Neither I will accept new features nor changes to existing APIs.
7
+
8
+ **Attention:** There are two similarly named gems out there: `mongoid-paranoia` and `mongoid_paranoia`
9
+
10
+ * `mongoid-paranoia`'s (this one) goal is to stay API compatible, which comes at the cost of (breaking) API changes to be rejected. If you're updating a Mongoid 3.x app to Mongoid 4.0 and you depend on `Mongoid::Paranoia` this gem is recommended for continuity.
11
+
12
+ * However if your code is working and you want new features, for example a `*_restore` callback, you should head over to @simi's `mongoid_paranoia` gem at https://github.com/simi/mongoid_paranoia. He is doing a great job there and is willing to accept your PRs ;)
7
13
 
8
14
  ---
9
15
 
@@ -4,6 +4,7 @@ module Mongoid
4
4
  module Builders
5
5
  module NestedAttributes
6
6
  class Many < NestedBuilder
7
+ alias_method :original_destroy, :destroy
7
8
 
8
9
  # Destroy the child document, needs to do some checking for embedded
9
10
  # relations and delay the destroy in case parent validation fails.
@@ -22,7 +23,7 @@ module Mongoid
22
23
  if doc.paranoid?
23
24
  destroy_document(relation, doc)
24
25
  else
25
- super
26
+ original_destroy(parent, relation, doc)
26
27
  end
27
28
  end
28
29
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Paranoia
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-paranoia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Uher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-24 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -310,8 +310,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
310
  version: '0'
311
311
  requirements: []
312
312
  rubyforge_project:
313
- rubygems_version: 2.2.2
313
+ rubygems_version: 2.4.8
314
314
  signing_key:
315
315
  specification_version: 4
316
316
  summary: Extraction of mongoid-paranoia into its own gem.
317
317
  test_files: []
318
+ has_rdoc: