menagerie 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/menagerie/collection.rb +4 -3
- data/menagerie.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cc3c201e6519c2d553c3ff65498eb9c83f80f79
|
4
|
+
data.tar.gz: 97ec625b1538b6c7b1175d62bac82533e149f259
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0696b0c387582206fde14ceb61f90044e7021441b285770a4bcfe121f56a2f8108f1faf415e1e1666452ba63e4347ea2c09c67243aaf833d6fb6b389af455185
|
7
|
+
data.tar.gz: 97ba0a85ae1f76f832e2e65775aada40e5f8e9a2dcd8a50123f4f545ad0737a5a005445948d3aaf258e849de1436d097d1d33edea2f2b4e4a34c8763542ce7d2
|
data/lib/menagerie/collection.rb
CHANGED
@@ -26,8 +26,8 @@ module Menagerie
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def rotate
|
29
|
-
existing = releases.reverse
|
30
|
-
keepers = existing.
|
29
|
+
existing = releases.sort.reverse
|
30
|
+
keepers = existing.pop(@options[:retention])
|
31
31
|
existing.each(&:delete)
|
32
32
|
keepers.each(&:rotate)
|
33
33
|
end
|
@@ -36,7 +36,8 @@ module Menagerie
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def link_latest
|
39
|
-
FileUtils.
|
39
|
+
FileUtils.rm_f @paths[:latest]
|
40
|
+
FileUtils.ln_sf releases.sort.first.path, @paths[:latest]
|
40
41
|
end
|
41
42
|
|
42
43
|
def default_paths
|
data/menagerie.gemspec
CHANGED