mongoid-undo 0.11.0 → 1.0.0

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: 7b8f85628210268bcf1b94ccb01bcf7b1192cef9
4
- data.tar.gz: df8975a7f1030b9bda9528ee468eaa286c8068b8
3
+ metadata.gz: 19492347296216836cfe8a40b1994b0a49aaabc3
4
+ data.tar.gz: 786e77d26b1a74aefeb94f5878d4c778dc65a191
5
5
  SHA512:
6
- metadata.gz: d5b44e701abc7cf4ab90cd0d89c830fe2aba2b9eaabc7249e0cf24538459e4eae1e4f16bfac9169a410563a6dc5b96d67c2f425ed84a9ab69dc1d38d2930ba0d
7
- data.tar.gz: 6423d0605e2b8841920d38d736c487083bcd16bb85fb74254405b47b57f9e7f8d2dfdd306a8a50feb9e81077a341cba49330d4b258c3b08238f7b4a87202100d
6
+ metadata.gz: 554821f592b475c4f591173d15879e70410a9f487a5aa11a9f8d8fa344dd2d79ece62c290fe334c1a6c051daa5ccede15b3b474d82a1a433cd3fe201a738d5fb
7
+ data.tar.gz: 5f4297de289c8ee64076bc708d5477ff7cfebdbc0523942fb753783a34a91231472b2f07f5e55a5edb11ff3084e7c8e2d0e55c0f92b8399d584ce820254819da
@@ -1,6 +1,21 @@
1
- # 0.8.0 (March 30, 2014)
1
+ # 0.11.0 (June 29, 2014)
2
+ * Adds undoable? (and respectively redoable?) methods to check whether a new version was saved or not.
3
+
4
+ # 0.10.1 (April 16, 2014)
5
+ * Switches to non anonymous callbacks.
6
+
7
+ # 0.10.0 (March 30, 2014)
2
8
  * Adds both callbacks for undo and redo.
3
9
 
10
+ # 0.9.1 (February 17, 2014)
11
+ * We are still on minitest 4. 😞
12
+
13
+ # 0.9.0 (February 17, 2014)
14
+ * Whoa! Removes ruby version from Gemfile.
15
+
16
+ # 0.8.0 (February 10, 2014)
17
+ * Fixes \#2: updated_at-columns not working anymore.
18
+
4
19
  # 0.7.0 (February 8, 2014)
5
20
  * Simpler tests.
6
21
 
@@ -1,5 +1,7 @@
1
1
  require 'active_support'
2
2
  require 'mongoid'
3
+ require 'mongoid/paranoia'
4
+ require 'mongoid/versioning'
3
5
 
4
6
  module Mongoid
5
7
  module Undo
@@ -7,9 +9,11 @@ module Mongoid
7
9
 
8
10
  include Mongoid::Paranoia
9
11
  include Mongoid::Versioning
10
- include Mongoid::Callbacks
12
+ include Mongoid::Interceptable
11
13
 
12
14
  included do
15
+ # _id must be marked as not-versioned
16
+ fields['_id'].options.merge!(versioned: false)
13
17
  field :action, type: Symbol, versioned: false
14
18
  index deleted_at: 1
15
19
 
@@ -56,7 +60,7 @@ module Mongoid
56
60
 
57
61
  private
58
62
  def retrieve
59
- update_attributes(versions.last.versioned_attributes.except('version', 'updated_at'))
63
+ update versions.last.versioned_attributes.except('version', 'updated_at')
60
64
  end
61
65
  end
62
66
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Undo
3
- VERSION = '0.11.0'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
@@ -14,5 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.require_path = 'lib'
15
15
 
16
16
  gem.add_dependency 'activesupport'
17
- gem.add_dependency 'mongoid', '>= 3.0.10', '< 4.0'
17
+ gem.add_dependency 'mongoid', '~> 4.0.0'
18
+ gem.add_dependency 'mongoid-paranoia', '~> 1.0.0'
19
+ gem.add_dependency 'mongoid-versioning', '~> 1.0.0'
18
20
  end
@@ -4,5 +4,3 @@ test:
4
4
  database: mongoid_undo_test
5
5
  hosts:
6
6
  - localhost:27017
7
- options:
8
- consistency: :strong
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-undo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 1.0.0
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-29 00:00:00.000000000 Z
11
+ date: 2014-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,22 +28,44 @@ dependencies:
28
28
  name: mongoid
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.10
34
- - - "<"
33
+ version: 4.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 4.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: mongoid-paranoia
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
35
46
  - !ruby/object:Gem::Version
36
- version: '4.0'
47
+ version: 1.0.0
37
48
  type: :runtime
38
49
  prerelease: false
39
50
  version_requirements: !ruby/object:Gem::Requirement
40
51
  requirements:
41
- - - ">="
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: mongoid-versioning
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
42
60
  - !ruby/object:Gem::Version
43
- version: 3.0.10
44
- - - "<"
61
+ version: 1.0.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
45
67
  - !ruby/object:Gem::Version
46
- version: '4.0'
68
+ version: 1.0.0
47
69
  description: mongoid-undo provides a super simple and easy to use undo system for
48
70
  Mongoid apps.
49
71
  email: uher.mario@gmail.com
@@ -86,3 +108,4 @@ signing_key:
86
108
  specification_version: 4
87
109
  summary: Super simple undo for your Mongoid app.
88
110
  test_files: []
111
+ has_rdoc: