package_cloud 0.2.45 → 0.3.00
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/package_cloud/client.rb +0 -9
- data/lib/package_cloud/config_file.rb +0 -11
- data/lib/package_cloud/version.rb +2 -2
- data/package_cloud.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b7267e4072d89dfb7b37402fab0562c751942f
|
4
|
+
data.tar.gz: 5bf8178c9882d9bc6cb27d10f3ed579f89ee1917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05aa38f73f717f09eb5c3463f8c81aa1d19a9fa2ca3c2b88fbc3a8ccc1c853bba0735c7926ffa6a059d62ed9bc27208bb8f1e4b64ae9a40e4a59254bc5a75c14
|
7
|
+
data.tar.gz: d9670c97b42e3b8bc4decfa718fd284859937aaaad2175a0747b4673d797cf1443704808a9e38d2bba248e9b550b424fe6da083ce8cf072d997e49397c7cacad
|
data/README.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
Greetings! Welcome to the [packagecloud](https://packagecloud.io) command line
|
4
4
|
client, `package_cloud`.
|
5
5
|
|
6
|
+
#### Requirements
|
7
|
+
Only Ruby 2.x and greater is supported, please use version 0.2.45 for Ruby 1.9 support.
|
8
|
+
|
9
|
+
## Overview
|
6
10
|
The `package_cloud` command line client allows you to easily:
|
7
11
|
|
8
12
|
* Create Debian, RPM, RubyGem, Python, and Maven package repositories on [packagecloud](https://packagecloud.io).
|
@@ -390,7 +394,7 @@ per-machine basis) or completely by deleting the associated master token.
|
|
390
394
|
|
391
395
|
#### Creating master tokens
|
392
396
|
|
393
|
-
Following from the example explained in the previous section,
|
397
|
+
Following from the example explained in the previous section,
|
394
398
|
you can create a master token name "Example-Token" for the repository
|
395
399
|
`example-repository` owned by the user `example-user` by running the following
|
396
400
|
command:
|
data/lib/package_cloud/client.rb
CHANGED
@@ -60,14 +60,5 @@ module PackageCloud
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def gem_version
|
64
|
-
url = PackageCloud::Util.compute_url(@config.base_url, "/api/v1/gem_version")
|
65
|
-
begin
|
66
|
-
JSON.parse(RestClient.get(url))
|
67
|
-
rescue RestClient::ResourceNotFound => e
|
68
|
-
print "failed!\n".color(:red)
|
69
|
-
exit(127)
|
70
|
-
end
|
71
|
-
end
|
72
63
|
end
|
73
64
|
end
|
@@ -18,14 +18,12 @@ module PackageCloud
|
|
18
18
|
@token = ENV["PACKAGECLOUD_TOKEN"]
|
19
19
|
@url = URI(ENV["PACKAGECLOUD_URL"]) if ENV["PACKAGECLOUD_URL"]
|
20
20
|
output_host_and_token
|
21
|
-
assert_reasonable_gem_version
|
22
21
|
elsif File.exist?(@filename)
|
23
22
|
attrs = JSON.parse(File.read(@filename))
|
24
23
|
@token = attrs["token"] if attrs.has_key?("token")
|
25
24
|
@url = URI(attrs["url"]) if attrs.has_key?("url")
|
26
25
|
fix_config_file!
|
27
26
|
output_host_and_token
|
28
|
-
assert_reasonable_gem_version
|
29
27
|
else
|
30
28
|
puts "No config file exists at #{@filename}. Login to create one."
|
31
29
|
|
@@ -75,15 +73,6 @@ module PackageCloud
|
|
75
73
|
File.open(@filename, "w", 0600) { |f| f << JSON.dump(attrs); f << "\r\n" }
|
76
74
|
end
|
77
75
|
|
78
|
-
def assert_reasonable_gem_version
|
79
|
-
gem_version = Client.new(self).gem_version
|
80
|
-
if gem_version["minor"] != MINOR_VERSION
|
81
|
-
abort("This gem is out of date. Please update it!".color(:red))
|
82
|
-
elsif gem_version["patch"] > PATCH_VERSION
|
83
|
-
$stderr << "[WARNING] There's a newer version of the package_cloud gem. Install it when you get a chance!\n"
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
76
|
def output_host_and_token
|
88
77
|
token = @token[-4..-1].rjust(10, '*')
|
89
78
|
puts "Using #{@url} with token:#{token}"
|
data/package_cloud.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "thor", "~> 0.18"
|
23
23
|
spec.add_runtime_dependency "highline", "1.6.20"
|
24
|
-
spec.add_runtime_dependency "rest-client", "~>
|
24
|
+
spec.add_runtime_dependency "rest-client", "~> 2.0"
|
25
25
|
spec.add_runtime_dependency "json_pure", "1.8.1"
|
26
26
|
spec.add_runtime_dependency "rainbow", "2.2.2"
|
27
27
|
|
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.
|
4
|
+
version: 0.3.00
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Damato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '2.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: json_pure
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|