aptly-api 0.8.1 → 0.8.2

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: 8c729ac7d333aee96cfebe50fab52e466ab5a0f40415731fb8b5aa13ce25ca07
4
- data.tar.gz: 40ec80ef71efcf5b210f19db3bfafe00b3aa5d6cb41db4756b4dfb41a6af1baf
2
+ SHA1:
3
+ metadata.gz: a820f41426fba78e2df8de2eb2473853b9cf3d05
4
+ data.tar.gz: ae8062079c4393b311719405afc85b8753591579
5
5
  SHA512:
6
- metadata.gz: 67731160d86722a903a54a8492ac98d7e98e6ad06d3740a175c54cb0798dbdd749bb14138afdb81f6c325970e9ac14a6daf27a4a9acaa164a56c29d6a757fc0e
7
- data.tar.gz: e70a5147ec2eba41c2d8b99e10f47caaca3c784da1cde20fa95da157374b5fb233f9d1699d40d2697ecc58fbb309bf6ef8a3a1d32eedab42634f865ed92da567
6
+ metadata.gz: 785d302d050691514f11fa1bc5c73e23f6f105aef27af492557ee2e888ea98f9469f91be159f64b91ac8b10dde5be97e33101b8e9dc77f1480e775930a29a7a8
7
+ data.tar.gz: 67229cb608abbf58f090024cec0bd16a654fcc90a63800b57a2267b07d3325cfb763e72870f1f74bec317b198aafbf645eedc70bc6dd63f59ac5829ea9ee78db
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.8.2]
4
+ ### Fixed
5
+ - Temporary files no longer contain characters that trip up the daemon.
6
+
3
7
  ## [0.8.1]
4
8
  ### Changed
5
9
  - Ruby 2.5.0 compatible. Temporary name construction of uploaded files now
@@ -53,7 +53,7 @@ module Aptly
53
53
  # Convenience wrapper around {Files.upload}, {#add_file} and {Files.delete}
54
54
  def upload(files)
55
55
  prefix = "#{self.class.to_s.tr(':', '_')}-#{Socket.gethostname}-"
56
- directory = TmpName.make(prefix)
56
+ directory = TmpName.dir(prefix)
57
57
  Files.upload(files, directory, connection)
58
58
  add_file(directory)
59
59
  ensure
@@ -13,16 +13,19 @@
13
13
  # You should have received a copy of the GNU Lesser General Public
14
14
  # License along with this library. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
+ require 'English'
17
+
16
18
  module Aptly
17
19
  # Helper to generate temporary names
18
20
  module TmpName
19
- def self.make(prefix)
20
- format('%<prefix>s-%<time>s-%<prog>s-%<rand>s',
21
+ # @return [String] temporary directory name (only safe characters)
22
+ def self.dir(prefix)
23
+ format('%<prefix>s-%<time>s-%<pid>s-%<rand>s',
21
24
  prefix: prefix,
22
25
  # rubocop:disable Style/FormatStringToken
23
26
  time: Time.now.strftime('%Y%m%d'),
24
27
  # rubocop:enable Style/FormatStringToken
25
- prog: $PROGRAM_NAME,
28
+ pid: $PROCESS_ID,
26
29
  rand: rand(0x100000000).to_s(36))
27
30
  end
28
31
  end
@@ -1,4 +1,4 @@
1
1
  # Aptly API
2
2
  module Aptly
3
- VERSION = '0.8.1'.freeze
3
+ VERSION = '0.8.2'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptly-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harald Sitter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-01-15 00:00:00.000000000 Z
12
+ date: 2018-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  requirements: []
204
204
  rubyforge_project:
205
- rubygems_version: 2.7.3
205
+ rubygems_version: 2.6.11
206
206
  signing_key:
207
207
  specification_version: 4
208
208
  summary: REST client for the Aptly API