vagrant-puppet-install 4.0.1 → 4.1.0

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: 1714c4fa2a0a40e41eecb530b086576bd7008080
4
- data.tar.gz: d0aa33d7b496d32b93eb354707818e72e95a5e24
3
+ metadata.gz: d1874b00e959ee871af563b0a45f504405e224be
4
+ data.tar.gz: 94d2181462355d6299a3f9cfb00d2865dfad1c4b
5
5
  SHA512:
6
- metadata.gz: f992ae7dc9facca472110f059f81fc836c8d2eb934ff78de283ed93a7ecf13408d11d5c28c81425aca8f69421cb3a2258164848f4084d9d004c4b32834fc2283
7
- data.tar.gz: 736a0b20eda0e016f0678359b9740f6a5aaedc9aa54882359a9811e441aa7caa82f0d32496563046c800746038e289ac990324e564eb9b455421cd23ca5a1150
6
+ metadata.gz: dedbb24b6f68eb721390f3beaf3eaae96f02c1c0b813c5e8f7b321b1606fc73ab26de960bbf0d94a100ec0e94b966e77f1030b477bde0d3aa7ef07522ddce7e6
7
+ data.tar.gz: a7af7b576100abc6c951f87cce33c1e7900ecc6ffea51ad5bfee03d35b917164eca454896005f042aef7fd5bf4ce2d1ae244cc56a1c93ff4807b61f0cbbfca6e
@@ -1,5 +1,25 @@
1
1
  # Change Log
2
2
 
3
+ ## [v4.0.1](https://github.com/petems/vagrant-puppet-install/tree/v4.0.1) (2016-04-04)
4
+
5
+ [Full Changelog](https://github.com/petems/vagrant-puppet-install/compare/v4.0.0...v4.0.1)
6
+
7
+ **Closed issues:**
8
+
9
+ - Machine is force to shutdown and destroyed after puppet is installed [\#42](https://github.com/petems/vagrant-puppet-install/issues/42)
10
+
11
+ - How to install the latest available version of puppet? [\#41](https://github.com/petems/vagrant-puppet-install/issues/41)
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Adds acceptance test for Fedora 23 [\#47](https://github.com/petems/vagrant-puppet-install/pull/47) ([petems](https://github.com/petems))
16
+
17
+ - Fixes Vagrant on Puppet \> 4 for acceptance [\#45](https://github.com/petems/vagrant-puppet-install/pull/45) ([petems](https://github.com/petems))
18
+
19
+ - Rubocop fixes [\#44](https://github.com/petems/vagrant-puppet-install/pull/44) ([petems](https://github.com/petems))
20
+
21
+ - Fixes unlink code to work on Windows machines [\#43](https://github.com/petems/vagrant-puppet-install/pull/43) ([petems](https://github.com/petems))
22
+
3
23
  ## [v4.0.0](https://github.com/petems/vagrant-puppet-install/tree/v4.0.0) (2016-01-25)
4
24
 
5
25
  [Full Changelog](https://github.com/petems/vagrant-puppet-install/compare/v3.1.0...v4.0.0)
data/README.md CHANGED
@@ -45,6 +45,20 @@ should be a valid Puppet release (ie. `2.7.11`, `3.7.4`, etc.).
45
45
 
46
46
  The Puppet version is validated against the RubyGems API. So as long as the version you give is [listed there](https://rubygems.org/gems/puppet/versions/), it will allow you to install.
47
47
 
48
+ You may wish to disable this validation. This could be useful if you've got limited bandwidth on a bad internet connection or you're on a proxy, or your specifying a version that won't match against the RubyGems API (such as a custom patched version of Puppet).
49
+
50
+ If you wish to disable this validation you can disable it like so:
51
+
52
+ ```ruby
53
+ Vagrant.configure("2") do |config|
54
+
55
+ config.puppet_install.validate_version = false
56
+
57
+ ...
58
+
59
+ end
60
+ ```
61
+
48
62
  Install the latest version of Puppet:
49
63
 
50
64
  ```ruby
@@ -5,11 +5,12 @@ require 'vagrant'
5
5
  module VagrantPlugins
6
6
  module PuppetInstall
7
7
  class Config < Vagrant.plugin('2', :config)
8
- attr_accessor :puppet_version, :install_url
8
+ attr_accessor :puppet_version, :install_url, :validate_version
9
9
 
10
10
  def initialize
11
11
  @puppet_version = UNSET_VALUE
12
12
  @install_url = UNSET_VALUE
13
+ @validate_version = UNSET_VALUE
13
14
  @logger = Log4r::Logger.new('vagrantplugins::puppet_install::config')
14
15
  end
15
16
 
@@ -20,6 +21,7 @@ module VagrantPlugins
20
21
  # resolve `latest` to a real version
21
22
  @puppet_version = retrieve_latest_puppet_version
22
23
  end
24
+ @validate_version = nil if @validate_version == UNSET_VALUE
23
25
  @install_url = nil if @install_url == UNSET_VALUE
24
26
  end
25
27
 
@@ -27,13 +29,17 @@ module VagrantPlugins
27
29
  finalize!
28
30
  errors = []
29
31
 
30
- if !puppet_version.nil? && !valid_puppet_version?(puppet_version)
31
- msg = <<-EOH
32
- '#{puppet_version}' is not a valid version of Puppet.
32
+ if falsey?(validate_version)
33
+ @logger.debug("Not validating version due to validate_version being false")
34
+ else
35
+ if !puppet_version.nil? && !valid_puppet_version?(puppet_version)
36
+ msg = <<-EOH
37
+ '#{ puppet_version }' is not a valid version of Puppet.
33
38
 
34
- A list of valid versions can be found at: http://docs.puppetlabs.com/release_notes/
35
- EOH
36
- errors << msg
39
+ A list of valid versions can be found at: http://docs.puppetlabs.com/release_notes/
40
+ EOH
41
+ errors << msg
42
+ end
37
43
  end
38
44
 
39
45
  if errors.any?
@@ -90,6 +96,10 @@ A list of valid versions can be found at: http://docs.puppetlabs.com/release_not
90
96
  def puppet_gem_dependency(version = nil)
91
97
  Gem::Dependency.new('puppet', version)
92
98
  end
99
+
100
+ def falsey?(falsey_value)
101
+ true if [false,:false,'false'].include?(falsey_value)
102
+ end
93
103
  end
94
104
  end
95
105
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module PuppetInstall
3
- VERSION = '4.0.1'.freeze
3
+ VERSION = '4.1.0'.freeze
4
4
  end
5
5
  end
@@ -8,4 +8,4 @@ en:
8
8
  interrupted: "Install.sh download was interrupted. Exiting."
9
9
  errors:
10
10
  vagrant_version: |-
11
- vagrant-omnibus plugin requires Vagrant version %{requirement}
11
+ vagrant-omnibus plugin requires Vagrant version %{requirement}
@@ -61,6 +61,33 @@ Vagrant.configure('2') do |config|
61
61
  fedora_384.vm.provision 'shell', inline: 'puppet --version'
62
62
  end
63
63
 
64
+ config.vm.define :debian_jessie_372 do |debian_jessie_372|
65
+ debian_jessie_372.vm.box = "debian/jessie64"
66
+ debian_jessie_372.puppet_install.puppet_version = '3.7.2'
67
+
68
+ debian_jessie_372.vm.provision :puppet do |puppet|
69
+ puppet.environment_path = File.expand_path('../../../support/environments', __FILE__)
70
+ puppet.environment = "vagrant"
71
+ end
72
+
73
+ debian_jessie_372.vm.provision 'shell', inline: 'puppet --version'
74
+ end
75
+
76
+ config.vm.define :validate_version_false do |validate_version_false|
77
+ validate_version_false.puppet_install.puppet_version = '9.9.9'
78
+ validate_version_false.puppet_install.validate_version = false
79
+
80
+ validate_version_false.puppet_install.install_url = File.expand_path('../../support/puppet_install_script/shell_install.sh')
81
+ validate_version_false.vm.box = "puppetlabs/centos-6.6-64-nocm"
82
+
83
+ validate_version_false.vm.provision :puppet do |puppet|
84
+ puppet.manifests_path = File.expand_path('../../../support/manifests', __FILE__)
85
+ puppet.manifest_file = "base.pp"
86
+ end
87
+
88
+ validate_version_false.vm.provision "shell", inline: "puppet --version"
89
+ end
90
+
64
91
  config.vm.define :trusty_ubuntu_box do |trusty_ubuntu_box|
65
92
  trusty_ubuntu_box.puppet_install.puppet_version = :latest
66
93
  trusty_ubuntu_box.puppet_install.install_url = 'https://gist.githubusercontent.com/petems/6723c2eedb9d32d7ad97/raw/990ff448f6430aa015e208668a3cecb3f1db0d4b/purge_old_install_new.sh'
@@ -8,6 +8,7 @@ describe VagrantPlugins::PuppetInstall::Config do
8
8
  instance.tap do |o|
9
9
  o.puppet_version = puppet_version if defined?(puppet_version)
10
10
  o.install_url = install_url if defined?(install_url)
11
+ o.validate_version = validate_version if defined?(validate_version)
11
12
  o.finalize!
12
13
  end
13
14
  end
@@ -15,6 +16,7 @@ describe VagrantPlugins::PuppetInstall::Config do
15
16
  describe 'defaults' do
16
17
  its(:puppet_version) { should be_nil }
17
18
  its(:install_url) { should be_nil }
19
+ its(:validate_version) { should be_nil}
18
20
  end
19
21
 
20
22
  describe 'resolving `:latest` to a real Puppet version' do
@@ -70,5 +72,37 @@ describe VagrantPlugins::PuppetInstall::Config do
70
72
  expect { subject.validate!(machine) }.to_not raise_error
71
73
  end
72
74
  end # describe not specified puppet_version validation
75
+
76
+ describe 'validate_version set to false should not raise error' do
77
+ {
78
+ false => {
79
+ description: 'Boolean false'
80
+ },
81
+ 'false' => {
82
+ description: 'String false'
83
+ },
84
+ :false => {
85
+ description: ':false'
86
+ },
87
+ }.each_pair do |falsey, opts|
88
+ context "#{opts[:description]}" do
89
+ let(:validate_version) { falsey }
90
+ let(:puppet_version) { '9.9.9' }
91
+
92
+ it 'passes' do
93
+ expect { subject.validate!(machine) }.to_not raise_error
94
+ end
95
+ end
96
+ end
97
+ end # describe validate_version set to false should not raise error
98
+
99
+ describe 'validate_version set to true with an invalid version should not raise error' do
100
+ let(:validate_version) { true }
101
+ let(:puppet_version) { '9.9.9' }
102
+
103
+ it 'fails' do
104
+ expect { subject.validate!(machine) }.to raise_error
105
+ end
106
+ end # validate_version set to true with an invalid version should not raise error
73
107
  end
74
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-puppet-install
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Chisamore
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-04 00:00:00.000000000 Z
13
+ date: 2016-04-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler