aptly_cli 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.hound.yml +2 -0
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +429 -0
- data/.ruby-style.yml +243 -0
- data/.travis.yml +2 -2
- data/bin/aptly-cli +6 -4
- data/lib/aptly_cli/version.rb +1 -1
- data/lib/aptly_publish.rb +61 -80
- data/lib/aptly_repo.rb +6 -6
- data/lib/aptly_snapshot.rb +2 -2
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGY1ZjI5MTAwNjdiMGI0NzkxYzkxNjc1YzJjY2Q3ODY2MzdjYTE4ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmI5ZmFkMmIzNmRhN2I1NDg3NmU2MjE2YjdjZDUyMjFiNmJhMGEwOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWJiMmM3NzczYTc1N2FhODViZmZhMjU1NTY5OWJjMDZjMTFmNjlhOWJhNWM3
|
10
|
+
NThmMmJjNDBiMjFkM2Y1MzA0ODZlMzM5ZjdhZTk2ZmQwMTZiZmQ4YTU5MTFj
|
11
|
+
OTJmZDhlNDJkOWQ4MWI0MzA1Njg1OTNiMThkMDYxYWJmODI5YTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTc4MTljNTVhZWUzM2E5NjcxOWY5MTQ5MDc1OGIxOGFmZTQ2OTI1YTE5YWVh
|
14
|
+
MWExODg2MjgyMzVjOTY0OGM2MWI2ZDM4YmQ3YmQ0NDE2ODkxMjE3ZDMwZmNl
|
15
|
+
Yjc0MDhkZTI4M2FiM2UzMzU4MTYxOGQyODcyZDY5OTA1OWY4MGM=
|
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,429 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2016-03-18 19:51:36 -0700 using RuboCop version 0.38.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 23
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: AlignWith, SupportedStyles.
|
12
|
+
# SupportedStyles: either, start_of_block, start_of_line
|
13
|
+
Lint/BlockAlignment:
|
14
|
+
Exclude:
|
15
|
+
- 'test/test_aptly_misc.rb'
|
16
|
+
- 'test/test_aptly_package.rb'
|
17
|
+
- 'test/test_aptly_publish.rb'
|
18
|
+
- 'test/test_aptly_repo.rb'
|
19
|
+
- 'test/test_aptly_snapshot.rb'
|
20
|
+
|
21
|
+
# Offense count: 26
|
22
|
+
# Cop supports --auto-correct.
|
23
|
+
# Configuration parameters: IgnoreEmptyBlocks.
|
24
|
+
Lint/UnusedBlockArgument:
|
25
|
+
Exclude:
|
26
|
+
- 'bin/aptly-cli'
|
27
|
+
|
28
|
+
# Offense count: 60
|
29
|
+
Lint/UselessAssignment:
|
30
|
+
Exclude:
|
31
|
+
- 'test/test_aptly_cli_configure.rb'
|
32
|
+
- 'test/test_aptly_file.rb'
|
33
|
+
- 'test/test_aptly_misc.rb'
|
34
|
+
- 'test/test_aptly_package.rb'
|
35
|
+
- 'test/test_aptly_publish.rb'
|
36
|
+
- 'test/test_aptly_repo.rb'
|
37
|
+
- 'test/test_aptly_snapshot.rb'
|
38
|
+
|
39
|
+
# Offense count: 3
|
40
|
+
Metrics/AbcSize:
|
41
|
+
Max: 32
|
42
|
+
|
43
|
+
# Offense count: 1
|
44
|
+
# Configuration parameters: CountComments.
|
45
|
+
Metrics/ClassLength:
|
46
|
+
Max: 111
|
47
|
+
|
48
|
+
# Offense count: 2
|
49
|
+
Metrics/CyclomaticComplexity:
|
50
|
+
Max: 9
|
51
|
+
|
52
|
+
# Offense count: 153
|
53
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
54
|
+
# URISchemes: http, https
|
55
|
+
Metrics/LineLength:
|
56
|
+
Max: 524
|
57
|
+
|
58
|
+
# Offense count: 8
|
59
|
+
# Configuration parameters: CountComments.
|
60
|
+
Metrics/MethodLength:
|
61
|
+
Max: 38
|
62
|
+
|
63
|
+
# Offense count: 2
|
64
|
+
Metrics/PerceivedComplexity:
|
65
|
+
Max: 10
|
66
|
+
|
67
|
+
# Offense count: 1
|
68
|
+
Style/AccessorMethodName:
|
69
|
+
Exclude:
|
70
|
+
- 'lib/aptly_misc.rb'
|
71
|
+
|
72
|
+
# Offense count: 2
|
73
|
+
# Cop supports --auto-correct.
|
74
|
+
Style/AlignArray:
|
75
|
+
Exclude:
|
76
|
+
- 'lib/aptly_publish.rb'
|
77
|
+
|
78
|
+
# Offense count: 3
|
79
|
+
# Cop supports --auto-correct.
|
80
|
+
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
81
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
82
|
+
Style/AlignHash:
|
83
|
+
Exclude:
|
84
|
+
- 'bin/aptly-cli'
|
85
|
+
|
86
|
+
# Offense count: 3
|
87
|
+
# Cop supports --auto-correct.
|
88
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
89
|
+
# SupportedStyles: always, conditionals
|
90
|
+
Style/AndOr:
|
91
|
+
Exclude:
|
92
|
+
- 'bin/aptly-cli'
|
93
|
+
- 'lib/aptly_repo.rb'
|
94
|
+
|
95
|
+
# Offense count: 20
|
96
|
+
# Cop supports --auto-correct.
|
97
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
98
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
99
|
+
Style/BracesAroundHashParameters:
|
100
|
+
Exclude:
|
101
|
+
- 'bin/aptly-cli'
|
102
|
+
- 'test/test_aptly_repo.rb'
|
103
|
+
- 'test/test_aptly_snapshot.rb'
|
104
|
+
|
105
|
+
# Offense count: 1
|
106
|
+
# Cop supports --auto-correct.
|
107
|
+
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
|
108
|
+
# SupportedStyles: case, end
|
109
|
+
Style/CaseIndentation:
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
# Offense count: 3
|
113
|
+
Style/ClassVars:
|
114
|
+
Exclude:
|
115
|
+
- 'lib/aptly_publish.rb'
|
116
|
+
|
117
|
+
# Offense count: 1
|
118
|
+
# Cop supports --auto-correct.
|
119
|
+
Style/ColonMethodCall:
|
120
|
+
Exclude:
|
121
|
+
- 'lib/aptly_load.rb'
|
122
|
+
|
123
|
+
# Offense count: 4
|
124
|
+
# Cop supports --auto-correct.
|
125
|
+
# Configuration parameters: SingleLineConditionsOnly.
|
126
|
+
Style/ConditionalAssignment:
|
127
|
+
Exclude:
|
128
|
+
- 'lib/aptly_file.rb'
|
129
|
+
- 'lib/aptly_repo.rb'
|
130
|
+
- 'lib/aptly_snapshot.rb'
|
131
|
+
|
132
|
+
# Offense count: 3
|
133
|
+
# Cop supports --auto-correct.
|
134
|
+
Style/DefWithParentheses:
|
135
|
+
Exclude:
|
136
|
+
- 'lib/aptly_file.rb'
|
137
|
+
- 'lib/aptly_misc.rb'
|
138
|
+
- 'lib/aptly_repo.rb'
|
139
|
+
|
140
|
+
# Offense count: 2
|
141
|
+
# Cop supports --auto-correct.
|
142
|
+
Style/DeprecatedHashMethods:
|
143
|
+
Exclude:
|
144
|
+
- 'lib/aptly_snapshot.rb'
|
145
|
+
|
146
|
+
# Offense count: 7
|
147
|
+
Style/Documentation:
|
148
|
+
Exclude:
|
149
|
+
- 'spec/**/*'
|
150
|
+
- 'test/**/*'
|
151
|
+
- 'lib/aptly_cli.rb'
|
152
|
+
- 'lib/aptly_file.rb'
|
153
|
+
- 'lib/aptly_load.rb'
|
154
|
+
- 'lib/aptly_misc.rb'
|
155
|
+
- 'lib/aptly_package.rb'
|
156
|
+
- 'lib/aptly_repo.rb'
|
157
|
+
- 'lib/aptly_snapshot.rb'
|
158
|
+
|
159
|
+
# Offense count: 2
|
160
|
+
# Cop supports --auto-correct.
|
161
|
+
Style/EmptyLines:
|
162
|
+
Exclude:
|
163
|
+
- 'test/test_aptly_file.rb'
|
164
|
+
- 'test/test_aptly_repo.rb'
|
165
|
+
|
166
|
+
# Offense count: 50
|
167
|
+
# Cop supports --auto-correct.
|
168
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
169
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
170
|
+
Style/EmptyLinesAroundBlockBody:
|
171
|
+
Exclude:
|
172
|
+
- 'test/test_aptly_file.rb'
|
173
|
+
- 'test/test_aptly_misc.rb'
|
174
|
+
- 'test/test_aptly_package.rb'
|
175
|
+
- 'test/test_aptly_publish.rb'
|
176
|
+
- 'test/test_aptly_repo.rb'
|
177
|
+
- 'test/test_aptly_snapshot.rb'
|
178
|
+
|
179
|
+
# Offense count: 7
|
180
|
+
# Cop supports --auto-correct.
|
181
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
182
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
183
|
+
Style/EmptyLinesAroundClassBody:
|
184
|
+
Exclude:
|
185
|
+
- 'lib/aptly_misc.rb'
|
186
|
+
- 'lib/aptly_package.rb'
|
187
|
+
- 'lib/aptly_repo.rb'
|
188
|
+
- 'lib/aptly_snapshot.rb'
|
189
|
+
- 'test/test_aptly_cli_configure.rb'
|
190
|
+
|
191
|
+
# Offense count: 5
|
192
|
+
# Cop supports --auto-correct.
|
193
|
+
Style/EmptyLinesAroundMethodBody:
|
194
|
+
Exclude:
|
195
|
+
- 'lib/aptly_repo.rb'
|
196
|
+
- 'lib/aptly_snapshot.rb'
|
197
|
+
|
198
|
+
# Offense count: 1
|
199
|
+
# Cop supports --auto-correct.
|
200
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
201
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
202
|
+
Style/EmptyLinesAroundModuleBody:
|
203
|
+
Exclude:
|
204
|
+
- 'lib/aptly_cli.rb'
|
205
|
+
|
206
|
+
# Offense count: 2
|
207
|
+
# Cop supports --auto-correct.
|
208
|
+
Style/EmptyLiteral:
|
209
|
+
Exclude:
|
210
|
+
- 'lib/aptly_repo.rb'
|
211
|
+
|
212
|
+
# Offense count: 1
|
213
|
+
# Configuration parameters: MinBodyLength.
|
214
|
+
Style/GuardClause:
|
215
|
+
Exclude:
|
216
|
+
- 'lib/aptly_repo.rb'
|
217
|
+
|
218
|
+
# Offense count: 162
|
219
|
+
# Cop supports --auto-correct.
|
220
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
221
|
+
# SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
|
222
|
+
Style/HashSyntax:
|
223
|
+
Enabled: false
|
224
|
+
|
225
|
+
# Offense count: 13
|
226
|
+
# Cop supports --auto-correct.
|
227
|
+
# Configuration parameters: MaxLineLength.
|
228
|
+
Style/IfUnlessModifier:
|
229
|
+
Exclude:
|
230
|
+
- 'bin/aptly-cli'
|
231
|
+
- 'lib/aptly_file.rb'
|
232
|
+
- 'lib/aptly_misc.rb'
|
233
|
+
- 'lib/aptly_package.rb'
|
234
|
+
- 'lib/aptly_repo.rb'
|
235
|
+
- 'lib/aptly_snapshot.rb'
|
236
|
+
|
237
|
+
# Offense count: 2
|
238
|
+
# Cop supports --auto-correct.
|
239
|
+
# Configuration parameters: SupportedStyles, IndentationWidth.
|
240
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
241
|
+
Style/IndentHash:
|
242
|
+
EnforcedStyle: align_braces
|
243
|
+
|
244
|
+
# Offense count: 22
|
245
|
+
# Cop supports --auto-correct.
|
246
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
247
|
+
# SupportedStyles: normal, rails
|
248
|
+
Style/IndentationConsistency:
|
249
|
+
Exclude:
|
250
|
+
- 'test/test_aptly_misc.rb'
|
251
|
+
- 'test/test_aptly_package.rb'
|
252
|
+
- 'test/test_aptly_publish.rb'
|
253
|
+
- 'test/test_aptly_repo.rb'
|
254
|
+
- 'test/test_aptly_snapshot.rb'
|
255
|
+
|
256
|
+
# Offense count: 24
|
257
|
+
# Cop supports --auto-correct.
|
258
|
+
# Configuration parameters: Width.
|
259
|
+
Style/IndentationWidth:
|
260
|
+
Exclude:
|
261
|
+
- 'test/test_aptly_file.rb'
|
262
|
+
- 'test/test_aptly_misc.rb'
|
263
|
+
- 'test/test_aptly_package.rb'
|
264
|
+
- 'test/test_aptly_publish.rb'
|
265
|
+
- 'test/test_aptly_repo.rb'
|
266
|
+
- 'test/test_aptly_snapshot.rb'
|
267
|
+
|
268
|
+
# Offense count: 1
|
269
|
+
# Cop supports --auto-correct.
|
270
|
+
Style/LeadingCommentSpace:
|
271
|
+
Exclude:
|
272
|
+
- 'test/minitest_helper.rb'
|
273
|
+
|
274
|
+
# Offense count: 9
|
275
|
+
# Cop supports --auto-correct.
|
276
|
+
Style/MethodCallParentheses:
|
277
|
+
Exclude:
|
278
|
+
- 'bin/aptly-cli'
|
279
|
+
- 'test/test_aptly_file.rb'
|
280
|
+
- 'test/test_aptly_misc.rb'
|
281
|
+
- 'test/test_aptly_publish.rb'
|
282
|
+
- 'test/test_aptly_repo.rb'
|
283
|
+
|
284
|
+
# Offense count: 2
|
285
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
286
|
+
# SupportedStyles: snake_case, camelCase
|
287
|
+
Style/MethodName:
|
288
|
+
Enabled: false
|
289
|
+
|
290
|
+
# Offense count: 4
|
291
|
+
# Cop supports --auto-correct.
|
292
|
+
Style/NilComparison:
|
293
|
+
Exclude:
|
294
|
+
- 'lib/aptly_repo.rb'
|
295
|
+
|
296
|
+
# Offense count: 2
|
297
|
+
# Cop supports --auto-correct.
|
298
|
+
# Configuration parameters: PreferredDelimiters.
|
299
|
+
Style/PercentLiteralDelimiters:
|
300
|
+
Exclude:
|
301
|
+
- 'aptly_cli.gemspec'
|
302
|
+
|
303
|
+
# Offense count: 2
|
304
|
+
# Configuration parameters: SupportedStyles.
|
305
|
+
# SupportedStyles: compact, exploded
|
306
|
+
Style/RaiseArgs:
|
307
|
+
EnforcedStyle: compact
|
308
|
+
|
309
|
+
# Offense count: 14
|
310
|
+
# Cop supports --auto-correct.
|
311
|
+
Style/RedundantParentheses:
|
312
|
+
Exclude:
|
313
|
+
- 'test/test_aptly_file.rb'
|
314
|
+
- 'test/test_aptly_misc.rb'
|
315
|
+
- 'test/test_aptly_snapshot.rb'
|
316
|
+
|
317
|
+
# Offense count: 1
|
318
|
+
# Cop supports --auto-correct.
|
319
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
320
|
+
Style/RedundantReturn:
|
321
|
+
Exclude:
|
322
|
+
- 'lib/aptly_repo.rb'
|
323
|
+
|
324
|
+
# Offense count: 8
|
325
|
+
# Cop supports --auto-correct.
|
326
|
+
Style/SpaceAfterComma:
|
327
|
+
Exclude:
|
328
|
+
- 'lib/aptly_load.rb'
|
329
|
+
- 'test/test_aptly_snapshot.rb'
|
330
|
+
|
331
|
+
# Offense count: 8
|
332
|
+
# Cop supports --auto-correct.
|
333
|
+
# Configuration parameters: AllowForAlignment.
|
334
|
+
Style/SpaceAroundOperators:
|
335
|
+
Exclude:
|
336
|
+
- 'lib/aptly_repo.rb'
|
337
|
+
- 'lib/aptly_snapshot.rb'
|
338
|
+
- 'test/test_aptly_snapshot.rb'
|
339
|
+
|
340
|
+
# Offense count: 3
|
341
|
+
# Cop supports --auto-correct.
|
342
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
343
|
+
# SupportedStyles: space, no_space
|
344
|
+
Style/SpaceInsideBlockBraces:
|
345
|
+
Enabled: false
|
346
|
+
|
347
|
+
# Offense count: 65
|
348
|
+
# Cop supports --auto-correct.
|
349
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
350
|
+
# SupportedStyles: space, no_space
|
351
|
+
Style/SpaceInsideHashLiteralBraces:
|
352
|
+
Enabled: false
|
353
|
+
|
354
|
+
# Offense count: 1
|
355
|
+
# Cop supports --auto-correct.
|
356
|
+
Style/SpaceInsideParens:
|
357
|
+
Exclude:
|
358
|
+
- 'lib/aptly_file.rb'
|
359
|
+
|
360
|
+
# Offense count: 249
|
361
|
+
# Cop supports --auto-correct.
|
362
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
363
|
+
# SupportedStyles: single_quotes, double_quotes
|
364
|
+
Style/StringLiterals:
|
365
|
+
Enabled: false
|
366
|
+
|
367
|
+
# Offense count: 3
|
368
|
+
# Cop supports --auto-correct.
|
369
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
370
|
+
# SupportedStyles: single_quotes, double_quotes
|
371
|
+
Style/StringLiteralsInInterpolation:
|
372
|
+
Enabled: false
|
373
|
+
|
374
|
+
# Offense count: 2
|
375
|
+
# Cop supports --auto-correct.
|
376
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
377
|
+
# SupportedStyles: final_newline, final_blank_line
|
378
|
+
Style/TrailingBlankLines:
|
379
|
+
Exclude:
|
380
|
+
- 'bin/aptly-cli'
|
381
|
+
- 'test/test_aptly_file.rb'
|
382
|
+
|
383
|
+
# Offense count: 104
|
384
|
+
# Cop supports --auto-correct.
|
385
|
+
Style/TrailingWhitespace:
|
386
|
+
Exclude:
|
387
|
+
- 'aptly_cli.gemspec'
|
388
|
+
- 'bin/aptly-cli'
|
389
|
+
- 'lib/aptly_file.rb'
|
390
|
+
- 'lib/aptly_load.rb'
|
391
|
+
- 'lib/aptly_repo.rb'
|
392
|
+
- 'lib/aptly_snapshot.rb'
|
393
|
+
- 'test/test_aptly_cli_configure.rb'
|
394
|
+
- 'test/test_aptly_file.rb'
|
395
|
+
- 'test/test_aptly_misc.rb'
|
396
|
+
- 'test/test_aptly_package.rb'
|
397
|
+
- 'test/test_aptly_publish.rb'
|
398
|
+
- 'test/test_aptly_repo.rb'
|
399
|
+
- 'test/test_aptly_snapshot.rb'
|
400
|
+
|
401
|
+
# Offense count: 1
|
402
|
+
# Cop supports --auto-correct.
|
403
|
+
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
|
404
|
+
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
|
405
|
+
Style/TrivialAccessors:
|
406
|
+
Exclude:
|
407
|
+
- 'lib/aptly_load.rb'
|
408
|
+
|
409
|
+
# Offense count: 1
|
410
|
+
# Cop supports --auto-correct.
|
411
|
+
Style/UnlessElse:
|
412
|
+
Exclude:
|
413
|
+
- 'lib/aptly_snapshot.rb'
|
414
|
+
|
415
|
+
# Offense count: 11
|
416
|
+
# Cop supports --auto-correct.
|
417
|
+
Style/UnneededInterpolation:
|
418
|
+
Exclude:
|
419
|
+
- 'lib/aptly_file.rb'
|
420
|
+
- 'lib/aptly_misc.rb'
|
421
|
+
- 'lib/aptly_package.rb'
|
422
|
+
- 'lib/aptly_repo.rb'
|
423
|
+
- 'lib/aptly_snapshot.rb'
|
424
|
+
|
425
|
+
# Offense count: 2
|
426
|
+
# Cop supports --auto-correct.
|
427
|
+
Style/UnneededPercentQ:
|
428
|
+
Exclude:
|
429
|
+
- 'aptly_cli.gemspec'
|
data/.ruby-style.yml
ADDED
@@ -0,0 +1,243 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "vendor/**/*"
|
4
|
+
- "db/schema.rb"
|
5
|
+
UseCache: false
|
6
|
+
Style/CollectionMethods:
|
7
|
+
Description: Preferred collection methods.
|
8
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
9
|
+
Enabled: true
|
10
|
+
PreferredMethods:
|
11
|
+
collect: map
|
12
|
+
collect!: map!
|
13
|
+
find: detect
|
14
|
+
find_all: select
|
15
|
+
reduce: inject
|
16
|
+
Style/DotPosition:
|
17
|
+
Description: Checks the position of the dot in multi-line method calls.
|
18
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
19
|
+
Enabled: true
|
20
|
+
EnforcedStyle: trailing
|
21
|
+
SupportedStyles:
|
22
|
+
- leading
|
23
|
+
- trailing
|
24
|
+
Style/FileName:
|
25
|
+
Description: Use snake_case for source file names.
|
26
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
27
|
+
Enabled: false
|
28
|
+
Exclude: []
|
29
|
+
Style/GuardClause:
|
30
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
31
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
32
|
+
Enabled: false
|
33
|
+
MinBodyLength: 1
|
34
|
+
Style/IfUnlessModifier:
|
35
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
36
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
37
|
+
Enabled: false
|
38
|
+
MaxLineLength: 80
|
39
|
+
Style/OptionHash:
|
40
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
41
|
+
Enabled: false
|
42
|
+
Style/PercentLiteralDelimiters:
|
43
|
+
Description: Use `%`-literal delimiters consistently
|
44
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
45
|
+
Enabled: false
|
46
|
+
PreferredDelimiters:
|
47
|
+
"%": "()"
|
48
|
+
"%i": "()"
|
49
|
+
"%q": "()"
|
50
|
+
"%Q": "()"
|
51
|
+
"%r": "{}"
|
52
|
+
"%s": "()"
|
53
|
+
"%w": "()"
|
54
|
+
"%W": "()"
|
55
|
+
"%x": "()"
|
56
|
+
Style/PredicateName:
|
57
|
+
Description: Check the names of predicate methods.
|
58
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
59
|
+
Enabled: true
|
60
|
+
NamePrefix:
|
61
|
+
- is_
|
62
|
+
- has_
|
63
|
+
- have_
|
64
|
+
NamePrefixBlacklist:
|
65
|
+
- is_
|
66
|
+
Exclude:
|
67
|
+
- spec/**/*
|
68
|
+
Style/RaiseArgs:
|
69
|
+
Description: Checks the arguments passed to raise/fail.
|
70
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
71
|
+
Enabled: false
|
72
|
+
EnforcedStyle: exploded
|
73
|
+
SupportedStyles:
|
74
|
+
- compact
|
75
|
+
- exploded
|
76
|
+
Style/SignalException:
|
77
|
+
Description: Checks for proper usage of fail and raise.
|
78
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
79
|
+
Enabled: false
|
80
|
+
EnforcedStyle: semantic
|
81
|
+
SupportedStyles:
|
82
|
+
- only_raise
|
83
|
+
- only_fail
|
84
|
+
- semantic
|
85
|
+
Style/SingleLineBlockParams:
|
86
|
+
Description: Enforces the names of some block params.
|
87
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
88
|
+
Enabled: false
|
89
|
+
Methods:
|
90
|
+
- reduce:
|
91
|
+
- a
|
92
|
+
- e
|
93
|
+
- inject:
|
94
|
+
- a
|
95
|
+
- e
|
96
|
+
Style/SingleLineMethods:
|
97
|
+
Description: Avoid single-line methods.
|
98
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
99
|
+
Enabled: false
|
100
|
+
AllowIfMethodIsEmpty: true
|
101
|
+
Style/StringLiterals:
|
102
|
+
Description: Checks if uses of quotes match the configured preference.
|
103
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
104
|
+
Enabled: true
|
105
|
+
EnforcedStyle: single_quotes
|
106
|
+
SupportedStyles:
|
107
|
+
- single_quotes
|
108
|
+
- double_quotes
|
109
|
+
Style/StringLiteralsInInterpolation:
|
110
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
111
|
+
match the configured preference.
|
112
|
+
Enabled: true
|
113
|
+
EnforcedStyle: single_quotes
|
114
|
+
SupportedStyles:
|
115
|
+
- single_quotes
|
116
|
+
- double_quotes
|
117
|
+
Style/TrailingCommaInArguments:
|
118
|
+
Description: 'Checks for trailing comma in argument lists.'
|
119
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
120
|
+
Enabled: false
|
121
|
+
EnforcedStyleForMultiline: no_comma
|
122
|
+
SupportedStyles:
|
123
|
+
- comma
|
124
|
+
- consistent_comma
|
125
|
+
- no_comma
|
126
|
+
Style/TrailingCommaInLiteral:
|
127
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
128
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
129
|
+
Enabled: false
|
130
|
+
EnforcedStyleForMultiline: no_comma
|
131
|
+
SupportedStyles:
|
132
|
+
- comma
|
133
|
+
- consistent_comma
|
134
|
+
- no_comma
|
135
|
+
Metrics/AbcSize:
|
136
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
137
|
+
conditions.
|
138
|
+
Enabled: false
|
139
|
+
Max: 15
|
140
|
+
Metrics/ClassLength:
|
141
|
+
Description: Avoid classes longer than 100 lines of code.
|
142
|
+
Enabled: false
|
143
|
+
CountComments: false
|
144
|
+
Max: 100
|
145
|
+
Metrics/ModuleLength:
|
146
|
+
CountComments: false
|
147
|
+
Max: 100
|
148
|
+
Description: Avoid modules longer than 100 lines of code.
|
149
|
+
Enabled: false
|
150
|
+
Metrics/CyclomaticComplexity:
|
151
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
152
|
+
cases needed to validate a method.
|
153
|
+
Enabled: false
|
154
|
+
Max: 6
|
155
|
+
Metrics/MethodLength:
|
156
|
+
Description: Avoid methods longer than 10 lines of code.
|
157
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
158
|
+
Enabled: false
|
159
|
+
CountComments: false
|
160
|
+
Max: 10
|
161
|
+
Metrics/ParameterLists:
|
162
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
163
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
164
|
+
Enabled: false
|
165
|
+
Max: 5
|
166
|
+
CountKeywordArgs: true
|
167
|
+
Metrics/PerceivedComplexity:
|
168
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
169
|
+
reader.
|
170
|
+
Enabled: false
|
171
|
+
Max: 7
|
172
|
+
Lint/AssignmentInCondition:
|
173
|
+
Description: Don't use assignment in conditions.
|
174
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
175
|
+
Enabled: false
|
176
|
+
AllowSafeAssignment: true
|
177
|
+
Style/InlineComment:
|
178
|
+
Description: Avoid inline comments.
|
179
|
+
Enabled: false
|
180
|
+
Style/AccessorMethodName:
|
181
|
+
Description: Check the naming of accessor methods for get_/set_.
|
182
|
+
Enabled: false
|
183
|
+
Style/Alias:
|
184
|
+
Description: Use alias_method instead of alias.
|
185
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
186
|
+
Enabled: false
|
187
|
+
Style/Documentation:
|
188
|
+
Description: Document classes and non-namespace modules.
|
189
|
+
Enabled: false
|
190
|
+
Style/DoubleNegation:
|
191
|
+
Description: Checks for uses of double negation (!!).
|
192
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
193
|
+
Enabled: false
|
194
|
+
Style/EachWithObject:
|
195
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
196
|
+
Enabled: false
|
197
|
+
Style/EmptyLiteral:
|
198
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
199
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
200
|
+
Enabled: false
|
201
|
+
Style/ModuleFunction:
|
202
|
+
Description: Checks for usage of `extend self` in modules.
|
203
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
204
|
+
Enabled: false
|
205
|
+
Style/OneLineConditional:
|
206
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
207
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
208
|
+
Enabled: false
|
209
|
+
Style/PerlBackrefs:
|
210
|
+
Description: Avoid Perl-style regex back references.
|
211
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
212
|
+
Enabled: false
|
213
|
+
Style/Send:
|
214
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
215
|
+
may overlap with existing methods.
|
216
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
217
|
+
Enabled: false
|
218
|
+
Style/SpecialGlobalVars:
|
219
|
+
Description: Avoid Perl-style global variables.
|
220
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
221
|
+
Enabled: false
|
222
|
+
Style/VariableInterpolation:
|
223
|
+
Description: Don't interpolate global, instance and class variables directly in
|
224
|
+
strings.
|
225
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
226
|
+
Enabled: false
|
227
|
+
Style/WhenThen:
|
228
|
+
Description: Use when x then ... for one-line cases.
|
229
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
230
|
+
Enabled: false
|
231
|
+
Lint/EachWithObjectArgument:
|
232
|
+
Description: Check for immutable argument given to each_with_object.
|
233
|
+
Enabled: true
|
234
|
+
Lint/HandleExceptions:
|
235
|
+
Description: Don't suppress exception.
|
236
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
237
|
+
Enabled: false
|
238
|
+
Lint/LiteralInCondition:
|
239
|
+
Description: Checks of literals used in conditions.
|
240
|
+
Enabled: false
|
241
|
+
Lint/LiteralInInterpolation:
|
242
|
+
Description: Checks for literals used in interpolation.
|
243
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/bin/aptly-cli
CHANGED
@@ -183,8 +183,8 @@ command :publish_drop do |c|
|
|
183
183
|
c.summary = 'Delete published repository, clean up files in published directory.'
|
184
184
|
c.description = 'Delete published repository'
|
185
185
|
c.example 'Delete publish repository called ', 'aptly-cli repo_list'
|
186
|
-
c.option '--prefix', String, 'prefix, optional'
|
187
|
-
c.option '--distribution', String, 'distribution'
|
186
|
+
c.option '--prefix PREFIX', String, 'prefix, optional'
|
187
|
+
c.option '--distribution DISTRIBUTION', String, 'distribution'
|
188
188
|
c.option '--force', 'force published repository removal even if component cleanup fails'
|
189
189
|
c.action do |args, options|
|
190
190
|
aptly_command = AptlyCli::AptlyPublish.new
|
@@ -214,6 +214,7 @@ command :publish_repo do |c|
|
|
214
214
|
c.example 'publish repo with signing keyring', 'aptly-cli publish_repo --sourcekind snapshot --name precise/rocksoftware300 --origin testorigin --gpg_keyring /etc/apt/trustdb.gpg'
|
215
215
|
c.option '--name NAME', String, 'Local repository name with optional component, required'
|
216
216
|
c.option '--sourcekind SOURCEKIND', String, 'Local for local repositories and snapshot for snapshots, required'
|
217
|
+
c.option '--prefix PREFIX', String, 'prefix'
|
217
218
|
c.option '--distribution DISTRIBUTION', String, 'Distribution name, if missing aptly would try to guess from sources'
|
218
219
|
c.option '--label LABEL', String, 'value of Label: field in published repository stanza'
|
219
220
|
c.option '--origin ORIGIN', String, 'value of Origin: field in published repository stanza'
|
@@ -228,7 +229,8 @@ command :publish_repo do |c|
|
|
228
229
|
c.option '--gpg_passphrase_file GPGPASSFILE', String, 'gpg passphrase file (local to aptly server/user)'
|
229
230
|
c.action do |args, options|
|
230
231
|
aptly_command = AptlyCli::AptlyPublish.new
|
231
|
-
puts aptly_command.publish_repo(options.name, { :sourcekind => options.sourcekind, :
|
232
|
+
puts aptly_command.publish_repo(options.name, { :sourcekind => options.sourcekind, :prefix => options.prefix,
|
233
|
+
:label => options.label, :distribution => options.distribution,
|
232
234
|
:origin => options.origin, :forceoverwrite => options.forceoverwrite,
|
233
235
|
:architectures => options.architectures, :skip => options.gpg_skip, :batch => options.gpg_batch,
|
234
236
|
:gpgKey => options.gpg_key, :keyring => options.gpg_keyring, :secretKeyring => options.gpg_secret_keyring,
|
@@ -240,7 +242,7 @@ command :publish_update do |c|
|
|
240
242
|
c.syntax = 'aptly-cli publish_update [options]'
|
241
243
|
c.summary = 'Update published repository. If local repository has been published, published repository would be updated to match local repository contents. If snapshots have been been published, it is possible to switch each component to new snapshot'
|
242
244
|
c.description = 'Update published repository'
|
243
|
-
c.example 'description', 'aptly-cli publish_update --
|
245
|
+
c.example 'description', 'aptly-cli publish_update --forceoverwrite --distribution precise'
|
244
246
|
c.option '--prefix PREFIX', String, 'Publishing prefix, default root'
|
245
247
|
c.option '--distribution DISTRIBUTION', String, 'Distribution name'
|
246
248
|
c.option '--snapshots SNAPSHOTS', String, 'When updating published snapshots, list of objects component/name seperated by space'
|
data/lib/aptly_cli/version.rb
CHANGED
data/lib/aptly_publish.rb
CHANGED
@@ -1,128 +1,110 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require 'aptly_cli/version'
|
2
|
+
require 'aptly_load'
|
3
|
+
require 'httmultiparty'
|
4
|
+
require 'json'
|
5
5
|
|
6
6
|
module AptlyCli
|
7
|
+
# :nodoc:
|
7
8
|
class AptlyPublish
|
8
|
-
|
9
9
|
include HTTMultiParty
|
10
10
|
|
11
11
|
# Load aptly-cli.conf and establish base_uri
|
12
|
-
config = AptlyCli::AptlyLoad.new.configure_with(
|
12
|
+
config = AptlyCli::AptlyLoad.new.configure_with('/etc/aptly-cli.conf')
|
13
13
|
base_uri "http://#{config[:server]}:#{config[:port]}/api"
|
14
14
|
|
15
15
|
if config[:username]
|
16
16
|
if config[:password]
|
17
|
-
basic_auth
|
17
|
+
basic_auth config[:username].to_s, config[:password].to_s
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
if config[:debug] == true
|
22
|
-
debug_output $stdout
|
23
|
-
end
|
24
|
-
|
25
|
-
@@available_gpg_options = [ :skip, :batch, :gpgKey, :keyring, :secretKeyring,
|
26
|
-
:passphrase, :passphraseFile ]
|
21
|
+
debug_output $stdout if config[:debug] == true
|
27
22
|
|
28
|
-
@@
|
29
|
-
|
23
|
+
@@available_gpg_options = [:skip, :batch, :gpgKey, :keyring, :secretKeyring,
|
24
|
+
:passphrase, :passphraseFile]
|
25
|
+
@@available_options_for_repo = [:distribution, :label, :origin,
|
26
|
+
:forceoverwrite, :architectures]
|
27
|
+
@@available_options_for_update = [:prefix, :distribution, :forceoverwrite]
|
30
28
|
|
31
29
|
def publish_drop(publish_options={})
|
32
|
-
uri =
|
33
|
-
|
34
|
-
if publish_options[:prefix]
|
35
|
-
uri = uri + "/#{publish_options[:prefix]}"
|
36
|
-
end
|
37
|
-
|
38
|
-
uri = uri + "/#{publish_options[:distribution]}"
|
30
|
+
uri = '/publish'
|
39
31
|
|
40
|
-
if publish_options[:
|
41
|
-
|
42
|
-
|
43
|
-
|
32
|
+
uri += if publish_options[:prefix]
|
33
|
+
"/#{publish_options[:prefix]}"
|
34
|
+
else
|
35
|
+
'/:.'
|
36
|
+
end
|
37
|
+
|
38
|
+
uri += "/#{publish_options[:distribution]}"
|
39
|
+
uri += '?force=1' if publish_options[:force] == true
|
44
40
|
self.class.delete(uri)
|
45
41
|
end
|
46
42
|
|
47
|
-
def publish_list
|
48
|
-
uri =
|
43
|
+
def publish_list
|
44
|
+
uri = '/publish'
|
49
45
|
self.class.get(uri)
|
50
46
|
end
|
51
|
-
|
52
|
-
def parse_names(names, label_type)
|
53
|
-
repos_to_publish = Array.new
|
54
|
-
if names.is_a? String
|
55
|
-
names = [names]
|
56
|
-
end
|
57
47
|
|
48
|
+
def parse_names(names, label_type)
|
49
|
+
repos_to_publish = []
|
50
|
+
names = [names] if names.is_a? String
|
58
51
|
names.each do |k|
|
59
|
-
if k.include?
|
60
|
-
repo, component = k.split(
|
61
|
-
repos_to_publish << {
|
52
|
+
if k.include? '/'
|
53
|
+
repo, component = k.split('/')
|
54
|
+
repos_to_publish << { label_type.to_s => component,
|
55
|
+
'Component' => repo }
|
62
56
|
else
|
63
|
-
repos_to_publish << {
|
57
|
+
repos_to_publish << { label_type.to_s => k }
|
64
58
|
end
|
65
59
|
end
|
66
|
-
|
67
|
-
return repos_to_publish
|
68
60
|
end
|
69
|
-
|
61
|
+
|
70
62
|
def parse_gpg_options(available_gpg_options, publish_options)
|
71
63
|
gpg_options = {}
|
72
64
|
available_gpg_options.each do |option|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
65
|
+
next unless publish_options.key?(option)
|
66
|
+
unless publish_options[option].nil?
|
67
|
+
gpg_options.merge!(option.capitalize.to_s => publish_options[option])
|
77
68
|
end
|
78
69
|
end
|
79
|
-
|
80
70
|
return gpg_options
|
81
71
|
end
|
82
72
|
|
83
73
|
def build_body(available_options_for_func, publish_options, body)
|
84
74
|
available_options_for_func.each do |option|
|
85
|
-
if publish_options.
|
75
|
+
if publish_options.key?(option)
|
86
76
|
body[option.capitalize] = publish_options[option]
|
87
77
|
end
|
88
78
|
end
|
89
|
-
|
90
|
-
return body
|
91
79
|
end
|
92
80
|
|
93
81
|
def publish_repo(names, publish_options={})
|
94
|
-
uri =
|
95
|
-
label_type =
|
96
|
-
repos =
|
97
|
-
gpg_options =
|
98
|
-
|
82
|
+
uri = '/publish'
|
83
|
+
label_type = 'Name'
|
84
|
+
repos = parse_names(names, label_type)
|
85
|
+
gpg_options = parse_gpg_options(@@available_gpg_options,
|
86
|
+
publish_options)
|
99
87
|
@body = {}
|
100
88
|
@body[:SourceKind] = publish_options[:sourcekind]
|
101
89
|
@body[:Sources] = repos
|
102
90
|
build_body(@@available_options_for_repo, publish_options, @body)
|
103
|
-
|
104
|
-
unless gpg_options.empty?
|
105
|
-
@body[:Signing] = gpg_options
|
106
|
-
end
|
107
|
-
|
108
|
-
if publish_options[:prefix]
|
109
|
-
uri = uri + publish_options[:prefix]
|
110
|
-
end
|
111
|
-
|
112
|
-
@body_json = @body.to_json
|
91
|
+
@body[:Signing] = gpg_options unless gpg_options.empty?
|
113
92
|
|
114
|
-
|
93
|
+
uri += "/#{publish_options[:prefix]}" if publish_options[:prefix]
|
115
94
|
|
95
|
+
@body_json = @body.to_json
|
96
|
+
|
97
|
+
self.class.post(uri, headers: { 'Content-Type' => 'application/json' },
|
98
|
+
body: @body_json)
|
116
99
|
end
|
117
100
|
|
118
101
|
def publish_update(snapshots=[], publish_options={})
|
119
|
-
uri =
|
120
|
-
label_type =
|
121
|
-
gpg_options =
|
102
|
+
uri = '/publish'
|
103
|
+
label_type = 'Snapshots'
|
104
|
+
gpg_options = parse_gpg_options(@@available_gpg_options, publish_options)
|
122
105
|
@body = {}
|
123
|
-
|
124
106
|
unless snapshots.nil?
|
125
|
-
snapshots =
|
107
|
+
snapshots = parse_names(snapshots, label_type)
|
126
108
|
@body[:Snapshots] = snapshots
|
127
109
|
end
|
128
110
|
|
@@ -131,19 +113,18 @@ module AptlyCli
|
|
131
113
|
end
|
132
114
|
|
133
115
|
build_body(@@available_options_for_update, publish_options, @body)
|
134
|
-
|
135
|
-
if publish_options[:prefix]
|
136
|
-
uri = uri + "/#{publish_options[:prefix]}"
|
137
|
-
else
|
138
|
-
uri = uri + "/"
|
139
|
-
end
|
140
116
|
|
141
|
-
uri
|
117
|
+
uri += if publish_options[:prefix]
|
118
|
+
"/#{publish_options[:prefix]}"
|
119
|
+
else
|
120
|
+
'/'
|
121
|
+
end
|
142
122
|
|
143
|
-
|
144
|
-
|
145
|
-
self.class.put(uri, :headers => { 'Content-Type'=>'application/json' }, :body => @body_json)
|
123
|
+
uri += "/#{publish_options[:distribution]}"
|
146
124
|
|
125
|
+
@body_json = @body.to_json
|
126
|
+
self.class.put(uri, headers: { 'Content-Type' => 'application/json' },
|
127
|
+
body: @body_json)
|
147
128
|
end
|
148
129
|
end
|
149
130
|
end
|
data/lib/aptly_repo.rb
CHANGED
@@ -36,7 +36,7 @@ module AptlyCli
|
|
36
36
|
uri = "/repos/" + repo_options[:name]
|
37
37
|
|
38
38
|
if repo_options[:force] == true
|
39
|
-
uri
|
39
|
+
uri += "?force=1"
|
40
40
|
end
|
41
41
|
|
42
42
|
self.class.delete(uri)
|
@@ -74,14 +74,14 @@ module AptlyCli
|
|
74
74
|
end
|
75
75
|
|
76
76
|
if repo_options[:query]
|
77
|
-
uri
|
77
|
+
uri += "?q=" + repo_options[:query]
|
78
78
|
if repo_options[:withdeps] or repo_options[:format]
|
79
79
|
puts "When specifiying specific package query, other options are invalid."
|
80
80
|
end
|
81
81
|
elsif repo_options[:format]
|
82
|
-
uri
|
82
|
+
uri += "?format=#{repo_options[:format]}"
|
83
83
|
elsif repo_options[:withdeps] == true
|
84
|
-
uri
|
84
|
+
uri += "?withDeps=1"
|
85
85
|
end
|
86
86
|
|
87
87
|
self.class.get uri
|
@@ -114,11 +114,11 @@ module AptlyCli
|
|
114
114
|
end
|
115
115
|
|
116
116
|
if forcereplace == true
|
117
|
-
uri
|
117
|
+
uri += "?forceReplace=1"
|
118
118
|
end
|
119
119
|
|
120
120
|
if noremove == true
|
121
|
-
uri
|
121
|
+
uri += "?noRemove=1"
|
122
122
|
end
|
123
123
|
|
124
124
|
response = self.class.post(uri)
|
data/lib/aptly_snapshot.rb
CHANGED
@@ -26,7 +26,7 @@ module AptlyCli
|
|
26
26
|
uri = "/snapshots/#{name}"
|
27
27
|
|
28
28
|
if force == true
|
29
|
-
uri
|
29
|
+
uri += "?force=1"
|
30
30
|
end
|
31
31
|
|
32
32
|
self.class.delete(uri)
|
@@ -36,7 +36,7 @@ module AptlyCli
|
|
36
36
|
uri = "/snapshots"
|
37
37
|
|
38
38
|
if sort
|
39
|
-
uri
|
39
|
+
uri += "?sort=#{sort}"
|
40
40
|
end
|
41
41
|
|
42
42
|
self.class.get(uri)
|
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.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -119,6 +119,10 @@ extensions: []
|
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
121
|
- .gitignore
|
122
|
+
- .hound.yml
|
123
|
+
- .rubocop.yml
|
124
|
+
- .rubocop_todo.yml
|
125
|
+
- .ruby-style.yml
|
122
126
|
- .travis.yml
|
123
127
|
- CODE_OF_CONDUCT.md
|
124
128
|
- Gemfile
|