vagrant-pe_build 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +9 -0
- data/README.markdown +2 -0
- data/lib/pe_build/archive.rb +1 -1
- data/lib/pe_build/cap/detect_installer/posix.rb +1 -1
- data/lib/pe_build/cap/detect_installer/windows.rb +1 -1
- data/lib/pe_build/config/global.rb +6 -5
- data/lib/pe_build/config/pe_bootstrap.rb +0 -5
- data/lib/pe_build/release/instance.rb +2 -2
- data/lib/pe_build/transfer.rb +1 -1
- data/lib/pe_build/version.rb +1 -1
- data/spec/unit/util/config_spec.rb +44 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed761a6748d23da37d5d7d4b4553ea593cc42ce7
|
4
|
+
data.tar.gz: a2cf2b6f6c026deb984bb63cffa7c9c846be57c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 778c5360d02d13b047c51d4e6d30baee9227c28c9ca3fab1fbf86d6644c790ee3f929d939b833f2bf80ce010bf8b2f999b273713716d2c71d9238ad7c949acce
|
7
|
+
data.tar.gz: 0e7cafc6a00894024bc6601b6a9df11ecfaee0ef4a065cb2e60a48a915accfbe2e1ae17ec7c85eb1b2b519d4103df5cf2cfce42a5cb013279cb3a572279b3596
|
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -20,6 +20,8 @@ optional and can be overridden in a VM's individual provisioner config.
|
|
20
20
|
|
21
21
|
* `config.pe_build.version`
|
22
22
|
* Description: The version of Puppet Enterprise to install.
|
23
|
+
* `config.pe_build.version_file`
|
24
|
+
* Description: The path to a file relative to `download_root`. The contents of this file will be read and used to set `version` --- overriding any value that may already be set.
|
23
25
|
* `config.pe_build.suffix` - Suffix of the Puppet Enterprise installer to use.
|
24
26
|
* Description: The distribution specifix suffix of the Puppet Enterprise
|
25
27
|
installer to use.
|
data/lib/pe_build/archive.rb
CHANGED
@@ -49,7 +49,7 @@ module PEBuild
|
|
49
49
|
@logger = Log4r::Logger.new('vagrant::pe_build::archive')
|
50
50
|
end
|
51
51
|
|
52
|
-
# @param
|
52
|
+
# @param str [String] A string representation of the download source URI
|
53
53
|
def fetch(str)
|
54
54
|
return if self.exist?
|
55
55
|
|
@@ -14,20 +14,20 @@ class PEBuild::Config::Global < Vagrant.plugin('2', :config)
|
|
14
14
|
# @!attribute version
|
15
15
|
# @return [String] The version of PE to install. Must conform to
|
16
16
|
# `x.y.x[-optional-arbitrary-stuff]`. Used to determine the name of the
|
17
|
-
# PE installer archive if
|
17
|
+
# PE installer archive if `filename` is unset.
|
18
18
|
# @since 0.1.0
|
19
19
|
attr_accessor :version
|
20
20
|
|
21
21
|
# @!attribute version_file
|
22
|
-
# @return [String] The path to a file relative to
|
23
|
-
# contents of this file will be read and used to specify
|
22
|
+
# @return [String] The path to a file relative to `download_root`. The
|
23
|
+
# contents of this file will be read and used to specify `version`.
|
24
24
|
# @since 0.9.0
|
25
25
|
attr_accessor :version_file
|
26
26
|
|
27
27
|
# @!attribute series
|
28
28
|
# @return [String] The release series of PE. Completely optional and
|
29
29
|
# currently has no effect other than being an interpolation token
|
30
|
-
# available for use in
|
30
|
+
# available for use in `download_root`.
|
31
31
|
#
|
32
32
|
# @since 0.9.0
|
33
33
|
attr_accessor :series
|
@@ -92,7 +92,8 @@ class PEBuild::Config::Global < Vagrant.plugin('2', :config)
|
|
92
92
|
if !(@version.match PE_VERSION_REGEX)
|
93
93
|
errors << errmsg
|
94
94
|
end
|
95
|
-
|
95
|
+
# Allow the version to be either unset or nil. Anything else is an error.
|
96
|
+
elsif ![nil, UNSET_VALUE].include? @version
|
96
97
|
errors << errmsg
|
97
98
|
end
|
98
99
|
end
|
@@ -67,11 +67,6 @@ class PEBuild::Config::PEBootstrap < PEBuild::Config::Global
|
|
67
67
|
# global configuration; it's assumed that the late configuration merging in
|
68
68
|
# the provisioner will handle that.
|
69
69
|
def finalize!
|
70
|
-
|
71
|
-
# NOTE: The version default is copied from Config::Global. Can't call
|
72
|
-
# `super` here as it does weird things to `download_root`.
|
73
|
-
set_default :@version, nil
|
74
|
-
|
75
70
|
set_default :@role, :agent
|
76
71
|
set_default :@verbose, true
|
77
72
|
set_default :@master, 'master'
|
@@ -17,7 +17,7 @@ class PEBuild::Release::Instance
|
|
17
17
|
# Determine if Puppet Enterprise supports the specific release
|
18
18
|
#
|
19
19
|
# @param distro [String] The distribution to check
|
20
|
-
# @param
|
20
|
+
# @param dist_release [String] The version release to check
|
21
21
|
#
|
22
22
|
# @return [true, false]
|
23
23
|
def supports?(distro, dist_release)
|
@@ -41,7 +41,7 @@ class PEBuild::Release::Instance
|
|
41
41
|
# Define a distribution release as supported.
|
42
42
|
#
|
43
43
|
# @param distro [String] The distribution to add
|
44
|
-
# @param
|
44
|
+
# @param dist_release [String] The version release to add
|
45
45
|
#
|
46
46
|
# @return [void]
|
47
47
|
def add_release(distro, dist_release)
|
data/lib/pe_build/transfer.rb
CHANGED
@@ -32,7 +32,7 @@ module PEBuild
|
|
32
32
|
# Return the contents of a local or remote file.
|
33
33
|
#
|
34
34
|
# @param src [URI] The URI of the source file.
|
35
|
-
# @
|
35
|
+
# @raise [UnhandledURIScheme] If the URI uses an unsupported scheme.
|
36
36
|
# @return [String] The contents of the source file.
|
37
37
|
#
|
38
38
|
# @since 0.9.0
|
data/lib/pe_build/version.rb
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'pe_build/config'
|
4
|
+
require 'pe_build/util/config'
|
5
|
+
|
6
|
+
|
7
|
+
describe PEBuild::Util::Config do
|
8
|
+
let(:global) { PEBuild::Config::Global.new }
|
9
|
+
let(:local) { PEBuild::Config::PEBootstrap.new }
|
10
|
+
|
11
|
+
before(:each) do
|
12
|
+
global.finalize!
|
13
|
+
local.finalize!
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'when merging global and local configs' do
|
17
|
+
|
18
|
+
describe 'merged version' do
|
19
|
+
it 'is inherited from global if local is unset' do
|
20
|
+
global.version = '3.0.0'
|
21
|
+
|
22
|
+
result = subject.local_merge(local, global)
|
23
|
+
|
24
|
+
expect(result.version).to eq('3.0.0')
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'is equal to local if set' do
|
28
|
+
global.version = '3.0.0'
|
29
|
+
local.version = '2.7.0'
|
30
|
+
|
31
|
+
result = subject.local_merge(local, global)
|
32
|
+
|
33
|
+
expect(result.version).to eq('2.7.0')
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'is nil if neither global nor local is set' do
|
37
|
+
result = subject.local_merge(local, global)
|
38
|
+
|
39
|
+
expect(result.version).to be_nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-pe_build
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: progressbar
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- spec/unit/config/global_spec.rb
|
151
151
|
- spec/unit/config/pe_bootstrap_spec.rb
|
152
152
|
- spec/unit/provisioner/pe_bootstrap_spec.rb
|
153
|
+
- spec/unit/util/config_spec.rb
|
153
154
|
- tasks/acceptance.rake
|
154
155
|
- tasks/spec.rake
|
155
156
|
- templates/answers/agent-1.x.txt.erb
|