onceover 3.0.5 → 3.0.6
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 +4 -4
- data/controlrepo.gemspec +2 -2
- data/lib/onceover/testconfig.rb +30 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcd6ae85ed397165b0be23b34790c9f8b52a3f68
|
4
|
+
data.tar.gz: a23571dcacd9dd5b7bc703f7c46e045431cf29fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16b79ab89c3eedf30ecc2ae67b3ce115c4a3f91ffc03f83da0a91482ac9668fe46717569b2ed54b5fcf3582d0f401e27322691c1f796868882db83bb9d65b877
|
7
|
+
data.tar.gz: b00f9e885a561659c18545fdda62d6956944c9cc88a1d0df751059e4658833901b95900d1691394a24c3df3e16af4cdbf2765a9bf5be096cc88e9c7864cc66c7
|
data/controlrepo.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "onceover"
|
6
|
-
s.version = "3.0.
|
6
|
+
s.version = "3.0.6"
|
7
7
|
s.authors = ["Dylan Ratcliffe"]
|
8
8
|
s.email = ["dylan.ratcliffe@puppet.com"]
|
9
9
|
s.homepage = "https://github.com/dylanratcliffe/onceover"
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_runtime_dependency 'rspec', '>= 3.0.0'
|
27
27
|
s.add_runtime_dependency 'bundler'
|
28
28
|
s.add_runtime_dependency 'r10k', '>=2.1.0'
|
29
|
-
s.add_runtime_dependency 'puppet'
|
29
|
+
s.add_runtime_dependency 'puppet', '>=3.4.0'
|
30
30
|
s.add_runtime_dependency 'git'
|
31
31
|
s.add_runtime_dependency 'cri', '>= 2.6'
|
32
32
|
s.add_runtime_dependency 'colored', '~> 1.2'
|
data/lib/onceover/testconfig.rb
CHANGED
@@ -135,10 +135,39 @@ class Onceover
|
|
135
135
|
# We need to do the copy to a tempdir then move the tempdir to the
|
136
136
|
# destination, just in case we get a recursive copy
|
137
137
|
# TODO: Improve this to save I/O
|
138
|
+
|
139
|
+
# We might need to exclude some files
|
140
|
+
#
|
141
|
+
# if we are using bundler to install gems below the controlrepo
|
142
|
+
# we don't wan two copies so exclude those
|
143
|
+
#
|
144
|
+
# If there are more situations like this we can add them to this array as
|
145
|
+
# full paths
|
146
|
+
excluded_files = []
|
147
|
+
if ENV['GEM_HOME']
|
148
|
+
logger.debug "Excluding #{ENV['GEM_HOME']} from controlrepo copy"
|
149
|
+
excluded_files << Dir.glob("#{ENV['GEM_HOME']}/**/*")
|
150
|
+
excluded_files.flatten!
|
151
|
+
end
|
152
|
+
|
153
|
+
# Exclude the files we need to
|
154
|
+
controlrepo_files = Dir.glob("#{repo.root}/**/*")
|
155
|
+
files_to_copy = (controlrepo_files - excluded_files).delete_if { |path| Pathname(path).directory? }
|
156
|
+
folders_to_copy = (controlrepo_files - excluded_files).keep_if { |path| Pathname(path).directory? }
|
157
|
+
|
138
158
|
logger.debug "Creating temp dir as a staging directory for copying the controlrepo to #{repo.tempdir}"
|
139
159
|
temp_controlrepo = Dir.mktmpdir('controlrepo')
|
140
|
-
|
160
|
+
|
161
|
+
logger.debug "Creating directories under #{temp_controlrepo}"
|
162
|
+
FileUtils.mkdir_p(folders_to_copy.map { |folder| "#{temp_controlrepo}/#{(Pathname(folder).relative_path_from(Pathname(repo.root))).to_s}"})
|
163
|
+
|
164
|
+
logger.debug "Copying files to #{temp_controlrepo}"
|
165
|
+
files_to_copy.each do |file|
|
166
|
+
FileUtils.cp(file,"#{temp_controlrepo}/#{(Pathname(file).relative_path_from(Pathname(repo.root))).to_s}")
|
167
|
+
end
|
141
168
|
FileUtils.mkdir_p("#{repo.tempdir}/#{repo.environmentpath}/production")
|
169
|
+
|
170
|
+
logger.debug "Copying #{temp_controlrepo} to #{repo.tempdir}/#{repo.environmentpath}/production"
|
142
171
|
FileUtils.cp_r(Dir["#{temp_controlrepo}/*"], "#{repo.tempdir}/#{repo.environmentpath}/production")
|
143
172
|
FileUtils.rm_rf(temp_controlrepo)
|
144
173
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onceover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 3.4.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 3.4.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: git
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|