aptly-api 0.9.0 → 0.9.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/aptly/connection.rb +2 -0
- data/lib/aptly/files.rb +3 -1
- data/lib/aptly/repository.rb +4 -1
- data/lib/aptly/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 380c5f11e70678a2475099bcd03210ec4181ad123d6094b7bdecc1f636e6b9af
|
4
|
+
data.tar.gz: 810b109dcdae36be88317a858267b3d16b5f80e1fa1b4cff82e09f412e2e1a59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2883165cc34396cbc478fd096f0d1ee4a18b26f799aab81d6fd48fb0d3be79404f00d3b349e4545028549e46ebe21f824d182965469d6307d8a2447008a6f41e
|
7
|
+
data.tar.gz: 036bd6f29fb8cd1eb2f6bfae2a610168d18a42bc573213bee6a073eeda71de284425d32e7cc1e1729eceefdf160f54cd3a91723f5419a9a4e433e9eeca626629
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [0.9.1]
|
4
|
+
### Fixed
|
5
|
+
- Hint at needing `noRemove: 1` as param when loop adding files (default
|
6
|
+
behavior is to remove added files) in the `Files.tmp_upload` documentation.
|
7
|
+
- `Connection` properly passes query parameters for post-ish requests now.
|
8
|
+
- `Repository.add_file` no longer mangles it's query parameters as they are
|
9
|
+
inconsistently cased on the API level.
|
10
|
+
|
3
11
|
## [0.9.0]
|
4
12
|
### Added
|
5
13
|
- `Files.tmp_upload` is a new convenience wrapper around `#upload` and
|
data/lib/aptly/connection.rb
CHANGED
@@ -126,12 +126,14 @@ module Aptly
|
|
126
126
|
|
127
127
|
def run_postish(action, path, kwords)
|
128
128
|
body = kwords.delete(:body)
|
129
|
+
params = kwords.delete(:query)
|
129
130
|
headers = kwords.delete(:headers)
|
130
131
|
|
131
132
|
body, headers = mangle_post(body, headers, kwords)
|
132
133
|
|
133
134
|
@connection.send(action, path, body, headers) do |request|
|
134
135
|
setup_request(action, request)
|
136
|
+
request.params.update(params) if params
|
135
137
|
end
|
136
138
|
end
|
137
139
|
|
data/lib/aptly/files.rb
CHANGED
@@ -42,7 +42,9 @@ module Aptly
|
|
42
42
|
# @return return value of block
|
43
43
|
#
|
44
44
|
# @example Can be used to push into multiple repositories with one upload
|
45
|
-
# Files.tmp_upload(files)
|
45
|
+
# Files.tmp_upload(files) do |d|
|
46
|
+
# repos.each { |r| r.add_files(d, noRemove: 1) }
|
47
|
+
# end
|
46
48
|
#
|
47
49
|
# @since 0.9.0
|
48
50
|
def tmp_upload(files, connection = Connection.new, **kwords)
|
data/lib/aptly/repository.rb
CHANGED
@@ -41,8 +41,11 @@ module Aptly
|
|
41
41
|
# @return [Hash] report data as specified in the API.
|
42
42
|
# FIXME: this should be called file
|
43
43
|
def add_file(path, **kwords)
|
44
|
+
# Don't mangle query, the file API is inconsistently using camelCase
|
45
|
+
# rather than CamelCase.
|
44
46
|
response = connection.send(:post, "/repos/#{self.Name}/file/#{path}",
|
45
|
-
query: kwords
|
47
|
+
query: kwords,
|
48
|
+
query_mangle: false)
|
46
49
|
hash = JSON.parse(response.body)
|
47
50
|
error = Errors::RepositoryFileError.from_hash(hash)
|
48
51
|
raise error if error
|
data/lib/aptly/version.rb
CHANGED