deb-s3 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: ec462c0b2f303467f4894dd8aa080b8ba29132015af2c8d6b641a101ceb9d184
4
- data.tar.gz: 497c2f2658e577d1357bfd48683aa6b03626efa32bd1686d4a28aa99fe64eec6
2
+ SHA1:
3
+ metadata.gz: 9e8dbe12df60c668bf2f6469b90d6cdd1cd81325
4
+ data.tar.gz: 0107fe0bd5e38e79a39046ebeb19566b647e3865
5
5
  SHA512:
6
- metadata.gz: 0da988ffe976866db0ee34ae7646ecbf7c7bb439e4ecbc6a77b03ae834b1f89c0ac417b8ff391845d2f9c24a1d94af898c1ff628c132ad1794b81adaf45e0751
7
- data.tar.gz: 9ece8553037e9abe6d56110715e5a5d1249756fd353f9d7cbb5e0b270476f2ccfdadc7c6b4e3c62689a88d21dc56414313e5103f0e3f3ba4ec129cf398591be8
6
+ metadata.gz: 79b208495ff06a5e68a0a6ccb6829fc8bf0b7ef99a78eb33959e688e27ac9407e9f19d1ab6af3e4c90056fb46dd6b354de43e26b1d43df16ed76a586a057c7de
7
+ data.tar.gz: 720fc4fc1585841872a49e1572a88107adad1b404e65be6984fff915062aa30f9e63ba31215020606e082cbba108506750c63d30a01bdcbd4437c392dec689aa
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Deb
3
3
  module S3
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.3"
5
5
  end
6
6
  end
@@ -60,10 +60,14 @@ class Deb::S3::CLI < Thor
60
60
  :type => :string,
61
61
  :desc => "The (optional) session token for connecting to S3."
62
62
 
63
+ class_option :endpoint,
64
+ :type => :string,
65
+ :desc => "The URL endpoint to the S3 API."
66
+
63
67
  class_option :s3_region,
64
68
  :type => :string,
65
69
  :desc => "The region for connecting to S3.",
66
- :default => "us-east-1"
70
+ :default => ENV["AWS_DEFAULT_REGION"] || "us-east-1"
67
71
 
68
72
  class_option :force_path_style,
69
73
  :default => false,
@@ -74,11 +78,6 @@ class Deb::S3::CLI < Thor
74
78
  :type => :string,
75
79
  :desc => "The URI of the proxy to send service requests through."
76
80
 
77
- #class_option :use_ssl,
78
- #:default => true,
79
- #:type => :boolean,
80
- #:desc => "Whether to use HTTP or HTTPS for request transport."
81
-
82
81
  class_option :visibility,
83
82
  :default => "public",
84
83
  :type => :string,
@@ -590,6 +589,7 @@ class Deb::S3::CLI < Thor
590
589
  :http_proxy => options[:proxy_uri],
591
590
  :force_path_style => options[:force_path_style]
592
591
  }
592
+ settings[:endpoint] = options[:endpoint] if options[:endpoint]
593
593
  settings.merge!(provider)
594
594
 
595
595
  Deb::S3::Utils.s3 = Aws::S3::Client.new(settings)
@@ -103,28 +103,25 @@ class Deb::S3::Release
103
103
  # sign the file, if necessary
104
104
  if Deb::S3::Utils.signing_key
105
105
  key_param = Deb::S3::Utils.signing_key != "" ? "--default-key=#{Deb::S3::Utils.signing_key}" : ""
106
- if self.codename == "xenial" || self.codename == "jessie" || self.codename == "stretch"
107
- if system("gpg -a #{key_param} #{Deb::S3::Utils.gpg_options} -s --clearsign #{release_tmp.path}")
108
- local_file = release_tmp.path+".asc"
109
- remote_file = "dists/#{@codename}/InRelease"
110
- yield remote_file if block_given?
111
- raise "Unable to locate InRelease file" unless File.exists?(local_file)
112
- s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
113
- File.unlink(local_file)
114
- else
115
- raise "Signing the InRelease file failed."
116
- end
106
+ if system("gpg -a #{key_param} --digest-algo SHA256 #{Deb::S3::Utils.gpg_options} -s --clearsign #{release_tmp.path}")
107
+ local_file = release_tmp.path+".asc"
108
+ remote_file = "dists/#{@codename}/InRelease"
109
+ yield remote_file if block_given?
110
+ raise "Unable to locate InRelease file" unless File.exists?(local_file)
111
+ s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
112
+ File.unlink(local_file)
117
113
  else
118
- if system("gpg -a #{key_param} #{Deb::S3::Utils.gpg_options} -b #{release_tmp.path}")
119
- local_file = release_tmp.path+".asc"
120
- remote_file = self.filename+".gpg"
121
- yield remote_file if block_given?
122
- raise "Unable to locate Release signature file" unless File.exists?(local_file)
123
- s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
124
- File.unlink(local_file)
125
- else
126
- raise "Signing the Release file failed."
127
- end
114
+ raise "Signing the InRelease file failed."
115
+ end
116
+ if system("gpg -a #{key_param} --digest-algo SHA256 #{Deb::S3::Utils.gpg_options} -b #{release_tmp.path}")
117
+ local_file = release_tmp.path+".asc"
118
+ remote_file = self.filename+".gpg"
119
+ yield remote_file if block_given?
120
+ raise "Unable to locate Release signature file" unless File.exists?(local_file)
121
+ s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
122
+ File.unlink(local_file)
123
+ else
124
+ raise "Signing the Release file failed."
128
125
  end
129
126
  else
130
127
  # remove an existing Release.gpg, if it was there
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deb-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Robertson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-16 00:00:00.000000000 Z
11
+ date: 2018-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.7.6
107
+ rubygems_version: 2.6.13
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Easily create and manage an APT repository on S3.