aptly-api 0.8.0 → 0.8.1

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
- SHA1:
3
- metadata.gz: e05f1603a52e6c576b35e475a2598c8c9b6192d0
4
- data.tar.gz: 200046983723560e59038822e12f738c452b663b
2
+ SHA256:
3
+ metadata.gz: 8c729ac7d333aee96cfebe50fab52e466ab5a0f40415731fb8b5aa13ce25ca07
4
+ data.tar.gz: 40ec80ef71efcf5b210f19db3bfafe00b3aa5d6cb41db4756b4dfb41a6af1baf
5
5
  SHA512:
6
- metadata.gz: 9cb8262c9cfe2777f0588498cd7dcf43b656d10918345c3a08371c7eee7fd0213d73b7332f2846d579dce187b2cd4b3ab099e112d465a5f94d664eaa7fff7caf
7
- data.tar.gz: d89fa0b8074a9c85fd76ad02586f4823f2e6f32ca38971224d595b20928ba20ee697774c6fa7f8ef71fe11882b319ad50adf5a3a3d7d3ad9c7ee0e623e3affa8
6
+ metadata.gz: 67731160d86722a903a54a8492ac98d7e98e6ad06d3740a175c54cb0798dbdd749bb14138afdb81f6c325970e9ac14a6daf27a4a9acaa164a56c29d6a757fc0e
7
+ data.tar.gz: e70a5147ec2eba41c2d8b99e10f47caaca3c784da1cde20fa95da157374b5fb233f9d1699d40d2697ecc58fbb309bf6ef8a3a1d32eedab42634f865ed92da567
@@ -3,4 +3,7 @@ rvm:
3
3
  - 2.2.1
4
4
  - 2.3.0
5
5
  - 2.4.0
6
- before_install: gem install bundler -v 1.10.6
6
+ - 2.5.0
7
+ before_install:
8
+ - gem update --system
9
+ - gem install bundler -v 1.10.6
@@ -1,6 +1,11 @@
1
1
  # Change Log
2
2
 
3
- ## Unreleased
3
+ ## [0.8.1]
4
+ ### Changed
5
+ - Ruby 2.5.0 compatible. Temporary name construction of uploaded files now
6
+ happens using a custom helper instead of relying on tmpdir internals.
7
+
8
+ ## [0.8.0]
4
9
  ### Added
5
10
  - Configuration now has two new attributes timeout and write_timeout.
6
11
  When you set a timeout manually on the Aptly configuration object it gets
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency 'bundler', '~> 1.10'
23
23
  spec.add_development_dependency 'coveralls', '~> 0.8'
24
24
  spec.add_development_dependency 'minitest', '~> 5.8'
25
- spec.add_development_dependency 'rake', '~> 11.0'
25
+ spec.add_development_dependency 'rake', '~> 12.0'
26
26
  spec.add_development_dependency 'rake-notes', '~> 0.2'
27
27
  spec.add_development_dependency 'simplecov', '~> 0.11'
28
- spec.add_development_dependency 'webmock', '~> 2.1'
28
+ spec.add_development_dependency 'webmock', '~> 3.1'
29
29
  spec.add_development_dependency 'yard', '~> 0.8'
30
30
 
31
31
  spec.add_dependency 'faraday', '~> 0.9'
@@ -21,6 +21,7 @@ require 'aptly/publish'
21
21
  require 'aptly/repository'
22
22
  require 'aptly/version'
23
23
  require 'aptly/snapshot'
24
+ require 'aptly/tmpname'
24
25
 
25
26
  # Aptly API
26
27
  module Aptly
@@ -1,10 +1,26 @@
1
+ # Copyright (C) 2015-2018 Harald Sitter <sitter@kde.org>
2
+ # Copyright (C) 2016 Rohan Garg <rohan@garg.io>
3
+ #
4
+ # This library is free software; you can redistribute it and/or
5
+ # modify it under the terms of the GNU Lesser General Public
6
+ # License as published by the Free Software Foundation; either
7
+ # version 3 of the License, or (at your option) any later version.
8
+ #
9
+ # This library is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ # Lesser General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU Lesser General Public
15
+ # License along with this library. If not, see <http://www.gnu.org/licenses/>.
16
+
1
17
  require 'socket'
2
- require 'tmpdir'
3
18
 
4
19
  require_relative 'errors'
5
20
  require_relative 'representation'
6
21
  require_relative 'snapshot'
7
22
  require_relative 'publishable'
23
+ require_relative 'tmpname'
8
24
 
9
25
  module Aptly
10
26
  # Aptly repository representation.
@@ -37,7 +53,7 @@ module Aptly
37
53
  # Convenience wrapper around {Files.upload}, {#add_file} and {Files.delete}
38
54
  def upload(files)
39
55
  prefix = "#{self.class.to_s.tr(':', '_')}-#{Socket.gethostname}-"
40
- directory = Dir::Tmpname.make_tmpname(prefix, nil)
56
+ directory = TmpName.make(prefix)
41
57
  Files.upload(files, directory, connection)
42
58
  add_file(directory)
43
59
  ensure
@@ -0,0 +1,30 @@
1
+ # Copyright (C) 2018 Harald Sitter <sitter@kde.org>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 3 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ module Aptly
17
+ # Helper to generate temporary names
18
+ module TmpName
19
+ def self.make(prefix)
20
+ format('%<prefix>s-%<time>s-%<prog>s-%<rand>s',
21
+ prefix: prefix,
22
+ # rubocop:disable Style/FormatStringToken
23
+ time: Time.now.strftime('%Y%m%d'),
24
+ # rubocop:enable Style/FormatStringToken
25
+ prog: $PROGRAM_NAME,
26
+ rand: rand(0x100000000).to_s(36))
27
+ end
28
+ end
29
+ private_constant :TmpName
30
+ end
@@ -1,4 +1,4 @@
1
1
  # Aptly API
2
2
  module Aptly
3
- VERSION = '0.8.0'.freeze
3
+ VERSION = '0.8.1'.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.0
4
+ version: 0.8.1
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: 2017-11-15 00:00:00.000000000 Z
12
+ date: 2018-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '11.0'
62
+ version: '12.0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '11.0'
69
+ version: '12.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rake-notes
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -101,14 +101,14 @@ dependencies:
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '2.1'
104
+ version: '3.1'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '2.1'
111
+ version: '3.1'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: yard
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -180,6 +180,7 @@ files:
180
180
  - lib/aptly/repository.rb
181
181
  - lib/aptly/representation.rb
182
182
  - lib/aptly/snapshot.rb
183
+ - lib/aptly/tmpname.rb
183
184
  - lib/aptly/version.rb
184
185
  homepage: https://github.com/KDEJewellers/aptly-api/
185
186
  licenses:
@@ -201,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
202
  version: '0'
202
203
  requirements: []
203
204
  rubyforge_project:
204
- rubygems_version: 2.6.11
205
+ rubygems_version: 2.7.3
205
206
  signing_key:
206
207
  specification_version: 4
207
208
  summary: REST client for the Aptly API