config_curator 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -0
- data/lib/config_curator/collection.rb +3 -3
- data/lib/config_curator/units/component.rb +2 -2
- data/lib/config_curator/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2511894af0fcc9e59c648a7621496f663853dded
|
4
|
+
data.tar.gz: b119e02051dc69e31be6c8b6b2d31a3e5c64aaa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f26f480a7fb7a41eac2d84482ed5d1cc8551db0808fcb52f0b0f4c6121fc9fe2ed7abe2628a4df454dd0ff2621bf16c2d9047cb44df2f3ea2ff666f921dc9167
|
7
|
+
data.tar.gz: 7ee456743ea8d74726b8311896ee375c5392e6ccdb5570bf963f31414693f871b8bab6f5ca1d10a439d0735b7cb5a5a40898de4513e792c05cec646e81f0f899
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -101,6 +101,12 @@ defaults:
|
|
101
101
|
# Only install this unit if packages are present.
|
102
102
|
# Empty array will not check for any packages.
|
103
103
|
packages: []
|
104
|
+
|
105
|
+
# Default backend to use for filesystem operations.
|
106
|
+
# Only affects components.
|
107
|
+
# Choices: :stdlib or :rsync.
|
108
|
+
# Empty will autoselect rsync if available and fallback to stdlib otherwise.
|
109
|
+
backend:
|
104
110
|
```
|
105
111
|
|
106
112
|
#### Units
|
@@ -16,7 +16,7 @@ module ConfigCurator
|
|
16
16
|
# such as {Unit#source} and {Unit#destination}.
|
17
17
|
UNIT_ATTRIBUTES = {
|
18
18
|
unit: %i(hosts packages),
|
19
|
-
component: %i(hosts packages fmode dmode owner group),
|
19
|
+
component: %i(hosts packages fmode dmode owner group backend),
|
20
20
|
config_file: %i(hosts packages fmode owner group),
|
21
21
|
symlink: %i(hosts packages)
|
22
22
|
}
|
@@ -139,7 +139,7 @@ module ConfigCurator
|
|
139
139
|
def install_unit(unit, type, quiet = false)
|
140
140
|
success = unit.install
|
141
141
|
logger.info do
|
142
|
-
"Installed #{type_name(type)}: #{unit.source}
|
142
|
+
"Installed #{type_name(type)}: #{unit.source} => #{unit.destination_path}"
|
143
143
|
end unless quiet || !success
|
144
144
|
return true
|
145
145
|
|
@@ -157,7 +157,7 @@ module ConfigCurator
|
|
157
157
|
unit.install?
|
158
158
|
logger.info do
|
159
159
|
"Testing install for #{type_name(type)}:" \
|
160
|
-
" #{unit.source}
|
160
|
+
" #{unit.source} => #{unit.destination_path}"
|
161
161
|
end unless quiet
|
162
162
|
return true
|
163
163
|
|
@@ -6,7 +6,7 @@ module ConfigCurator
|
|
6
6
|
# The contents of the {#destination_path} is
|
7
7
|
# completely replaced by the contents of the {#source_path}.
|
8
8
|
class Component < Unit
|
9
|
-
attr_accessor :fmode, :dmode, :owner, :group
|
9
|
+
attr_accessor :fmode, :dmode, :owner, :group, :backend
|
10
10
|
|
11
11
|
# (see Unit#uninstall)
|
12
12
|
def uninstall(*args)
|
@@ -47,7 +47,7 @@ module ConfigCurator
|
|
47
47
|
# Any files in the install directory not in the source directory are removed.
|
48
48
|
# Use rsync if available.
|
49
49
|
def install_component
|
50
|
-
if command?
|
50
|
+
if (backend != :stdlib && command?('rsync')) || backend == :rsync
|
51
51
|
FileUtils.mkdir_p destination_path
|
52
52
|
cmd = [command?('rsync'), '-rtc', '--del', '--links', "#{source_path}/", destination_path]
|
53
53
|
logger.debug { "Running command: #{cmd.join ' '}" }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_curator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Boyd Sosenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
324
|
version: '0'
|
325
325
|
requirements: []
|
326
326
|
rubyforge_project:
|
327
|
-
rubygems_version: 2.4.5
|
327
|
+
rubygems_version: 2.4.5.1
|
328
328
|
signing_key:
|
329
329
|
specification_version: 4
|
330
330
|
summary: Simple and intelligent configuration file management.
|