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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7550ca99813f39e03b386723ccfa404099230f2a
4
- data.tar.gz: 72fbf28be1428d0077774135b17569a46516dc40
3
+ metadata.gz: 3cc3c201e6519c2d553c3ff65498eb9c83f80f79
4
+ data.tar.gz: 97ec625b1538b6c7b1175d62bac82533e149f259
5
5
  SHA512:
6
- metadata.gz: 4d567d4062f2f80480385d56d4ff0e65a500d6b302482ded9ac7bbd49cbe6253d6b9b9a73d695dde2ca4bef7df0e35f077aadb879e05c1b01064b5bf9119c884
7
- data.tar.gz: 7e4b2246187a47ca7c1084f72fff9335f55aff8adfcc797be954fad59b65dfa61555833e10ec9d5b49d39b0152b57d550a36bf647cf4cdf5d7c9fbb4433c679c
6
+ metadata.gz: 0696b0c387582206fde14ceb61f90044e7021441b285770a4bcfe121f56a2f8108f1faf415e1e1666452ba63e4347ea2c09c67243aaf833d6fb6b389af455185
7
+ data.tar.gz: 97ba0a85ae1f76f832e2e65775aada40e5f8e9a2dcd8a50123f4f545ad0737a5a005445948d3aaf258e849de1436d097d1d33edea2f2b4e4a34c8763542ce7d2
@@ -26,8 +26,8 @@ module Menagerie
26
26
  private
27
27
 
28
28
  def rotate
29
- existing = releases.reverse.sort
30
- keepers = existing.shift(@options[:retention])
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.ln_sf releases.sort.first.path, "#{@paths[:latest]}"
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'menagerie'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.date = Time.now.strftime("%Y-%m-%d")
5
5
 
6
6
  s.summary = ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: menagerie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker