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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 269bf2fbb29c95381a0977397d40d4035c4a51e0
4
- data.tar.gz: e50cff262ba84a0782fe50dedf575a3afc783574
3
+ metadata.gz: ed761a6748d23da37d5d7d4b4553ea593cc42ce7
4
+ data.tar.gz: a2cf2b6f6c026deb984bb63cffa7c9c846be57c8
5
5
  SHA512:
6
- metadata.gz: b25346e8a16ddd1005c5e6bcec8e86a585b255227fff9b5266a732013d9d7dddee4a9c229867010af66fb7b1868b53bbea2236eab4522e5b8a814b5d23ed0809
7
- data.tar.gz: 8064eaebceb1ec8e12d11bf9c9d4ad5e22e0cc1b3b4db9524f2d390e9953abf5013791042e440c104940e05c1e5629d1ea5b5f6c2aca0f3f90d15509ddfbe867
6
+ metadata.gz: 778c5360d02d13b047c51d4e6d30baee9227c28c9ca3fab1fbf86d6644c790ee3f929d939b833f2bf80ce010bf8b2f999b273713716d2c71d9238ad7c949acce
7
+ data.tar.gz: 0e7cafc6a00894024bc6601b6a9df11ecfaee0ef4a065cb2e60a48a915accfbe2e1ae17ec7c85eb1b2b519d4103df5cf2cfce42a5cb013279cb3a572279b3596
data/CHANGELOG CHANGED
@@ -1,6 +1,15 @@
1
1
  vagrant-pe_build
2
2
  ================
3
3
 
4
+ 0.9.1
5
+ -----
6
+
7
+ 2014-07-13
8
+
9
+ This is a backwards compatible bugfix release.
10
+
11
+ * (GH-68) Fix a regression in merging version numbers set in global config.
12
+
4
13
  0.9.0
5
14
  -----
6
15
 
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.
@@ -49,7 +49,7 @@ module PEBuild
49
49
  @logger = Log4r::Logger.new('vagrant::pe_build::archive')
50
50
  end
51
51
 
52
- # @param base_uri [String] A string representation of the download source URI
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
 
@@ -2,7 +2,7 @@
2
2
  # POSIX systems.
3
3
  #
4
4
  # @abstract
5
- # @protected
5
+ # @api protected
6
6
  class PEBuild::Cap::DetectInstaller::POSIX < PEBuild::Cap::DetectInstaller::Base
7
7
 
8
8
  # @!method name
@@ -2,7 +2,7 @@
2
2
  # POSIX systems.
3
3
  #
4
4
  # @abstract
5
- # @protected
5
+ # @api protected
6
6
  class PEBuild::Cap::DetectInstaller::Windows < PEBuild::Cap::DetectInstaller::Base
7
7
 
8
8
  def detect
@@ -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 {#filename} is unset.
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 {#download_root}. The
23
- # contents of this file will be read and used to specify {#version}.
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 {#download_root}.
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
- elsif @version != nil
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 dist_version [String] The version release to check
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 dist_version [String] The version release to add
44
+ # @param dist_release [String] The version release to add
45
45
  #
46
46
  # @return [void]
47
47
  def add_release(distro, dist_release)
@@ -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
- # @raises [UnhandledURIScheme] If the URI uses an unsupported scheme.
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
@@ -1,3 +1,3 @@
1
1
  module PEBuild
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
@@ -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.0
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-09 00:00:00.000000000 Z
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