r10k 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.mkd +17 -0
- data/lib/r10k/features.rb +2 -0
- data/lib/r10k/util/license.rb +8 -4
- data/lib/r10k/version.rb +1 -1
- data/lib/shared/puppet_forge/error.rb +7 -0
- data/lib/shared/puppet_forge/v3/module_release.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGIwYzM5NTYxYjdiMGU3ZjgwNzgxYjYyODIwMDVlMWU2MmQ1ZDYyYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmQ2NjM2NTFhNzM0NzM5ZjllNDY3MjFiNWFhM2FjYmFiZGM2YzZlZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjU1Mzc1ODgyMTlmNWRlNzYwMTU1ZGNkM2Y3NjM1ZDgzMTMwODgzNmVmYTc0
|
10
|
+
NTBjMzAwYTg3MzUyYzczNTdkNjJlNDAxZjk2NzFkYzMzMzRlYWQ0N2ZhODFl
|
11
|
+
Mjg3ZWExNTBlMTJlMWQxODJiODQ5ZWQyMDY3MGQ2YmQ5NDA4NTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjhlNzAxZWJiYzcxMzYwNzIwNDFkODI2MGVkNTg4ZWI1MDAyYjkyMWEzYzJj
|
14
|
+
ZmI1NjJkMjQ2OTdlYjQ2YTIwNTZlMzJmM2ZhMDc0OTlhMDM2MjdmOWZkNmZk
|
15
|
+
ZjcyOTNlN2JhZDYwMjkyNzkyZTE0MzY1MDliNDZmY2NkNDJhYjY=
|
data/CHANGELOG.mkd
CHANGED
@@ -1,6 +1,23 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.0.3
|
5
|
+
-----
|
6
|
+
|
7
|
+
2015/8/13
|
8
|
+
|
9
|
+
This is a bugfix release that resolves a critical issue issue in installing PE
|
10
|
+
only modules.
|
11
|
+
|
12
|
+
### Notes
|
13
|
+
|
14
|
+
(RK-156) PE-only modules cannot be installed
|
15
|
+
|
16
|
+
The mechanism used to load PE license information in r10k was preventing r10k
|
17
|
+
from not being able to locate the pe-license Ruby library in PE 2015.2.0; this
|
18
|
+
has been resolved by actually trying to load the relevant files instead of
|
19
|
+
probing for a gem and then conditionally loading it.
|
20
|
+
|
4
21
|
2.0.2
|
5
22
|
-----
|
6
23
|
|
data/lib/r10k/features.rb
CHANGED
data/lib/r10k/util/license.rb
CHANGED
@@ -1,19 +1,23 @@
|
|
1
1
|
require 'r10k/errors'
|
2
|
-
require '
|
2
|
+
require 'r10k/features'
|
3
3
|
|
4
4
|
module R10K
|
5
5
|
module Util
|
6
6
|
module License
|
7
|
+
extend R10K::Logging
|
8
|
+
|
7
9
|
def self.load
|
8
|
-
if
|
10
|
+
if R10K::Features.available?(:pe_license)
|
11
|
+
logger.debug2 "pe_license feature is available, loading PE license key"
|
9
12
|
begin
|
10
13
|
return PELicense.load_license_key
|
11
14
|
rescue PELicense::InvalidLicenseError => e
|
12
15
|
raise R10K::Error.wrap(e, "Invalid PE license detected: #{e.message}")
|
13
16
|
end
|
17
|
+
else
|
18
|
+
logger.debug2 "pe_license feature is not available, PE only Puppet modules will not be downloadable."
|
19
|
+
nil
|
14
20
|
end
|
15
|
-
|
16
|
-
nil
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
data/lib/r10k/version.rb
CHANGED
@@ -31,4 +31,11 @@ Could not install package
|
|
31
31
|
|
32
32
|
class ModuleReleaseNotFound < PuppetForge::Error
|
33
33
|
end
|
34
|
+
|
35
|
+
class ModuleReleaseForbidden < PuppetForge::Error
|
36
|
+
def self.from_response(response)
|
37
|
+
body = JSON.parse(response[:body])
|
38
|
+
new(body["message"])
|
39
|
+
end
|
40
|
+
end
|
34
41
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'shared/puppet_forge/v3'
|
2
2
|
require 'shared/puppet_forge/connection'
|
3
3
|
require 'shared/puppet_forge/error'
|
4
|
+
require 'json'
|
4
5
|
|
5
6
|
module PuppetForge
|
6
7
|
module V3
|
@@ -46,6 +47,12 @@ module PuppetForge
|
|
46
47
|
path.open('wb') { |fh| fh.write(resp.body) }
|
47
48
|
rescue Faraday::ResourceNotFound => e
|
48
49
|
raise PuppetForge::ModuleReleaseNotFound, "The module release #{slug} does not exist on #{conn.url_prefix}.", e.backtrace
|
50
|
+
rescue Faraday::ClientError => e
|
51
|
+
if e.response[:status] == 403
|
52
|
+
raise PuppetForge::ModuleReleaseForbidden.from_response(e.response)
|
53
|
+
else
|
54
|
+
raise e
|
55
|
+
end
|
49
56
|
end
|
50
57
|
|
51
58
|
# Verify that a downloaded module matches the checksum in the metadata for this release.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|