package_cloud 0.3.12 → 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: ebf04b9bf18aac29f88bcd67e07322fe922359021c004a33975c9dbc110ceb75
4
- data.tar.gz: 5e2be465b0f1823b6e1df58b8346f6fb627a3693414b7b7487db21f9bb116945
3
+ metadata.gz: d491d33c62c74e03dde03e4befd3275b54e7ce3e534745b5fc6499dbb6616aab
4
+ data.tar.gz: ded90eb0fedeea5494ed879fef5d53b2e9ca80f3f39533e625129bbe38013feb
5
5
  SHA512:
6
- metadata.gz: 3f0f0327922943e4b61848cf815c4fa0ad2352b920e58019f5c0223b4d896af876de7ebfbb570e4cae92a9db4147c7be933a4c1bc48307facf1dba98a092983f
7
- data.tar.gz: 5dd52a13fa14a138516612b5adcf672a0feb804689f737f216aeee8e429b852e250cdd42014a9617743d5a9793ace0867d5ab8f3c3381150bf22902bd8f827e9
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)
@@ -274,7 +301,7 @@ module PackageCloud
274
301
  file_paths = []
275
302
  files.each do |f|
276
303
  filepath = File.join(dir, f["filename"])
277
- if !File.exists?(filepath)
304
+ if !File.exist?(filepath)
278
305
  print "Unable to find file name: #{f["filename"]} for source package: #{filepath}\n".color(:red)
279
306
  abort("Aborting...".color(:red))
280
307
  end
@@ -96,7 +96,7 @@ module PackageCloud
96
96
  ## config where the url is used verbatim as the key, instead of "url",
97
97
  ## this attempts to fix the config file
98
98
  def fix_config_file!
99
- if File.exists?(@filename) && File.writable?(@filename)
99
+ if File.exist?(@filename) && File.writable?(@filename)
100
100
  attrs = JSON.parse(File.read(@filename))
101
101
  if !attrs.has_key?("url")
102
102
  ## overwrite the config file if "url" key not found
@@ -1,7 +1,7 @@
1
1
  module PackageCloud
2
2
  MAJOR_VERSION = "0"
3
3
  MINOR_VERSION = "3"
4
- PATCH_VERSION = "12"
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.12
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Damato
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2023-04-27 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
@@ -163,7 +183,7 @@ homepage: https://packagecloud.io
163
183
  licenses:
164
184
  - MIT
165
185
  metadata: {}
166
- post_install_message:
186
+ post_install_message:
167
187
  rdoc_options: []
168
188
  require_paths:
169
189
  - lib
@@ -178,8 +198,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
198
  - !ruby/object:Gem::Version
179
199
  version: '0'
180
200
  requirements: []
181
- rubygems_version: 3.2.28
182
- signing_key:
201
+ rubygems_version: 3.4.16
202
+ signing_key:
183
203
  specification_version: 4
184
204
  summary: The https://packagecloud.io CLI for uploading Node.js, Debian, RPM, RubyGem,
185
205
  Python, and Java packages. Check our website or the RubyDoc documentation for detailed
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'$