s3repo 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/s3repo/metadata.rb +6 -0
- data/lib/s3repo/repo.rb +3 -2
- data/lib/s3repo/version.rb +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: ef33abc7a9c68094cea63f78eda508e1d28410f6
|
4
|
+
data.tar.gz: 4bdecf7a7da13f587885170820ea4ec366023e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00a381930d91c53ab11280a6ee3e123013ac4c11ee748cfb4ea2cd7ebb7cb685797fc9e26a6c1a005bf0a88b72cf23dbbcdd2465b98452497ff9dcb44ee647db
|
7
|
+
data.tar.gz: 3424d3b8beb09b9228ab369d3b0571dc07eb395ac732ff1ee53d60707b46a76f433b36db1e085f48fb582feb9aa00bbd9677a115eae3aa228a4d963fc062234e
|
data/lib/s3repo/metadata.rb
CHANGED
@@ -17,10 +17,16 @@ module S3Repo
|
|
17
17
|
run("repo-add #{db_path} #{path}")
|
18
18
|
end
|
19
19
|
client.upload!('repo.db', db_path)
|
20
|
+
sign_db if ENV['S3REPO_SIGN_DB']
|
20
21
|
end
|
21
22
|
|
22
23
|
private
|
23
24
|
|
25
|
+
def sign_db
|
26
|
+
run "gpg --detach-sign --use-agent #{db_path}"
|
27
|
+
client.upload!('repo.db.sig', "#{db_path}.sig")
|
28
|
+
end
|
29
|
+
|
24
30
|
def db_path
|
25
31
|
@db_path ||= download_db
|
26
32
|
end
|
data/lib/s3repo/repo.rb
CHANGED
@@ -20,8 +20,9 @@ module S3Repo
|
|
20
20
|
paths.each do |path|
|
21
21
|
key = File.basename(path)
|
22
22
|
sig_key, sig_path = [key, path].map { |x| x + '.sig' }
|
23
|
-
|
24
|
-
client.upload!(sig_key, sig_path) if
|
23
|
+
next if include? key
|
24
|
+
client.upload!(sig_key, sig_path) if ENV['S3REPO_SIGN_PACKAGES']
|
25
|
+
client.upload!(key, path)
|
25
26
|
end
|
26
27
|
metadata.add_packages(paths)
|
27
28
|
end
|
data/lib/s3repo/version.rb
CHANGED