memories 0.3.1 → 0.3.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.
- data/lib/memories/base.rb +10 -0
- metadata +3 -3
data/lib/memories/base.rb
CHANGED
|
@@ -315,6 +315,16 @@ module Memories
|
|
|
315
315
|
self.milestones.last
|
|
316
316
|
end
|
|
317
317
|
|
|
318
|
+
# Returns true if this instance represents a milestone
|
|
319
|
+
def milestone?
|
|
320
|
+
self.milestones.collect(&:version_number).include? self.logical_version_number
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Returns true if this instance is the version made right after a milestone, to denote the previous version as a milestone.
|
|
324
|
+
def milestone_commit?
|
|
325
|
+
self.milestones.collect(&:version_number).include? self.logical_version_number - 1
|
|
326
|
+
end
|
|
327
|
+
|
|
318
328
|
# When you soft revert a document, you can ask what the logical revision of it is.
|
|
319
329
|
# For example, suppose you soft revert a document with 10 versions to version 2.
|
|
320
330
|
# @doc.revert_to 2
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: memories
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 0.3.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.3.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Matt Parker
|