aptly_cli 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/aptly-cli +7 -10
- data/lib/aptly_cli/version.rb +1 -1
- data/lib/aptly_command.rb +4 -4
- data/lib/aptly_repo.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 631a350ac41c500d10dbd41f2f220cbba0e94982aded5c0c4d086e462f8cfbd8
|
4
|
+
data.tar.gz: 4e60257f19662245279baae1b61b62e53339b8852554c3a86b73cffe8156495f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e03eea787a49f9ac8b1fd1b24ca5b3b636c880ced22f86bf7e84ca6c51c142df68dbfa3bb2d0aa8625d5f8a1fe1802ac2e4162d0d52d65d6d85b3f188eaa03
|
7
|
+
data.tar.gz: 2ca87e8d833e77ee657a09c19160c73c6c016609dead38e2070eb0bb8707516301a905d7023cd8bbcdcad96fa6a12223128260d9555365756905ff23416fb982
|
data/bin/aptly-cli
CHANGED
@@ -156,16 +156,13 @@ command :repo_edit do |c|
|
|
156
156
|
config = AptlyCli::AptlyLoad.new.configure_with($config_file)
|
157
157
|
handle_global_options options
|
158
158
|
aptly_command = AptlyCli::AptlyRepo.new(config, options)
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
if options.default_component
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
repo_options = { :Comment => options.comment.to_s }
|
167
|
-
end
|
168
|
-
puts aptly_command.repo_edit(options.name.to_s, repo_options || {})
|
159
|
+
|
160
|
+
repo_options = {}
|
161
|
+
repo_options[:DefaultDistribution] = options.default_distribution.to_s if options.default_distribution
|
162
|
+
repo_options[:DefaultComponent] = options.default_component.to_s if options.default_component
|
163
|
+
repo_options[:Comment] = options.comment.to_s if options.comment
|
164
|
+
|
165
|
+
puts aptly_command.repo_edit(options.name.to_s, repo_options)
|
169
166
|
end
|
170
167
|
end
|
171
168
|
|
data/lib/aptly_cli/version.rb
CHANGED
data/lib/aptly_command.rb
CHANGED
@@ -94,13 +94,13 @@ module AptlyCli
|
|
94
94
|
|
95
95
|
raise "[Server] #{json_response['error']}" unless !json_response.is_a?(Hash) || json_response.dig('error').nil?
|
96
96
|
|
97
|
-
raise HttpNotFoundError, "#{json_response}" if response.code == 404
|
98
|
-
raise HttpInternalServerError, "#{json_response}" if response.code == 500
|
97
|
+
raise HttpNotFoundError, "[HTTP Not Found Error] JSON response:\n#{json_response}" if response.code == 404
|
98
|
+
raise HttpInternalServerError, "[HTTP Internal Server Error] JSON response:\n#{json_response}" if response.code == 500
|
99
99
|
|
100
100
|
response
|
101
101
|
rescue JSON::ParserError
|
102
|
-
raise HttpNotFoundError, "#{
|
103
|
-
raise HttpInternalServerError, "#{
|
102
|
+
raise HttpNotFoundError, "[HTTP Not Found Error] Response:\n#{response.body}" if response.code == 404
|
103
|
+
raise HttpInternalServerError, "[HTTP Internal Server Error] Response:\n#{response.body}" if response.code == 500
|
104
104
|
|
105
105
|
response
|
106
106
|
end
|
data/lib/aptly_repo.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptly_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|