package_cloud 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6d363087603473afe3c1ac11834d158341b1352f22b4659c20dabb7c1122c8c
4
- data.tar.gz: 0d214d7769a2437e9416daf4ed76f067ef78e83dae74f77ba5232e5a419cc227
3
+ metadata.gz: d491d33c62c74e03dde03e4befd3275b54e7ce3e534745b5fc6499dbb6616aab
4
+ data.tar.gz: ded90eb0fedeea5494ed879fef5d53b2e9ca80f3f39533e625129bbe38013feb
5
5
  SHA512:
6
- metadata.gz: 79079fca04fb398f2b0a81bdec7c60b403c3cf6328c16f5dd6e2bae5fb7e7c206a29fb2330b76d1c2a3ce0e2629519563302f7906f2c25c6676010394ce71806
7
- data.tar.gz: a3387acaa98bbb884dbc37c3bf3345265be42d2904a95beb7558c2dc436b37dcaab714605f9baa30aec008ac7214264b765ea84f4b6285c99378825aa909937f
6
+ metadata.gz: 9d32155e5a921709dce335ac92cc013322c10cbf1e77c9612628094aa0fb6a4f69f1ce07136677ac271c10880d09e9a1ad05fa598b98a8dbed3c036700294195
7
+ data.tar.gz: 5922fd817b64d24facc5a23139f1a7165f7ba9fa8718a7c127e93f9f44cea9441605441be0ceaa0d6be996af4d4d10318d144b4debd46b3b0a99cb88ba72ea76
checksums.yaml.gz.sig ADDED
Binary file
@@ -103,6 +103,9 @@ module PackageCloud
103
103
  option "skip-errors", :type => :boolean,
104
104
  :desc => "Skip errors encountered during a package push and continue pushing the next package."
105
105
 
106
+ option "skip-duplicates", :type => :boolean,
107
+ :desc => "Skip packages which already exist and continue pushing the next package."
108
+
106
109
  option "coordinates", :type => :string,
107
110
  :desc => "Specify the exact maven coordinates to use for a JAR. Useful for JARs without coordinates, 'fat JARs', and WARs."
108
111
 
@@ -185,6 +188,8 @@ module PackageCloud
185
188
  measurement = Benchmark.measure do
186
189
  if options.has_key?("skip-errors")
187
190
  create_package_skip_errors(client_repo, f, dist_id, files, ext, options["coordinates"])
191
+ elsif options.has_key?("skip-duplicates")
192
+ create_package_skip_duplicates(client_repo, f, dist_id, files, ext, options["coordinates"])
188
193
  else
189
194
  create_package(client_repo, f, dist_id, files, ext, options["coordinates"])
190
195
  end
@@ -246,6 +251,28 @@ module PackageCloud
246
251
  end
247
252
  end
248
253
 
254
+ def create_package_skip_duplicates(client_repo, f, dist_id, files, ext, coordinates=nil)
255
+ begin
256
+ client_repo.create_package(f, dist_id, files, ext, coordinates=nil)
257
+ rescue RestClient::UnprocessableEntity => e
258
+ json = JSON.parse(e.response)
259
+ if json == { "filename" => ["has already been taken"] }
260
+ print "skipping, already exists.\n".color(:yellow)
261
+ else
262
+ print "error:\n".color(:red)
263
+ json.each do |k,v|
264
+ if v.is_a? String
265
+ puts "\n\t#{k}: #{v}\n"
266
+ elsif v.is_a? Array
267
+ puts "\n\t#{k}: #{v.join(", ")}\n"
268
+ end
269
+ end
270
+ puts ""
271
+ exit(1)
272
+ end
273
+ end
274
+ end
275
+
249
276
  def create_package(client_repo, f, dist_id, files, ext, coordinates=nil)
250
277
  begin
251
278
  client_repo.create_package(f, dist_id, files, ext, coordinates)
@@ -1,7 +1,7 @@
1
1
  module PackageCloud
2
2
  MAJOR_VERSION = "0"
3
3
  MINOR_VERSION = "3"
4
- PATCH_VERSION = "13"
4
+ PATCH_VERSION = "14"
5
5
 
6
6
  VERSION = [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION].join(".")
7
7
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_runtime_dependency "json_pure", "~> 2.3.0"
26
26
  spec.add_runtime_dependency "rainbow", "2.2.2"
27
27
 
28
- spec.add_development_dependency "bundler", "~> 1.3"
28
+ spec.add_development_dependency "bundler"
29
29
  spec.add_development_dependency "rake"
30
30
  spec.add_development_dependency "mdl"
31
31
  end
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: package_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.13
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Damato
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDKDCCAhCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
14
+ MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0y
15
+ MzA3MTIwODU1NTFaFw0yNDA3MTEwODU1NTFaMDoxDTALBgNVBAMMBHNqMjYxFDAS
16
+ BgoJkiaJk/IsZAEZFgRzajI2MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkq
17
+ hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr60Eo/ttCk8GMTMFiPr3GoYMIMFvLak
18
+ xSmTk9YGCB6UiEePB4THSSA5w6IPyeaCF/nWkDp3/BAam0eZMWG1IzYQB23TqIM0
19
+ 1xzcNRvFsn0aQoQ00k+sj+G83j3T5OOV5OZIlu8xAChMkQmiPd1NXc6uFv+Iacz7
20
+ kj+CMsI9YUFdNoU09QY0b+u+Rb6wDYdpyvN60YC30h0h1MeYbvYZJx/iZK4XY5zu
21
+ 4O/FL2ChjL2CPCpLZW55ShYyrzphWJwLOJe+FJ/ZBl6YXwrzQM9HKnt4titSNvyU
22
+ KzE3L63A3PZvExzLrN9u09kuWLLJfXB2sGOlw3n9t72rJiuBr3/OQQIDAQABozkw
23
+ NzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU99dfRjEKFyczTeIz
24
+ m3ZsDWrNC80wDQYJKoZIhvcNAQELBQADggEBAHplXTmXnsLZKl6th6Twlbpl3iBl
25
+ 7aRpOrLc7g8WIEirjiWlYZXjhdG6XoiIQAQtV3XniQ6npRPw7Np8AhSR1LOlvbOs
26
+ hEdArvs/OZy9cN7fQNduZFK1dkbYCF4waBTycsQFvrzcJzRmjhS9BJd0rroetldo
27
+ nmPzAzlAl9rIOQC/c763FVfdbPQu+mxcj4JCfVElUzxK+4igyB6SFMckMPSZIJbi
28
+ cxvXzM34LVue8vISlf/2VKpawD3kQinfo1I53MP3Hv3EihDc4p14E4hdAILtHd5r
29
+ k6d9rkvRe0/YFTLB1hzK6scdAUcD91NOylY8s4cypQv/mk+OTbQ9+Xy7tyU=
30
+ -----END CERTIFICATE-----
31
+ date: 2023-08-09 00:00:00.000000000 Z
12
32
  dependencies:
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: thor
@@ -84,16 +104,16 @@ dependencies:
84
104
  name: bundler
85
105
  requirement: !ruby/object:Gem::Requirement
86
106
  requirements:
87
- - - "~>"
107
+ - - ">="
88
108
  - !ruby/object:Gem::Version
89
- version: '1.3'
109
+ version: '0'
90
110
  type: :development
91
111
  prerelease: false
92
112
  version_requirements: !ruby/object:Gem::Requirement
93
113
  requirements:
94
- - - "~>"
114
+ - - ">="
95
115
  - !ruby/object:Gem::Version
96
- version: '1.3'
116
+ version: '0'
97
117
  - !ruby/object:Gem::Dependency
98
118
  name: rake
99
119
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
198
  - !ruby/object:Gem::Version
179
199
  version: '0'
180
200
  requirements: []
181
- rubygems_version: 3.4.10
201
+ rubygems_version: 3.4.16
182
202
  signing_key:
183
203
  specification_version: 4
184
204
  summary: The https://packagecloud.io CLI for uploading Node.js, Debian, RPM, RubyGem,
metadata.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ (S-3��� �]C�Q�޽�%�].�*m��5W��R��E�!�M��cm��1.=���ܹ���\,uw�P�7p,"a�l�'
2
+ �ؔ�z���k)��}����p�D��#� ����FQ�f��.�\17�[Z��_�~�����y�b��C�3��a,V}z|릈��_1 �Z���iJ7m��9]*��+�Yլ��hnOX�wȍ��w�d� �(��h����"��Έ)l|���.��Ӫ�ӈ΋f���8���k��Qt'$