package_cloud 0.2.4 → 0.2.5
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.
- data/lib/package_cloud/cli/entry.rb +5 -3
- data/lib/package_cloud/version.rb +1 -1
- metadata +2 -2
@@ -34,6 +34,8 @@ module PackageCloud
|
|
34
34
|
|
35
35
|
desc "push user/repo[/distro/version] /path/to/packages",
|
36
36
|
"push package(s) to repository (in distro/version if required)"
|
37
|
+
option "skip-file-ext-validation", :type => :boolean
|
38
|
+
option "yes", :type => :boolean
|
37
39
|
def push(repo, package_file, *package_files)
|
38
40
|
ARGV.clear # otherwise gets explodes
|
39
41
|
package_files << package_file
|
@@ -48,7 +50,7 @@ module PackageCloud
|
|
48
50
|
!["gem", "deb", "rpm"].include?(f.split(".").last)
|
49
51
|
end
|
50
52
|
|
51
|
-
if invalid_packages.any?
|
53
|
+
if !options.has_key?("skip-file-ext-validation") && invalid_packages.any?
|
52
54
|
message = "I don't know how to push these packages:\n\n".red
|
53
55
|
invalid_packages.each do |p|
|
54
56
|
message << " #{p}\n"
|
@@ -57,13 +59,13 @@ module PackageCloud
|
|
57
59
|
abort(message)
|
58
60
|
end
|
59
61
|
|
60
|
-
if exts.first == "gem" && package_files.length > 1
|
62
|
+
if !options.has_key?("yes") && exts.first == "gem" && package_files.length > 1
|
61
63
|
answer = get_valid("Are you sure you want to push #{package_files.length} packages? (y/n)") do |s|
|
62
64
|
s == "y" || s == "n"
|
63
65
|
end
|
64
66
|
|
65
67
|
if answer != "y"
|
66
|
-
|
68
|
+
abort("Aborting...".red)
|
67
69
|
end
|
68
70
|
end
|
69
71
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|