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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9b01335b9df31f73108baaa72a8bd18813e2447
4
- data.tar.gz: a46aa5aa4a7a358d954d4affa06d1462b79bb13c
3
+ metadata.gz: ef33abc7a9c68094cea63f78eda508e1d28410f6
4
+ data.tar.gz: 4bdecf7a7da13f587885170820ea4ec366023e3b
5
5
  SHA512:
6
- metadata.gz: 8f70c12e5c1a19bc5bcc7857ccabd4029c88cc8caf8d05290e563cd9085abd9e618abb28e080caea937e6797a103eca238b1f312ae963a32f275ca48993aadb0
7
- data.tar.gz: c04c7a1979f794d1f3befcb0199a2fb4dfebd1e536b82bf3ff77e3b48e589a719f10ce334c0b0a31b5e706377b9d35f44b1cdcaf0ef1bfe82839beb7a6961821
6
+ metadata.gz: 00a381930d91c53ab11280a6ee3e123013ac4c11ee748cfb4ea2cd7ebb7cb685797fc9e26a6c1a005bf0a88b72cf23dbbcdd2465b98452497ff9dcb44ee647db
7
+ data.tar.gz: 3424d3b8beb09b9228ab369d3b0571dc07eb395ac732ff1ee53d60707b46a76f433b36db1e085f48fb582feb9aa00bbd9677a115eae3aa228a4d963fc062234e
@@ -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
- client.upload!(key, path) unless include?(key)
24
- client.upload!(sig_key, sig_path) if File.exist?(sig_path)
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
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define version
3
3
  module S3Repo
4
- VERSION = '0.1.7'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker