Skip to content

Commit

Permalink
Merge pull request #296 from bmjen/fix-windows
Browse files Browse the repository at this point in the history
Fixes windows
  • Loading branch information
hunner committed Apr 17, 2015
2 parents e2b189e + 6cfa62b commit 583c528
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ fixtures:
ref: '4.5.1'
'file_concat':
repo: 'git://github.com/electrical/puppet-lib-file_concat.git'
branch: '1.0.0'
ref: '1.0.1'
symlinks:
'concat': '#{source_dir}'
2 changes: 1 addition & 1 deletion manifests/fragment.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
fail("Can't use 'source' and 'content' at the same time")
}

$safe_target_name = regsubst($target, '[/:\n\s]', '_', 'GM')
$safe_target_name = regsubst($target, '[/:\n\s\\]', '_', 'GM')

file_fragment { $name:
tag => $safe_target_name,
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
warning('The $force parameter to concat is deprecated and has no effect.')
}

$safe_name = regsubst($name, '[/:\n\s]', '_', 'G')
$safe_name = regsubst($name, '[/:\n\s\\]', '_', 'G')
$default_warn_message = "# This file is managed by Puppet. DO NOT EDIT.\n"

case $warn {
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@
],
"dependencies": [
{"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"},
{"name":"electrical/file_concat","version_requirement":">= 1.0.0"}
{"name":"electrical/file_concat","version_requirement":">= 1.0.1"}
]
}
6 changes: 3 additions & 3 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
path => ['/opt/csw/bin/','/usr/bin/']
}
exec{'download-file_concat':
command => "wget -P /root/ https://forgeapi.puppetlabs.com/v3/files/electrical-file_concat-1.0.0.tar.gz --no-check-certificate",
command => "wget -P /root/ https://forgeapi.puppetlabs.com/v3/files/electrical-file_concat-1.0.1.tar.gz --no-check-certificate",
path => ['/opt/csw/bin/','/usr/bin/']
}
EOS
apply_manifest_on(host, get_deps)
# have to use force otherwise it checks ssl cert even though it is a local file
on host, puppet('module install /root/puppetlabs-stdlib-4.5.1.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
on host, puppet('module install /root/electrical-file_concat-1.0.0.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
on host, puppet('module install /root/electrical-file_concat-1.0.1.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
elsif host['platform'] =~ /windows/i
on host, shell('curl -k -o c:/puppetlabs-stdlib-4.5.1.tar.gz https://forgeapi.puppetlabs.com/v3/files/puppetlabs-stdlib-4.5.1.tar.gz')
on host, puppet('module install c:/puppetlabs-stdlib-4.5.1.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
on host, shell('curl -k -o c:/electrical-file_concat-1.0.0.tar.gz https://forgeapi.puppetlabs.com/v3/files/electrical-file_concat-1.0.0.tar.gz')
on host, shell('curl -k -o c:/electrical-file_concat-1.0.1.tar.gz https://forgeapi.puppetlabs.com/v3/files/electrical-file_concat-1.0.1.tar.gz')
on host, puppet('module install c:/electrical-file_concat-1.0.0.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
else
on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
Expand Down

0 comments on commit 583c528

Please sign in to comment.