package_cloud 0.2.32 → 0.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/package_cloud/cli/entry.rb +16 -3
- data/lib/package_cloud/validator.rb +3 -0
- data/lib/package_cloud/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09c1d89b6d9533a6974cd926ae0fd37c2baee5ec
|
4
|
+
data.tar.gz: bb9e92a7fb5ea19c67878f928c0ce2a544d79b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e37535b42a7e1ecf525cb088f4f7953ff994ee1fbf0f5260b03dd7e1b6664f54535410b4b4ba22bcf5e2b9e7f93b1fc39a7c1067b357f40dc805d4a68333698a
|
7
|
+
data.tar.gz: 3ea8fd07a37b92d58144a87192214ac2d1a73d2b3258f32edbe6efc55876483fba99810eb2e7eb27ce34f7b20151cc87c2de4c2b1ac33e483bccf723fe00bc13
|
@@ -52,7 +52,7 @@ module PackageCloud
|
|
52
52
|
end
|
53
53
|
|
54
54
|
invalid_packages = package_files.select do |f|
|
55
|
-
!["gem", "deb", "rpm", "dsc", "gz", "bz2", "z", "tar", "egg-info", "zip", "whl", "egg"].include?(f.split(".").last.downcase)
|
55
|
+
!["gem", "deb", "rpm", "dsc", "gz", "bz2", "z", "tar", "egg-info", "zip", "whl", "egg", "jar"].include?(f.split(".").last.downcase)
|
56
56
|
end
|
57
57
|
|
58
58
|
if !options.has_key?("skip-file-ext-validation") && invalid_packages.any?
|
@@ -60,7 +60,7 @@ module PackageCloud
|
|
60
60
|
invalid_packages.each do |p|
|
61
61
|
message << " #{p}\n"
|
62
62
|
end
|
63
|
-
message << "\npackage_cloud only supports debs, gems, and rpms.".red
|
63
|
+
message << "\npackage_cloud only supports debs, gems, jars, python packages, and rpms.".red
|
64
64
|
abort(message)
|
65
65
|
end
|
66
66
|
|
@@ -77,6 +77,9 @@ module PackageCloud
|
|
77
77
|
validator = Validator.new(client)
|
78
78
|
if ["gz", "bz2", "z", "tar", "egg-info", "zip", "whl", "egg"].include?(exts.first.downcase)
|
79
79
|
dist_id = validator.distribution_id(repo, package_files, 'py')
|
80
|
+
elsif ["jar"].include?(exts.first.downcase)
|
81
|
+
abort_if_snapshot!(package_files)
|
82
|
+
dist_id = validator.distribution_id(repo, package_files, 'jar')
|
80
83
|
else
|
81
84
|
dist_id = validator.distribution_id(repo, package_files, exts.first)
|
82
85
|
end
|
@@ -122,6 +125,12 @@ module PackageCloud
|
|
122
125
|
end
|
123
126
|
|
124
127
|
private
|
128
|
+
def abort_if_snapshot!(files)
|
129
|
+
if files.any? { |file| file.include?("-SNAPSHOT") }
|
130
|
+
abort("SNAPSHOT uploads are not supported by the CLI, please use Maven instead: https://packagecloud.io/docs#wagon-instructions")
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
125
134
|
def create_package_skip_errors(client_repo, f, dist_id, files, ext)
|
126
135
|
begin
|
127
136
|
client_repo.create_package(f, dist_id, files, ext)
|
@@ -142,7 +151,11 @@ module PackageCloud
|
|
142
151
|
print "error:\n".red
|
143
152
|
json = JSON.parse(e.response)
|
144
153
|
json.each do |k,v|
|
145
|
-
|
154
|
+
if v.is_a? String
|
155
|
+
puts "\n\t#{k}: #{v}\n"
|
156
|
+
elsif v.is_a? Array
|
157
|
+
puts "\n\t#{k}: #{v.join(", ")}\n"
|
158
|
+
end
|
146
159
|
end
|
147
160
|
puts ""
|
148
161
|
exit(1)
|
@@ -11,6 +11,9 @@ module PackageCloud
|
|
11
11
|
if dist_sel == "python"
|
12
12
|
dist = distributions[package_type].detect { |d| d["index_name"] == dist_sel }
|
13
13
|
dist["versions"].first["id"]
|
14
|
+
elsif dist_sel == "java"
|
15
|
+
dist = distributions[package_type].detect { |d| d["index_name"] == dist_sel }
|
16
|
+
dist["versions"].first["id"]
|
14
17
|
elsif dist_sel && ver_sel
|
15
18
|
dist = distributions[package_type].detect { |d| d["index_name"] == dist_sel }
|
16
19
|
|
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.2.
|
4
|
+
version: 0.2.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Damato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -160,8 +160,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.4.
|
163
|
+
rubygems_version: 2.4.8
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: https://packagecloud.io
|
167
167
|
test_files: []
|
168
|
+
has_rdoc:
|