package_cloud 0.3.05 → 0.3.09

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
- SHA1:
3
- metadata.gz: '092367368ac01d15e6e21b8f34017ed5d1313ccd'
4
- data.tar.gz: 2b802351b14a7d73f9dec8bf1c21930d0b06d7ed
2
+ SHA256:
3
+ metadata.gz: 826f31e8a6707526bd6f82609c43677b162464688596785a338be6f7a35acf44
4
+ data.tar.gz: '096e57c694454dda57219d8ca2b79e63b58d46ce4711176e745518c33ed62d7d'
5
5
  SHA512:
6
- metadata.gz: 2faddb5c7c061833d26a27ee13d453ecdbfed1a681debca4a6d12f0c758b28c1f5e0ceb3c1b474f6cd79bf8597e44575ed2dacdbfe0c514fd21c33784412b95e
7
- data.tar.gz: 5df6f89cf42745308e8f185cd23831eb611520f9f394b33eaa86b1e331ebf6b43b1406c85348d0dcf94c2b3802f69406ddaf26c0fd59c04eeb39c660751a3861
6
+ metadata.gz: bb785da285b810f8b6bebe17354a9f782ec5afa4c36acc32a74628908ef332003b07af77cef3db5a4c550a939bce529bc4320dcc98dc28beb4af4ef4fec8a442
7
+ data.tar.gz: 1aa70e22f8d994b0f0a5a2324d534a7c25f02d60e76d8298b4eb0307ecd915a4a72fb45ce0c7e6d4350c68b9db4b7c4eb20b87fc0142b11446beac2c5c5c6265
data/README.md CHANGED
@@ -164,6 +164,24 @@ repository owned by `example-user` as a RubyGem package.
164
164
  Note that unlike all other package types, RubyGems do not require any
165
165
  additional specification on upload.
166
166
 
167
+ #### Uploading a arbitrary file
168
+
169
+ NOTE:
170
+
171
+ Currently supported files:
172
+
173
+ * .asc (armored ascii signature file)
174
+
175
+ You can upload a Anyfile package found at the path `/tmp/example.asc` by
176
+ running:
177
+
178
+ ```
179
+ package_cloud push example-user/example-repository/anyfile /tmp/example.asc
180
+ ```
181
+
182
+ This command will upload `/tmp/example.asc` to the `example-repository`
183
+ repository owned by `example-user` as an Anyfile package.
184
+
167
185
  #### Uploading a Python package
168
186
 
169
187
  You can upload a Python package found at the path `/tmp/example.whl` by
@@ -12,7 +12,7 @@ module PackageCloud
12
12
  if distros
13
13
  puts "Listing distributions for #{package_type}:"
14
14
  distros.each do |distro|
15
- next if distro["index_name"] == "any"
15
+ next if (distro["index_name"] == "any" || distro["index_name"] == "rpm_any")
16
16
  puts "\n #{parse_display_name(distro["display_name"])} (#{distro["index_name"]}):\n\n"
17
17
  distro["versions"].each do |ver|
18
18
  puts " #{parse_version_name(ver["display_name"])} (#{ver["index_name"]})"
@@ -2,8 +2,9 @@ module PackageCloud
2
2
  module CLI
3
3
  JAVA_EXTS = ["jar", "aar", "war"]
4
4
  PY_EXTS = ["gz", "bz2", "z", "tar", "egg-info", "zip", "whl", "egg"]
5
+ ANYFILE_EXTS = ["asc"]
5
6
  NODE_EXTS = ["tgz"]
6
- SUPPORTED_EXTS = JAVA_EXTS + PY_EXTS + NODE_EXTS + ["gem", "deb", "rpm", "dsc"]
7
+ SUPPORTED_EXTS = JAVA_EXTS + PY_EXTS + ANYFILE_EXTS + NODE_EXTS + ["gem", "deb", "rpm", "dsc", "apk"]
7
8
 
8
9
  class Entry < Base
9
10
  desc "repository SUBCMD ...ARGS", "manage repositories"
@@ -110,6 +111,7 @@ module PackageCloud
110
111
  package_files << package_file
111
112
 
112
113
  exts = package_files.map { |f| f.split(".").last }.uniq
114
+ exts = handle_special_exts(repo, exts)
113
115
 
114
116
  if package_files.length > 1 && exts.length > 1
115
117
  abort("You can't push multiple packages of different types at the same time.\nFor example, use *.deb to push all your debs at once.".color(:red))
@@ -145,6 +147,8 @@ module PackageCloud
145
147
  validator = Validator.new(client)
146
148
  if PY_EXTS.include?(exts.first.downcase)
147
149
  dist_id = validator.distribution_id(repo, package_files, 'py')
150
+ elsif ANYFILE_EXTS.include?(exts.first.downcase)
151
+ dist_id = validator.distribution_id(repo, package_files, 'anyfile')
148
152
  elsif NODE_EXTS.include?(exts.first.downcase)
149
153
  dist_id = validator.distribution_id(repo, package_files, 'node')
150
154
  elsif JAVA_EXTS.include?(exts.first.downcase)
@@ -195,12 +199,25 @@ module PackageCloud
195
199
  end
196
200
 
197
201
  private
202
+ def handle_special_exts(repo, exts)
203
+ exts.map do |elem|
204
+ case elem
205
+ when 'apk'
206
+ elem = repo.include?("alpine") ? "alpine" : elem
207
+ else
208
+ elem
209
+ end
210
+ end
211
+ end
212
+
198
213
  def expand_dist_shortcut(dist)
199
214
  case dist
200
215
  when 'java'
201
216
  'java/maven2'
202
217
  when 'python'
203
218
  'python/1'
219
+ when 'anyfile'
220
+ 'anyfile/1'
204
221
  when 'node'
205
222
  'node/1'
206
223
  else
@@ -9,7 +9,7 @@ module PackageCloud
9
9
  _,_,dist_sel,ver_sel = repo.split("/")
10
10
 
11
11
  # These are all 'single version' distros
12
- if (dist_sel == "python" || dist_sel == "java" || dist_sel == "node")
12
+ if (dist_sel == "python" || dist_sel == "java" || dist_sel == "node" || dist_sel == "anyfile")
13
13
  dist = distributions[package_type].detect { |d| d["index_name"] == dist_sel }
14
14
  dist["versions"].first["id"]
15
15
  elsif dist_sel && ver_sel
@@ -69,7 +69,7 @@ module PackageCloud
69
69
  puts "If you don't see your OS or version here, send us an email at support@packagecloud.io:\n\n"
70
70
  all_distros = distributions[package_type]
71
71
 
72
- filtered_distros = all_distros.select {|dist| dist["index_name"] != "any"}
72
+ filtered_distros = all_distros.select {|dist| dist["index_name"] != "any" && dist["index_name"] != "rpm_any" }
73
73
 
74
74
  filtered_distros.each_with_index do |dist, index|
75
75
  puts "\t#{index}. #{dist["display_name"]}"
@@ -1,7 +1,7 @@
1
1
  module PackageCloud
2
2
  MAJOR_VERSION = "0"
3
3
  MINOR_VERSION = "3"
4
- PATCH_VERSION = "05"
4
+ PATCH_VERSION = "09"
5
5
 
6
6
  VERSION = [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION].join(".")
7
7
  end
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency "thor", "~> 0.18"
23
- spec.add_runtime_dependency "highline", "1.6.20"
22
+ spec.add_runtime_dependency "thor", "~> 1.2"
23
+ spec.add_runtime_dependency "highline", "~> 2.0.0"
24
24
  spec.add_runtime_dependency "rest-client", "~> 2.0"
25
- spec.add_runtime_dependency "json_pure", "1.8.1"
25
+ spec.add_runtime_dependency "json_pure", "~> 2.3.0"
26
26
  spec.add_runtime_dependency "rainbow", "2.2.2"
27
27
 
28
28
  spec.add_development_dependency "bundler", "~> 1.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: package_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.05
4
+ version: 0.3.09
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Damato
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2022-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.18'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.18'
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: highline
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.6.20
33
+ version: 2.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.6.20
40
+ version: 2.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rest-client
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: json_pure
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.8.1
61
+ version: 2.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.8.1
68
+ version: 2.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rainbow
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ homepage: https://packagecloud.io
163
163
  licenses:
164
164
  - MIT
165
165
  metadata: {}
166
- post_install_message:
166
+ post_install_message:
167
167
  rdoc_options: []
168
168
  require_paths:
169
169
  - lib
@@ -178,9 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.6.13
183
- signing_key:
181
+ rubygems_version: 3.2.3
182
+ signing_key:
184
183
  specification_version: 4
185
184
  summary: The https://packagecloud.io CLI for uploading Node.js, Debian, RPM, RubyGem,
186
185
  Python, and Java packages. Check our website or the RubyDoc documentation for detailed