menagerie 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/bin/menagerie +12 -0
- data/lib/menagerie/collection.rb +8 -4
- data/menagerie.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbf78ed959e39be50004b49801ec0b406c1d7a3c
|
4
|
+
data.tar.gz: 24c340b7d9fab6465dbef45b57ff073740d0b35c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a17c2cd269ef75e28a596b3e9adfdbe584942690ac1900ed9d7687d5bb1c5d604b284cfb898676b057a666f3a07fd2f9055583e49ce79234855061ceafcbfe8
|
7
|
+
data.tar.gz: 6fbb56e25c3c450f9c26a125594b5059f1a962c2b6ec657ff24b2fdeb1cc7688443d3ce31b7c85e5e0b2ddd7a6c7fd9e18b298cbe4bf1fd20226a9e2b44fe94a
|
data/Rakefile
CHANGED
data/bin/menagerie
ADDED
data/lib/menagerie/collection.rb
CHANGED
@@ -17,6 +17,13 @@ module Menagerie
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def orphans
|
21
|
+
keepers = releases.map(&:artifacts).flatten.map(&:path).uniq
|
22
|
+
Dir.glob("#{@paths[:artifacts]}/*/*").reject do |artifact|
|
23
|
+
keepers.include? artifact
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
20
27
|
def create(artifacts)
|
21
28
|
rotate
|
22
29
|
Release.new artifacts: Cymbal.symbolize(artifacts), paths: @paths
|
@@ -34,10 +41,7 @@ module Menagerie
|
|
34
41
|
end
|
35
42
|
|
36
43
|
def reap
|
37
|
-
|
38
|
-
Dir.glob("#{@paths[:artifacts]}/*/*").each do |artifact|
|
39
|
-
FileUtils.rm_f(artifact) unless keepers.include? artifact
|
40
|
-
end
|
44
|
+
orphans.each { |orphan| FileUtils.rm_f orphan }
|
41
45
|
end
|
42
46
|
|
43
47
|
def link_latest
|
data/menagerie.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: menagerie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cymbal
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- LICENSE
|
109
109
|
- README.md
|
110
110
|
- Rakefile
|
111
|
+
- bin/menagerie
|
111
112
|
- lib/menagerie.rb
|
112
113
|
- lib/menagerie/artifact.rb
|
113
114
|
- lib/menagerie/collection.rb
|