mongoid-pending_changes 0.1.2 → 0.2.0a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/mongoid/pending_changes/pending_changes.rb +7 -0
- data/lib/mongoid/pending_changes/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36663ef17779fba395f8efe76861599eb15f0bc2
|
4
|
+
data.tar.gz: ad7664ad93e27aa8e481350129540ef4c51808f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5604b61f2603c415ac798246c73626ff67079e9fb214d579e26d8d9e9e4a6b53ab0704c63dcc65e464f390d8796ea79fdbe1f0a06a6d3d0541423a697c2cbd16
|
7
|
+
data.tar.gz: df78268e42bc04d99952b29ce9e4698d31d2d601e51ae93acf702eb556fdded41b518941076cc91ab68247b74cf33b8601e5933c44ad62c3609d8984f594c695
|
data/README.md
CHANGED
@@ -10,6 +10,9 @@ This is an initial effort to develop an approval system to control changes to co
|
|
10
10
|
|
11
11
|
## Change Log
|
12
12
|
|
13
|
+
v0.2.0a:
|
14
|
+
Adding method `#get_change_number`, which returns the change from the changelist with the specified number
|
15
|
+
|
13
16
|
v0.1.2:
|
14
17
|
Fixing a bug where records created before the gem was used would cause an exception due to the required fields being nil.
|
15
18
|
|
@@ -47,6 +50,12 @@ model.push_for_approval({example: 'new example value'})
|
|
47
50
|
|
48
51
|
Your model will keep the original value, but a new entry will be added to the `changelist` property, with all changes and an incrementing ID.
|
49
52
|
|
53
|
+
If you need to recover a specific change from the changelist, you can use
|
54
|
+
|
55
|
+
```
|
56
|
+
change = mode.get_change_number(1)
|
57
|
+
change[:data][:example] == 'new example value'
|
58
|
+
```
|
50
59
|
|
51
60
|
## Development
|
52
61
|
|
@@ -59,5 +68,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
59
68
|
Bug reports and pull requests are welcome on GitHub at https://github.com/matheus208/mongoid-pending_changes.
|
60
69
|
|
61
70
|
## TODO list
|
62
|
-
|
71
|
+
* Write the TODO list
|
63
72
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-pending_changes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0a
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- matheus208
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,9 +115,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - "
|
118
|
+
- - ">"
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
120
|
+
version: 1.3.1
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
123
|
rubygems_version: 2.2.2
|
@@ -126,4 +126,3 @@ specification_version: 4
|
|
126
126
|
summary: Adds the options to push changes to a list instead of changing the document.
|
127
127
|
This list can then be handled later to update the real model.
|
128
128
|
test_files: []
|
129
|
-
has_rdoc:
|