chake 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -0
- data/README.md +1 -0
- data/lib/chake.rb +3 -2
- data/lib/chake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78f1d74c44ff294ee60fae46ba8f2d18313c2929
|
4
|
+
data.tar.gz: d8a5234e8b727e73c2f3cfd5355632b7c0cf7870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd234acbd72d10f1dc7f6032e7e717388f5f7e4b721c35a9d3ab6a51bf7490bbe2f9d594310065d69111fc81208b0b4ceee9996ac06dc33880f89cc1a21ff25
|
7
|
+
data.tar.gz: f1dae77c74450e4e63e93a0585819e4e0004b357b6633d2cb48028873b9beeba62abbffc0b66be3b2bf6f265c57541b12e8cbcab019faa9e23ecb38a4ed698b5
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -189,6 +189,7 @@ vice-versa.
|
|
189
189
|
|--------|-------|-------------|
|
190
190
|
| `$CHAKE_SSH_CONFIG` | local SSH configuration file | `.ssh_config` |
|
191
191
|
| `$CHAKE_RSYNC_OPTIONS` | extra options to pass to `rsync`. Useful to e.g. exclude large files from being upload to each server | _none_ |
|
192
|
+
| `$CHAKE_NODES` | File containing the list of servers to be managed | _nodes.yaml` |
|
192
193
|
|
193
194
|
## Contributing
|
194
195
|
|
data/lib/chake.rb
CHANGED
@@ -8,11 +8,10 @@ require 'readline'
|
|
8
8
|
require 'chake/version'
|
9
9
|
require 'chake/node'
|
10
10
|
|
11
|
-
nodes_file = ENV['
|
11
|
+
nodes_file = ENV['CHAKE_NODES'] || 'nodes.yaml'
|
12
12
|
node_data = File.exists?(nodes_file) && YAML.load_file(nodes_file) || {}
|
13
13
|
$nodes = node_data.map { |node,data| Chake::Node.new(node, data) }.reject(&:skip?).uniq(&:hostname)
|
14
14
|
$chake_tmpdir = 'tmp/chake'
|
15
|
-
FileUtils.mkdir_p($chake_tmpdir)
|
16
15
|
|
17
16
|
desc "Initializes current directory with sample structure"
|
18
17
|
task :init do
|
@@ -91,6 +90,7 @@ def if_files_changed(node, group_name, files)
|
|
91
90
|
if !File.exists?(hash_file) || File.read(hash_file) != hash
|
92
91
|
yield
|
93
92
|
end
|
93
|
+
FileUtils.mkdir_p(File.dirname(hash_file))
|
94
94
|
File.open(hash_file, 'w') do |f|
|
95
95
|
f.write(hash)
|
96
96
|
end
|
@@ -142,6 +142,7 @@ $nodes.each do |node|
|
|
142
142
|
node.run_as_root(target)
|
143
143
|
|
144
144
|
# overwrite config with current contents
|
145
|
+
mkdir_p File.dirname(config)
|
145
146
|
write_json_file(config, node.data)
|
146
147
|
end
|
147
148
|
|
data/lib/chake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Terceiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|