aptly-api 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +4 -1
- data/CHANGELOG.md +6 -1
- data/aptly-api.gemspec +2 -2
- data/lib/aptly.rb +1 -0
- data/lib/aptly/repository.rb +18 -2
- data/lib/aptly/tmpname.rb +30 -0
- data/lib/aptly/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c729ac7d333aee96cfebe50fab52e466ab5a0f40415731fb8b5aa13ce25ca07
|
4
|
+
data.tar.gz: 40ec80ef71efcf5b210f19db3bfafe00b3aa5d6cb41db4756b4dfb41a6af1baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67731160d86722a903a54a8492ac98d7e98e6ad06d3740a175c54cb0798dbdd749bb14138afdb81f6c325970e9ac14a6daf27a4a9acaa164a56c29d6a757fc0e
|
7
|
+
data.tar.gz: e70a5147ec2eba41c2d8b99e10f47caaca3c784da1cde20fa95da157374b5fb233f9d1699d40d2697ecc58fbb309bf6ef8a3a1d32eedab42634f865ed92da567
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
##
|
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
|
data/aptly-api.gemspec
CHANGED
@@ -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', '~>
|
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', '~>
|
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'
|
data/lib/aptly.rb
CHANGED
data/lib/aptly/repository.rb
CHANGED
@@ -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 =
|
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
|
data/lib/aptly/version.rb
CHANGED
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.
|
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:
|
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: '
|
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: '
|
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: '
|
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: '
|
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.
|
205
|
+
rubygems_version: 2.7.3
|
205
206
|
signing_key:
|
206
207
|
specification_version: 4
|
207
208
|
summary: REST client for the Aptly API
|