vagrant-pe_build 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,12 @@
1
+ vagrant-pe_build
2
+ ================
3
+
4
+ 0.2.0
5
+ -----
6
+
7
+ 2013-08-01
8
+
9
+ * #20 Default `relocate_manifests` option to false on master
10
+ * Lazy load/interpolate `filename` config value
11
+ * Safely load global_config from pe_bootstrap
12
+ * Add license to .gemspec
@@ -21,8 +21,19 @@ class Global < Vagrant.plugin('2', :config)
21
21
  # @!attribute suffix
22
22
  attr_accessor :suffix
23
23
 
24
+ # Allow our filename default to use @version and @suffix variables. This
25
+ # approach will not break the merging mechanism since the merging directly
26
+ # accesses the instance variables of the configuration objects.
27
+ def filename
28
+ if @filename == UNSET_VALUE
29
+ "puppet-enterprise-#{version}-#{suffix}.tar.gz"
30
+ else
31
+ @filename
32
+ end
33
+ end
34
+
24
35
  # @!attribute filename
25
- attr_accessor :filename
36
+ attr_writer :filename
26
37
 
27
38
  def initialize
28
39
  @download_root = UNSET_VALUE
@@ -36,7 +47,6 @@ class Global < Vagrant.plugin('2', :config)
36
47
  def finalize!
37
48
  set_default :@suffix, 'all'
38
49
  #set_default :@version, DEFAULT_PE_VERSION
39
- set_default :@filename, "puppet-enterprise-:version-#{suffix}.tar.gz"
40
50
 
41
51
  set_default :@download_root, nil
42
52
  end
@@ -65,7 +65,7 @@ class PEBootstrap < PEBuild::Config::Global
65
65
  set_default :@master, 'master'
66
66
  set_default :@answer_file, nil
67
67
 
68
- set_default :@relocate_manifests, (@role == :master)
68
+ set_default :@relocate_manifests, false
69
69
  end
70
70
 
71
71
  def add_step(name, script_path)
@@ -78,7 +78,7 @@ class PEBootstrap < PEBuild::Config::Global
78
78
  h = super
79
79
 
80
80
  errors = []
81
- if @version == UNSET_VALUE and machine.config.pe_build.version == UNSET_VALUE
81
+ if @version == UNSET_VALUE and global_config_from(machine).pe_build.version == UNSET_VALUE
82
82
  errors << "Version must be set on provisioner when unset globally"
83
83
  end
84
84
 
@@ -105,6 +105,17 @@ class PEBootstrap < PEBuild::Config::Global
105
105
  errors |= h.values.flatten
106
106
  {"PE Bootstrap" => errors}
107
107
  end
108
+
109
+ private
110
+
111
+ # Safely access the global config
112
+ #
113
+ # If we try to access the global config object directly from a validating
114
+ # machine, horrible things happen. To avoid this we access the environment's
115
+ # global config which should already be finalized.
116
+ def global_config_from(machine)
117
+ env = machine.env.config_global
118
+ end
108
119
  end
109
120
  end
110
121
  end
@@ -1,3 +1,3 @@
1
1
  module PEBuild
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -18,4 +18,6 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  gem.files = %x{git ls-files -z}.split("\0")
20
20
  gem.require_path = 'lib'
21
+
22
+ gem.license = 'Apache 2.0'
21
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-pe_build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-15 00:00:00.000000000 Z
12
+ date: 2013-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: progressbar
@@ -49,6 +49,7 @@ executables: []
49
49
  extensions: []
50
50
  extra_rdoc_files: []
51
51
  files:
52
+ - CHANGELOG
52
53
  - Gemfile
53
54
  - LICENSE
54
55
  - README.markdown
@@ -84,7 +85,8 @@ files:
84
85
  - templates/scripts/relocate_installation.sh
85
86
  - vagrant-pe_build.gemspec
86
87
  homepage: https://github.com/adrienthebo/vagrant-pe_build
87
- licenses: []
88
+ licenses:
89
+ - Apache 2.0
88
90
  post_install_message:
89
91
  rdoc_options: []
90
92
  require_paths: