package_cloud 0.3.11 → 0.3.13
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 +1 -1
- data/lib/package_cloud/config_file.rb +16 -6
- data/lib/package_cloud/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6d363087603473afe3c1ac11834d158341b1352f22b4659c20dabb7c1122c8c
|
4
|
+
data.tar.gz: 0d214d7769a2437e9416daf4ed76f067ef78e83dae74f77ba5232e5a419cc227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79079fca04fb398f2b0a81bdec7c60b403c3cf6328c16f5dd6e2bae5fb7e7c206a29fb2330b76d1c2a3ce0e2629519563302f7906f2c25c6676010394ce71806
|
7
|
+
data.tar.gz: a3387acaa98bbb884dbc37c3bf3345265be42d2904a95beb7558c2dc436b37dcaab714605f9baa30aec008ac7214264b765ea84f4b6285c99378825aa909937f
|
@@ -274,7 +274,7 @@ module PackageCloud
|
|
274
274
|
file_paths = []
|
275
275
|
files.each do |f|
|
276
276
|
filepath = File.join(dir, f["filename"])
|
277
|
-
if !File.
|
277
|
+
if !File.exist?(filepath)
|
278
278
|
print "Unable to find file name: #{f["filename"]} for source package: #{filepath}\n".color(:red)
|
279
279
|
abort("Aborting...".color(:red))
|
280
280
|
end
|
@@ -62,14 +62,24 @@ module PackageCloud
|
|
62
62
|
|
63
63
|
def login_from_console
|
64
64
|
e = ask("Email:")
|
65
|
+
puts "If you signed up via social login (Github, Bitbucket etc.), and/or do not have a password, input: NIL"
|
65
66
|
p = ask("Password:") { |q| q.echo = false }
|
66
67
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
if p == "NIL"
|
69
|
+
puts "Copy your API Token from https://packagecloud.io/api_token and input below."
|
70
|
+
puts "(Note: An incorrectly inputted token will require deletion of the incorrectly generated $HOME/.packagecloud config file before rerunning the last command.)"
|
71
|
+
api_token = ask("Your API Token:") { |q| q.echo = false }
|
72
|
+
else
|
73
|
+
begin
|
74
|
+
api_token = PackageCloud::Auth.get_token(base_url(e, p))
|
75
|
+
rescue RestClient::Unauthorized => e
|
76
|
+
puts "Sorry, but we couldn't find you. Give it another try."
|
77
|
+
puts "(Or skip the login? Go to https://packagecloud.io/api_token to see instructions on downloading your $HOME/.packagecloud config file.)"
|
78
|
+
login_from_console
|
79
|
+
end
|
72
80
|
end
|
81
|
+
|
82
|
+
return api_token
|
73
83
|
end
|
74
84
|
|
75
85
|
def write
|
@@ -86,7 +96,7 @@ module PackageCloud
|
|
86
96
|
## config where the url is used verbatim as the key, instead of "url",
|
87
97
|
## this attempts to fix the config file
|
88
98
|
def fix_config_file!
|
89
|
-
if File.
|
99
|
+
if File.exist?(@filename) && File.writable?(@filename)
|
90
100
|
attrs = JSON.parse(File.read(@filename))
|
91
101
|
if !attrs.has_key?("url")
|
92
102
|
## overwrite the config file if "url" key not found
|
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.
|
4
|
+
version: 0.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Damato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
181
|
+
rubygems_version: 3.4.10
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: The https://packagecloud.io CLI for uploading Node.js, Debian, RPM, RubyGem,
|