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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1df478d2c90d2ca124065d8f29ea659cceb973f7
4
- data.tar.gz: c0c875fe667e97d240b448a17f0cd1df3ee36580
3
+ metadata.gz: 78f1d74c44ff294ee60fae46ba8f2d18313c2929
4
+ data.tar.gz: d8a5234e8b727e73c2f3cfd5355632b7c0cf7870
5
5
  SHA512:
6
- metadata.gz: e374e3b0989135b0ad8f07d0efdae889d3e44e5013dc6427823cda3fc9c5eb9bdbef6fa85b2ef8b8a1e6aa853eee73bd09ee61f699ef6bdcb3e2887f087d8723
7
- data.tar.gz: 98ca09e11b1fc6b4376f6497e49c2acdffc63a0bf6f68d23732518aacd35cd39c2b3e3dd60486d833ef28a7585635c55095b6a1dcb37c99aba4b3d3922b9d0f8
6
+ metadata.gz: 3cd234acbd72d10f1dc7f6032e7e717388f5f7e4b721c35a9d3ab6a51bf7490bbe2f9d594310065d69111fc81208b0b4ceee9996ac06dc33880f89cc1a21ff25
7
+ data.tar.gz: f1dae77c74450e4e63e93a0585819e4e0004b357b6633d2cb48028873b9beeba62abbffc0b66be3b2bf6f265c57541b12e8cbcab019faa9e23ecb38a4ed698b5
@@ -1,3 +1,8 @@
1
+ # 0.4.2
2
+
3
+ * tmp/chake: create only when actually needed
4
+ * Control nodes files with `$CHAKE_NODES`
5
+
1
6
  # 0.4.1
2
7
 
3
8
  * Don't always assume the local username as the remote username for SSH
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
 
@@ -8,11 +8,10 @@ require 'readline'
8
8
  require 'chake/version'
9
9
  require 'chake/node'
10
10
 
11
- nodes_file = ENV['NODES'] || 'nodes.yaml'
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
 
@@ -1,3 +1,3 @@
1
1
  module Chake
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.1
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-12 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler