chake 0.1.0 → 0.1.1

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.
@@ -1,6 +1,13 @@
1
1
  file '/tmp/chake.test' do
2
- content "It works!\n"
2
+ content "It works on #{node[:fqdn]}!\n"
3
3
  mode '0644'
4
4
  owner 'root'
5
5
  group 'root'
6
6
  end
7
+
8
+ cookbook_file '/tmp/chake.test.unencrypted' do
9
+ source 'test'
10
+ mode '0600'
11
+ owner 'root'
12
+ group 'root'
13
+ end
data/lib/chake.rb CHANGED
@@ -53,7 +53,7 @@ task :nodes do
53
53
  end
54
54
 
55
55
  def encrypted_for(node)
56
- Dir.glob("**/files/{default,#{node}}/*.{asc,gpg}").inject({}) do |hash, key|
56
+ Dir.glob("**/files/{default,host-#{node}}/*.{asc,gpg}").inject({}) do |hash, key|
57
57
  hash[key] = key.sub(/\.(asc|gpg)$/, '')
58
58
  hash
59
59
  end
@@ -93,7 +93,7 @@ $nodes.each do |node|
93
93
 
94
94
  unless seen_before
95
95
  begin
96
- node.run_as_root('apt-get -q -y install rsync chef')
96
+ node.run_as_root('apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -q -y install rsync chef')
97
97
  rescue
98
98
  rm_f config
99
99
  raise
data/lib/chake/backend.rb CHANGED
@@ -7,6 +7,7 @@ module Chake
7
7
  end
8
8
 
9
9
  def run(cmd)
10
+ puts "#{node.hostname}: $ #{cmd}"
10
11
  IO.popen(command_runner + [cmd]).lines.each do |line|
11
12
  puts [node.hostname, line.strip].join(': ')
12
13
  end
data/lib/chake/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Chake
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,7 @@ shared_examples "Chake::Backend" do |backend_class|
9
9
  it('runs commands') do
10
10
  io = StringIO.new("line 1\nline 2\n")
11
11
  IO.should_receive(:popen).with(backend.command_runner + ['something']).and_return(io)
12
+ backend.should_receive(:puts).with("myhost: $ something")
12
13
  backend.should_receive(:puts).with("myhost: line 1")
13
14
  backend.should_receive(:puts).with("myhost: line 2")
14
15
  backend.run('something')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -92,7 +92,7 @@ files:
92
92
  - chake.gemspec
93
93
  - examples/test/Rakefile
94
94
  - examples/test/config.rb
95
- - examples/test/cookbooks/example/files/default/test.asc
95
+ - examples/test/cookbooks/example/files/host-homer/test.asc
96
96
  - examples/test/cookbooks/example/recipes/default.rb
97
97
  - lib/chake.rb
98
98
  - lib/chake/backend.rb