chake 0.90.1 → 0.90.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/ChangeLog.md +8 -0
- data/Rakefile +5 -7
- data/chake.gemspec +1 -0
- data/lib/chake/config.rb +1 -1
- data/lib/chake/config_manager/chef.rb +1 -1
- data/lib/chake/connection/ssh.rb +3 -3
- data/lib/chake/connection.rb +2 -1
- data/lib/chake/version.rb +1 -1
- data/lib/chake.rb +5 -8
- data/man/Rakefile +3 -3
- data/spec/integration_tests_spec.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c094249a63d6302e4b53969fcb103595aca7da88a1a1c3c6355d0facc9a55061
|
4
|
+
data.tar.gz: 8ebdd02f879e7f5dfdf083e985a81745e62df3102c5c3c972c89a96e2058873c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19730aecf31f2f6f2d2564d247e17f7e26cce70673a37430793628e31a20a038e1f1f25bf9a290c5540798143390ae8100a8dcb186eac1355aef02f460735b82
|
7
|
+
data.tar.gz: f595aa58c562160b6944927f9c2ede9a58ee32a9cedcd436895140fe011316d2bcb7755d2449b0a49f78eff2ce4e9f3a0752b6611b9cacd0ffe760fdc4e58c77
|
data/.rubocop.yml
CHANGED
data/ChangeLog.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 0.90.2
|
2
|
+
|
3
|
+
- upload: make sure to reupload on config manager changes
|
4
|
+
- Apply suggestions by rubocop 1.39.0
|
5
|
+
- Chake::Connection: avoid setting constant inside of block
|
6
|
+
- rubocop: keep assignment to `test_files` in the gemspec
|
7
|
+
- gemspec: set `spec.metadata['rubygems_mfa_required']`
|
8
|
+
|
1
9
|
# 0.90.1
|
2
10
|
|
3
11
|
* Fix loading node data under ruby < 3.1
|
data/Rakefile
CHANGED
@@ -74,12 +74,10 @@ end
|
|
74
74
|
|
75
75
|
desc 'checks if the latest release is properly documented in ChangeLog.md'
|
76
76
|
task :check_changelog do
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
raise
|
82
|
-
end
|
77
|
+
sh 'grep', "^#\\s*#{pkg.version}", 'ChangeLog.md'
|
78
|
+
rescue StandardError
|
79
|
+
puts "Version #{pkg.version} not documented in ChangeLog.md!"
|
80
|
+
raise
|
83
81
|
end
|
84
82
|
|
85
83
|
desc 'Updates manifest file'
|
@@ -87,7 +85,7 @@ task :manifest do
|
|
87
85
|
manifest = File.read('.manifest')
|
88
86
|
git = `git ls-files`
|
89
87
|
if manifest != git
|
90
|
-
File.
|
88
|
+
File.write('.manifest', git)
|
91
89
|
sh 'git commit .manifest -m "Update manifest"'
|
92
90
|
end
|
93
91
|
end
|
data/chake.gemspec
CHANGED
data/lib/chake/config.rb
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
|
10
10
|
nodes_file = ENV['CHAKE_NODES'] || 'nodes.yaml'
|
11
11
|
nodes_directory = ENV['CHAKE_NODES_D'] || 'nodes.d'
|
12
|
-
nodes = File.exist?(nodes_file) && Chake::YAML.load_file(nodes_file) || {}
|
12
|
+
nodes = (File.exist?(nodes_file) && Chake::YAML.load_file(nodes_file)) || {}
|
13
13
|
nodes.values.each do |node|
|
14
14
|
node['chake_metadata'] = { 'definition_file' => nodes_file }
|
15
15
|
end
|
data/lib/chake/connection/ssh.rb
CHANGED
@@ -44,7 +44,7 @@ module Chake
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def ssh_config
|
47
|
-
File.exist?(ssh_config_file) && ['-F', ssh_config_file] || []
|
47
|
+
(File.exist?(ssh_config_file) && ['-F', ssh_config_file]) || []
|
48
48
|
end
|
49
49
|
|
50
50
|
def ssh_config_file
|
@@ -60,11 +60,11 @@ module Chake
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def ssh_options
|
63
|
-
node.port && ['-p', node.port.to_s] || []
|
63
|
+
(node.port && ['-p', node.port.to_s]) || []
|
64
64
|
end
|
65
65
|
|
66
66
|
def scp_options
|
67
|
-
node.port && ['-P', node.port.to_s] || []
|
67
|
+
(node.port && ['-P', node.port.to_s]) || []
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
data/lib/chake/connection.rb
CHANGED
data/lib/chake/version.rb
CHANGED
data/lib/chake.rb
CHANGED
@@ -59,6 +59,7 @@ def if_files_changed(node, group_name, files)
|
|
59
59
|
return if files.empty?
|
60
60
|
|
61
61
|
hash_io = IO.popen(%w[xargs sha1sum], 'w+')
|
62
|
+
hash_io.puts(File.join(Chake.tmpdir, "#{node}.bootstrap"))
|
62
63
|
files.sort.each { |f| hash_io.puts(f) }
|
63
64
|
hash_io.close_write
|
64
65
|
current_hash = hash_io.read
|
@@ -69,9 +70,7 @@ def if_files_changed(node, group_name, files)
|
|
69
70
|
|
70
71
|
yield if current_hash != hash_on_disk
|
71
72
|
FileUtils.mkdir_p(File.dirname(hash_file))
|
72
|
-
File.
|
73
|
-
f.write(current_hash)
|
74
|
-
end
|
73
|
+
File.write(hash_file, current_hash)
|
75
74
|
end
|
76
75
|
|
77
76
|
def write_json_file(file, data)
|
@@ -111,9 +110,7 @@ Chake.nodes.each do |node|
|
|
111
110
|
if !File.exist?(bootstrap_script) || File.read(bootstrap_script) != bootstrap_code
|
112
111
|
|
113
112
|
# create bootstrap script
|
114
|
-
File.
|
115
|
-
f.write(bootstrap_code)
|
116
|
-
end
|
113
|
+
File.write(bootstrap_script, bootstrap_code)
|
117
114
|
chmod 0o755, bootstrap_script
|
118
115
|
|
119
116
|
# copy bootstrap script over
|
@@ -131,7 +128,7 @@ Chake.nodes.each do |node|
|
|
131
128
|
end
|
132
129
|
|
133
130
|
desc "upload data to #{hostname}"
|
134
|
-
task "upload:#{hostname}" => :upload_common do
|
131
|
+
task "upload:#{hostname}" => ["bootstrap:#{hostname}", :upload_common] do
|
135
132
|
next unless node.needs_upload?
|
136
133
|
|
137
134
|
encrypted = encrypted_for(hostname)
|
@@ -142,7 +139,7 @@ Chake.nodes.each do |node|
|
|
142
139
|
rsync_excludes << '--exclude' << 'local-mode-cache/'
|
143
140
|
|
144
141
|
rsync = node.rsync + ['-avp'] + ENV.fetch('CHAKE_RSYNC_OPTIONS', '').split
|
145
|
-
rsync_logging = Rake.application.options.silent && '--quiet' || '--verbose'
|
142
|
+
rsync_logging = (Rake.application.options.silent && '--quiet') || '--verbose'
|
146
143
|
|
147
144
|
hash_files = Dir.glob(File.join(Chake.tmpdir, '*.sha1sum'))
|
148
145
|
files = Dir.glob('**/*').reject { |f| File.directory?(f) } - encrypted.keys - encrypted.values - hash_files
|
data/man/Rakefile
CHANGED
@@ -21,9 +21,9 @@ MANPAGES.each do |man|
|
|
21
21
|
end
|
22
22
|
|
23
23
|
task install: MANPAGES do
|
24
|
-
prefix = ENV['PREFIX'] || File.exist?('debian/rules') && '/usr' || '/usr/local'
|
25
|
-
man1 = File.join(*[ENV
|
26
|
-
man7 = File.join(*[ENV
|
24
|
+
prefix = ENV['PREFIX'] || (File.exist?('debian/rules') && '/usr') || '/usr/local'
|
25
|
+
man1 = File.join(*[ENV.fetch('DESTDIR', nil), prefix, 'share/man/man1'].compact)
|
26
|
+
man7 = File.join(*[ENV.fetch('DESTDIR', nil), prefix, 'share/man/man7'].compact)
|
27
27
|
target = { '.1' => man1, '.7' => man7 }
|
28
28
|
sh 'install', '-d', '-m', '0755', man1
|
29
29
|
sh 'install', '-d', '-m', '0755', man7
|
@@ -7,8 +7,8 @@ describe 'Chake' do
|
|
7
7
|
|
8
8
|
def sh(*args)
|
9
9
|
cmd = Shellwords.join(args)
|
10
|
-
lib = [Pathname.new(__FILE__).parent.parent / 'lib', ENV
|
11
|
-
path = [Pathname.new(__FILE__).parent.parent / 'bin', ENV
|
10
|
+
lib = [Pathname.new(__FILE__).parent.parent / 'lib', ENV.fetch('RUBYLIB', nil)].compact.join(':')
|
11
|
+
path = [Pathname.new(__FILE__).parent.parent / 'bin', ENV.fetch('PATH', nil)].join(':')
|
12
12
|
env = {
|
13
13
|
'RUBYLIB' => lib,
|
14
14
|
'PATH' => path
|
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.90.
|
4
|
+
version: 0.90.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:
|
11
|
+
date: 2023-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -182,7 +182,8 @@ files:
|
|
182
182
|
homepage: https://gitlab.com/terceiro/chake
|
183
183
|
licenses:
|
184
184
|
- MIT
|
185
|
-
metadata:
|
185
|
+
metadata:
|
186
|
+
rubygems_mfa_required: 'true'
|
186
187
|
post_install_message:
|
187
188
|
rdoc_options: []
|
188
189
|
require_paths:
|