vagrant-puppet-modules 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95c691b79233fe1f8344243c6046b70c96bc6886
4
- data.tar.gz: d984b14d6dd35209a3b434d131aec621dd3a8529
3
+ metadata.gz: c2a37d62581542f0b66be73e39d75cc62a64a352
4
+ data.tar.gz: a85f7f39c6f9d83be0b16b92a31eb544027eb7eb
5
5
  SHA512:
6
- metadata.gz: 50ab4a52be71af2aafe8e2cf6afa66ab08bbbcc0d912d29e51c222729f4eb41b30e9dcb8fb6ef6e9163657dbcd85fcd0e667445761bebe9bfa7108bd68bd38a2
7
- data.tar.gz: a11f2fe571c456b7f9eb51713e7d204f6157511dbac3ccddfd33a5b00947f5a659374168cd98e1829b9594dfec981c22015a207ca95cf57e43544c96df75334a
6
+ metadata.gz: c54e65d5ae2d94c748ed3a48831b02272550b39d4884efba299d9964543d9f49fc54d4d9b7b9cd08dc4140633e849ddb2cdd7a22c832b0dc3e0f653a7e42853f
7
+ data.tar.gz: c9e6685c3f569421c8d121f6b08fc6e080fd5e808bc6d08960032e271542ee702f5467369b4467cd7e5ac627ff2e2e4506aec699e23636dd75d5478cce0bd80d
@@ -17,13 +17,14 @@ module VagrantPlugins
17
17
  @machine.config.puppet_modules.validate!
18
18
 
19
19
  desired_version = @machine.config.puppet_modules.librarian_version
20
- if desired_version.nil? || installed_version == desired_version
21
- env[:ui].info "Librarian-puppet is installed or not required"
22
- return
20
+ if desired_version.nil?
21
+ env[:ui].info "Librarian-puppet is not required, skipping installation..."
22
+ elsif installed_version == desired_version
23
+ env[:ui].info "Librarian-puppet is already installed at version #{desired_version}"
24
+ else
25
+ fetch_or_create_install_script(env)
26
+ install(desired_version, env)
23
27
  end
24
-
25
- fetch_or_create_install_script(env)
26
- install(desired_version, env)
27
28
  end
28
29
 
29
30
  @app.call(env)
@@ -46,12 +47,12 @@ module VagrantPlugins
46
47
  if windows_guest?
47
48
  # todo
48
49
  else
49
- command = 'echo $(librarian-puppet --version)'
50
+ command = 'echo $(librarian-puppet version)'
50
51
  end
51
52
 
52
53
  @machine.communicate.sudo(command, opts) do |type, data|
53
54
  if [:stderr, :stdout].include?(type)
54
- version_match = data.match(/^(.+)/)
55
+ version_match = data.match(/v(.+)$/)
55
56
  version = version_match.captures[0].strip if version_match
56
57
  end
57
58
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module PuppetModules
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -16,6 +16,7 @@ InstallLibrarianPuppet () {
16
16
  echo 'Attempting to install librarian-puppet'
17
17
 
18
18
  gem install librarian-puppet --version "$version"
19
+ gem uninstall librarian-puppet -v ">$version" --force
19
20
 
20
21
  if [ "$?" -ne '0' ]; then
21
22
  echo 'Failed to install librarian-puppet'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-puppet-modules
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anis Safine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-21 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler