mongoid-history 0.4.1 → 0.4.2

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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YWI0Y2U4OTJkZGNjZDE3NjNmYzAxNmFjNWE1NDc0ZmNhOTcxOWJiZg==
5
- data.tar.gz: !binary |-
6
- YzYyODI5Y2I4ODJhZGU5MjdmYmIxZjc2NTY3MzE5YWI0Mjk0MjA5MA==
2
+ SHA1:
3
+ metadata.gz: 913a0832973eef07a72d4ea723d6e9fa12285e9b
4
+ data.tar.gz: f8014e49bc8abd5af67ad229bd6c6a995a24653d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Mjk5ZGI3MjRhMzQ1YzZhZTUxOTFjMThhYWE0ZjZiNTNhOWE4NzkzYjJjOWFl
10
- MGQxMGVlZTFkNWI2M2Q5NjNkYWRhZWRkMjgxNmQxMTllYzg4OWJjNzk2NmU2
11
- ZmYwMjI5NzJkNWQzZWY1NzMzNjBjZmRkYmRlNGViMzczYzdlMDk=
12
- data.tar.gz: !binary |-
13
- MTBlYzQwMTRmYmViNGRiN2RmOGVjZDVhMWNhYzhjMTBiNTgwYTE4OWU1NDJh
14
- MGVjNGI5MGFiNmYyYzJhYmM5Nzc4ZDhlNGRmOWU4Y2E3YTc0NDk2N2UxNGJi
15
- ZTg0MDgxYmZlNmRkM2UwZjc3OGE2ODQ5ZjE4ZTM1MDYzNzU3Zjc=
6
+ metadata.gz: 79e4e82a0b8aa9a25bdbba77060b90921b75d469db982a609404ec3a511f4992b4c9a7a731b38d1509191201fa882ebd03cb13539634dbe01205de3edb5f5c09
7
+ data.tar.gz: 2bc72da395f9602b5cf7e90e17566b2cc0ce5f51db1b14924c4aeac8d02f40c2fdc81eefda20b774e995364e102cbca10ec1af46b7cca1dba063a963ef1b442f
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
@@ -0,0 +1,46 @@
1
+ Gemfile.lock
2
+
3
+ .rvmrc
4
+
5
+ # rcov generated
6
+ coverage
7
+
8
+ # rdoc generated
9
+ rdoc
10
+
11
+ # yard generated
12
+ doc
13
+ .yardoc
14
+
15
+ # bundler
16
+ .bundle
17
+
18
+ # jeweler generated
19
+ pkg
20
+
21
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
22
+ #
23
+ # * Create a file at ~/.gitignore
24
+ # * Include files you want ignored
25
+ # * Run: git config --global core.excludesfile ~/.gitignore
26
+ #
27
+ # After doing this, these files will be ignored in all your git projects,
28
+ # saving you from having to 'pollute' every project you touch with them
29
+ #
30
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
31
+ #
32
+ # For MacOS:
33
+ #
34
+ #.DS_Store
35
+ #
36
+ # For TextMate
37
+ #*.tmproj
38
+ #tmtags
39
+ #
40
+ # For emacs:
41
+ #*~
42
+ #\#*
43
+ #.\#*
44
+ #
45
+ # For vim:
46
+ #*.swp
data/.rspec CHANGED
@@ -1 +1,2 @@
1
- --color
1
+ --color
2
+ --format=documentation
@@ -1,75 +1,76 @@
1
- AllCops:
2
- Excludes:
3
- - vendor/**
4
- - bin/**
5
-
6
- LineLength:
7
- Enabled: false
8
-
9
- MethodLength:
10
- Enabled: false
11
-
12
- ClassLength:
13
- Enabled: false
14
-
15
- Documentation:
16
- # don't require classes to be documented
17
- Enabled: false
18
-
19
- CollectionMethods:
20
- # don't prefer map to collect, recuce to inject
21
- Enabled: false
22
-
23
- Encoding:
24
- # no need to always specify encoding
25
- Enabled: false
26
-
27
- HashMethods:
28
- # key? instead of has_key?
29
- # value? instead of has_value?
30
- Enabled: false
31
-
32
- StringLiterals:
33
- # use single or double-quoted strings, as you please
34
- Enabled: false
35
-
36
- Void:
37
- # == operator used in void context in specs
38
- Enabled: false
39
-
40
- SignalException:
41
- # prefer raise to fail
42
- EnforcedStyle: only_raise
43
-
44
- RaiseArgs:
45
- # don't care for what kind of raise
46
- Enabled: false
47
-
48
- PerlBackrefs:
49
- # TODO: regular expression matching with $1, $2, etc.
50
- Enabled: false
51
-
52
- BlockNesting:
53
- # TODO: fix too much nesting
54
- Max: 4
55
-
56
- Lambda:
57
- # TODO: replace all lambda with -> or Proc
58
- Enabled: false
59
-
60
- Blocks:
61
- # allow multi-line blocks like expect { }
62
- Enabled: false
63
-
64
- WordArray:
65
- # %w vs. [ '', ... ]
66
- Enabled: false
67
-
68
- CyclomaticComplexity:
69
- Enabled: false
70
-
71
- HandleExceptions:
72
- Enabled: false
73
-
74
- MultilineBlockChain:
75
- Enabled: false
1
+ AllCops:
2
+ Exclude:
3
+ - vendor/**/*
4
+ - bin/**/*
5
+
6
+ LineLength:
7
+ Enabled: false
8
+
9
+ MethodLength:
10
+ Enabled: false
11
+
12
+ ClassLength:
13
+ Enabled: false
14
+
15
+ Documentation:
16
+ # don't require classes to be documented
17
+ Enabled: false
18
+
19
+ CollectionMethods:
20
+ # don't prefer map to collect, recuce to inject
21
+ Enabled: false
22
+
23
+ Encoding:
24
+ # no need to always specify encoding
25
+ Enabled: false
26
+
27
+ StringLiterals:
28
+ # use single or double-quoted strings, as you please
29
+ Enabled: false
30
+
31
+ Void:
32
+ # == operator used in void context in specs
33
+ Enabled: false
34
+
35
+ SignalException:
36
+ # prefer raise to fail
37
+ EnforcedStyle: only_raise
38
+
39
+ RaiseArgs:
40
+ # don't care for what kind of raise
41
+ Enabled: false
42
+
43
+ PerlBackrefs:
44
+ # TODO: regular expression matching with $1, $2, etc.
45
+ Enabled: false
46
+
47
+ BlockNesting:
48
+ # TODO: fix too much nesting
49
+ Max: 4
50
+
51
+ Lambda:
52
+ # TODO: replace all lambda with -> or Proc
53
+ Enabled: false
54
+
55
+ Blocks:
56
+ # allow multi-line blocks like expect { }
57
+ Enabled: false
58
+
59
+ WordArray:
60
+ # %w vs. [ '', ... ]
61
+ Enabled: false
62
+
63
+ CyclomaticComplexity:
64
+ Enabled: false
65
+
66
+ HandleExceptions:
67
+ Enabled: false
68
+
69
+ MultilineBlockChain:
70
+ Enabled: false
71
+
72
+ FileName:
73
+ Enabled: false
74
+
75
+ RegexpLiteral:
76
+ Enabled: false
@@ -1,7 +1,16 @@
1
- services: mongodb
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.0.0
6
- - 1.9.3
7
- - jruby-19mode
1
+ services: mongodb
2
+
3
+ language: ruby
4
+
5
+ cache: bundler
6
+
7
+ rvm:
8
+ - 2.1.1
9
+ - 2.0.0
10
+ - 1.9.3
11
+ - rbx-2
12
+ - jruby-19mode
13
+
14
+ env:
15
+ - MONGOID_VERSION=3
16
+ - MONGOID_VERSION=4
@@ -1,94 +1,96 @@
1
- Next Release
2
- ------------
3
-
4
- Next Release
5
- ------------
6
-
7
- * Your contribution here.
8
-
9
- 0.4.1 (1/11/2014)
10
- -----------------
11
-
12
- * Fixed compatibility with Mongoid 4.x - [@dblock](https://github.com/dblock).
13
- * `Mongoid::History::Sweeper` has been removed, in accorance with Mongoid 4.x (see [#3108](https://github.com/mongoid/mongoid/issues/3108)) and Rails 4.x observer deprecation - [@dblock](https://github.com/dblock).
14
- * Default modifier parameter to `nil` in `undo!` and `redo!` - [@dblock](https://github.com/dblock).
15
- * Fixed `undo!` and `redo!` for mass-assignment protected attributes - [@mati0090](https://github.com/mati0090).
16
- * Implemented Rubocop, Ruby style linter - [@dblock](https://github.com/dblock).
17
- * Remove unneeded coma from README - [@matsprea](https://github.com/matsprea).
18
-
19
- 0.4.0 (6/12/2013)
20
- -----------------
21
-
22
- * Add `Mongoid::History.disable` and `Mongoid::History.enabled?` methods for global tracking disablement - [@johnnyshields](https://github.com/johnnyshields).
23
- * Add `:changes_method` that optionally overrides which method to call to collect changes - [@joelnordel](https://github.com/joelnordell).
24
- * [API Change] The `:destroy` action now stores trackers in the format `original=value, modified=nil` (previously it was the reverse) - [@johnnyshields](https://github.com/johnnyshields).
25
- * Support for polymorphic embedded classes - [@tstepp](https://github.com/tstepp).
26
- * Support for Mongoid field aliases, e.g. `field :n, as: :name` - [@johnnyshields](https://github.com/johnnyshields).
27
- * Support for Mongoid embedded aliases, e.g. `embeds_many :comments, store_as: :coms` - [@johnnyshields](https://github.com/johnnyshields).
28
- * Add `#tracked_changes` and `#tracked_edits` methods to `Tracker` class for nicer change summaries - [@johnnyshields](https://github.com/johnnyshields) and [@tstepp](https://github.com/tstepp).
29
- * Refactored and exposed `#trackable_parent_class` in `Tracker`, which returns the class of the trackable regardless of whether the trackable itself has been destroyed - [@johnnyshields](https://github.com/johnnyshields).
30
- * Add class-level `#tracked_field?` and `#tracked_fields` methods; refactor logic to determine whether a field is tracked - [@johnnyshields](https://github.com/johnnyshields).
31
- * Fix bug in Trackable#track_update where `return` condition at beginning of method caused a short-circuit where memoization would not be cleared properly. - [@johnnyshields](https://github.com/johnnyshields).
32
- * Tests: Added spec for nested embedded documents - [@matekb](https://github.com/matekb).
33
- * Tests: Test run time cut in half (~2.5s versus ~5s) by using `#let` helper and removing class initialization before each test - [@johnnyshields](https://github.com/johnnyshields).
34
- * Tests: Remove `database_cleaner` gem in favor of `Mongoid.purge!` - [@johnnyshields](https://github.com/johnnyshields).
35
- * Tests: Remove dependency on non-committed file `mongoid.yml` and hardcode collection to `mongoid_history_test` - [@johnnyshields](https://github.com/johnnyshields).
36
-
37
- 0.3.3 (4/1/2013)
38
- ----------------
39
-
40
- * [#42](https://github.com/aq1018/mongoid-history/issues/42) Fix: corrected creation of association chain when using nested embedded documents - [@matekb](https://github.com/matekb).
41
- * [#56](https://github.com/aq1018/mongoid-history/issues/56) Fix: now possible to undo setting (creating) attributes that was previously unset - [@matekb](https://github.com/matekb).
42
- * [#49](https://github.com/aq1018/mongoid-history/issues/49) Fix: now correctly undo/redo localized fields - [@edejong](https://github.com/edejong).
43
-
44
-
45
- 0.3.2 (1/24/2013)
46
- -----------------
47
-
48
- * [#54](https://github.com/aq1018/mongoid-history/pull/54) Use an index instead of the `$elemMatch` selector in `history_tracks` - [@vecio](https://github.com/vecio).
49
- * [#11](https://github.com/aq1018/mongoid-history/issues/11) Added `:modifier_field_inverse_of` on `track_history` that defines the `:inverse_of` relationship of the modifier class - [@matekb](https://github.com/matekb), [@dblock](https://github.com/dblock).
50
-
51
- 0.3.1 (11/16/2012)
52
- ------------------
53
-
54
- * [#45](https://github.com/aq1018/mongoid-history/pull/45) Fix: intermittent hash ordering issue with `history_tracks` - [@getaroom](https://github.com/getaroom).
55
- * [#50](https://github.com/aq1018/mongoid-history/pull/50) Fix: tracking of array changes, undo and redo of field changes on non-embedded objects - [@dblock](https://github.com/dblock).
56
-
57
- 0.3.0 (8/21/2012)
58
- -----------------
59
-
60
- * [#41](https://github.com/aq1018/mongoid-history/pull/41) Mongoid 3.x support - [@zambot](https://github.com/zambot).
61
-
62
- 0.2.4 (8/21/2012)
63
- -----------------
64
-
65
- * [#38](https://github.com/aq1018/mongoid-history/pull/38) Fix: allow sub-models to be tracked by using `collection_name` as the scope - [@acant](https://github.com/acant).
66
- * [#35](https://github.com/aq1018/mongoid-history/pull/35) Fix: sweeper references record of change, not the record changed - [@dblock](https://github.com/dblock).
67
-
68
- 0.2.3 (4/20/2012)
69
- -----------------
70
-
71
- * [#23](https://github.com/aq1018/mongoid-history/pull/34): Updated `Trackable::association_hash` to write through parent - [@tcopple](https://github.com/tcopple).
72
- * Fix: `Trackable::association_hash` nil meta value call - [@tcopple](https://github.com/tcopple).
73
- * [#27](https://github.com/aq1018/mongoid-history/pull/27): Added support for re-creation of destroyed embedded documents - [@erlingwl](https://github.com/erlingwl)
74
-
75
- 0.1.7 (12/9/2011)
76
- -----------------
77
-
78
- * Fix: tracking `false` values - [@gottfrois](https://github.com/gottfrois).
79
- * Use a mongoid observer and controller `around_filter` to pick up modifying user from controller - [@bensymonds](https://github.com/bensymonds).
80
- * More flexible dependency on mongoid - [@sarcilav](https://github.com/sarcilav).
81
- * Fix: tracking broken in a multithreaded environment - [@dblock](https://github.com/dblock).
82
-
83
- 0.1.0 (5/13/2011)
84
- -----------------
85
-
86
- * Added support for `destroy` - [@dblock](https://github.com/dblock).
87
- * Added undo and redo - [@aq1018](https://github.com/aq1018).
88
- * Added support for temporarily disabling history tracking - [@aq1018](https://github.com/aq1018).
89
- * Record modifier for undo and redo actions - [@aq1018](https://github.com/aq1018).
90
-
91
- 0.0.1 (3/4/2011)
92
- ----------------
93
-
94
- * Intial public release - [@aq1018](https://github.com/aq1018).
1
+ 0.4.2 (7/1/2014)
2
+ ----------------
3
+
4
+ * [#106](https://github.com/aq1018/mongoid-history/pull/106) - Added support for polymorphic relationship `scope` - [@adbeelitamar](https://github.com/adbeelitamar).
5
+ * [#106](https://github.com/aq1018/mongoid-history/pull/106) - Enabled specifying an array of relationships in `scope` - [@adbeelitamar](https://github.com/adbeelitamar).
6
+ * [#83](https://github.com/aq1018/mongoid-history/pull/83) - Added support for Mongoid 4.x, which removed `attr_accessible` in favor of protected attributes - [@dblock](https://github.com/dblock).
7
+ * [#103](https://github.com/aq1018/mongoid-history/pull/103) - Fixed compatibility with models using `default_scope` - [@mrjlynch](https://github.com/mrjlynch).
8
+
9
+ 0.4.1 (1/11/2014)
10
+ -----------------
11
+
12
+ * Fixed compatibility with Mongoid 4.x - [@dblock](https://github.com/dblock).
13
+ * `Mongoid::History::Sweeper` has been removed, in accorance with Mongoid 4.x (see [#3108](https://github.com/mongoid/mongoid/issues/3108)) and Rails 4.x observer deprecation - [@dblock](https://github.com/dblock).
14
+ * Default modifier parameter to `nil` in `undo!` and `redo!` - [@dblock](https://github.com/dblock).
15
+ * Fixed `undo!` and `redo!` for mass-assignment protected attributes - [@mati0090](https://github.com/mati0090).
16
+ * Implemented Rubocop, Ruby style linter - [@dblock](https://github.com/dblock).
17
+ * Remove unneeded coma from README - [@matsprea](https://github.com/matsprea).
18
+ * Replace Jeweler with Gem-Release - [@johnnyshields](https://github.com/johnnyshields).
19
+ * Track version as a Ruby file - [@johnnyshields](https://github.com/johnnyshields).
20
+
21
+ 0.4.0 (6/12/2013)
22
+ -----------------
23
+
24
+ * Add `Mongoid::History.disable` and `Mongoid::History.enabled?` methods for global tracking disablement - [@johnnyshields](https://github.com/johnnyshields).
25
+ * Add `:changes_method` that optionally overrides which method to call to collect changes - [@joelnordel](https://github.com/joelnordell).
26
+ * [API Change] The `:destroy` action now stores trackers in the format `original=value, modified=nil` (previously it was the reverse) - [@johnnyshields](https://github.com/johnnyshields).
27
+ * Support for polymorphic embedded classes - [@tstepp](https://github.com/tstepp).
28
+ * Support for Mongoid field aliases, e.g. `field :n, as: :name` - [@johnnyshields](https://github.com/johnnyshields).
29
+ * Support for Mongoid embedded aliases, e.g. `embeds_many :comments, store_as: :coms` - [@johnnyshields](https://github.com/johnnyshields).
30
+ * Add `#tracked_changes` and `#tracked_edits` methods to `Tracker` class for nicer change summaries - [@johnnyshields](https://github.com/johnnyshields) and [@tstepp](https://github.com/tstepp).
31
+ * Refactored and exposed `#trackable_parent_class` in `Tracker`, which returns the class of the trackable regardless of whether the trackable itself has been destroyed - [@johnnyshields](https://github.com/johnnyshields).
32
+ * Add class-level `#tracked_field?` and `#tracked_fields` methods; refactor logic to determine whether a field is tracked - [@johnnyshields](https://github.com/johnnyshields).
33
+ * Fix bug in Trackable#track_update where `return` condition at beginning of method caused a short-circuit where memoization would not be cleared properly. - [@johnnyshields](https://github.com/johnnyshields).
34
+ * Tests: Added spec for nested embedded documents - [@matekb](https://github.com/matekb).
35
+ * Tests: Test run time cut in half (~2.5s versus ~5s) by using `#let` helper and removing class initialization before each test - [@johnnyshields](https://github.com/johnnyshields).
36
+ * Tests: Remove `database_cleaner` gem in favor of `Mongoid.purge!` - [@johnnyshields](https://github.com/johnnyshields).
37
+ * Tests: Remove dependency on non-committed file `mongoid.yml` and hardcode collection to `mongoid_history_test` - [@johnnyshields](https://github.com/johnnyshields).
38
+
39
+ 0.3.3 (4/1/2013)
40
+ ----------------
41
+
42
+ * [#42](https://github.com/aq1018/mongoid-history/issues/42) Fix: corrected creation of association chain when using nested embedded documents - [@matekb](https://github.com/matekb).
43
+ * [#56](https://github.com/aq1018/mongoid-history/issues/56) Fix: now possible to undo setting (creating) attributes that was previously unset - [@matekb](https://github.com/matekb).
44
+ * [#49](https://github.com/aq1018/mongoid-history/issues/49) Fix: now correctly undo/redo localized fields - [@edejong](https://github.com/edejong).
45
+
46
+
47
+ 0.3.2 (1/24/2013)
48
+ -----------------
49
+
50
+ * [#54](https://github.com/aq1018/mongoid-history/pull/54) Use an index instead of the `$elemMatch` selector in `history_tracks` - [@vecio](https://github.com/vecio).
51
+ * [#11](https://github.com/aq1018/mongoid-history/issues/11) Added `:modifier_field_inverse_of` on `track_history` that defines the `:inverse_of` relationship of the modifier class - [@matekb](https://github.com/matekb), [@dblock](https://github.com/dblock).
52
+
53
+ 0.3.1 (11/16/2012)
54
+ ------------------
55
+
56
+ * [#45](https://github.com/aq1018/mongoid-history/pull/45) Fix: intermittent hash ordering issue with `history_tracks` - [@getaroom](https://github.com/getaroom).
57
+ * [#50](https://github.com/aq1018/mongoid-history/pull/50) Fix: tracking of array changes, undo and redo of field changes on non-embedded objects - [@dblock](https://github.com/dblock).
58
+
59
+ 0.3.0 (8/21/2012)
60
+ -----------------
61
+
62
+ * [#41](https://github.com/aq1018/mongoid-history/pull/41) Mongoid 3.x support - [@zambot](https://github.com/zambot).
63
+
64
+ 0.2.4 (8/21/2012)
65
+ -----------------
66
+
67
+ * [#38](https://github.com/aq1018/mongoid-history/pull/38) Fix: allow sub-models to be tracked by using `collection_name` as the scope - [@acant](https://github.com/acant).
68
+ * [#35](https://github.com/aq1018/mongoid-history/pull/35) Fix: sweeper references record of change, not the record changed - [@dblock](https://github.com/dblock).
69
+
70
+ 0.2.3 (4/20/2012)
71
+ -----------------
72
+
73
+ * [#23](https://github.com/aq1018/mongoid-history/pull/34): Updated `Trackable::association_hash` to write through parent - [@tcopple](https://github.com/tcopple).
74
+ * Fix: `Trackable::association_hash` nil meta value call - [@tcopple](https://github.com/tcopple).
75
+ * [#27](https://github.com/aq1018/mongoid-history/pull/27): Added support for re-creation of destroyed embedded documents - [@erlingwl](https://github.com/erlingwl)
76
+
77
+ 0.1.7 (12/9/2011)
78
+ -----------------
79
+
80
+ * Fix: tracking `false` values - [@gottfrois](https://github.com/gottfrois).
81
+ * Use a mongoid observer and controller `around_filter` to pick up modifying user from controller - [@bensymonds](https://github.com/bensymonds).
82
+ * More flexible dependency on mongoid - [@sarcilav](https://github.com/sarcilav).
83
+ * Fix: tracking broken in a multithreaded environment - [@dblock](https://github.com/dblock).
84
+
85
+ 0.1.0 (5/13/2011)
86
+ -----------------
87
+
88
+ * Added support for `destroy` - [@dblock](https://github.com/dblock).
89
+ * Added undo and redo - [@aq1018](https://github.com/aq1018).
90
+ * Added support for temporarily disabling history tracking - [@aq1018](https://github.com/aq1018).
91
+ * Record modifier for undo and redo actions - [@aq1018](https://github.com/aq1018).
92
+
93
+ 0.0.1 (3/4/2011)
94
+ ----------------
95
+
96
+ * Intial public release - [@aq1018](https://github.com/aq1018).