barking_iguana-compound 0.1.0 → 0.1.1

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: e3c49e4fa77451a0f78931175dfeedfa2736d3a8
4
- data.tar.gz: dc148ad917a0182a1a8e94db603a5d12f53c5a85
3
+ metadata.gz: 424d8a8ee3ddc8e5aae5daf84f27788f6f2fd77e
4
+ data.tar.gz: fb4124b4fa642abb33d64cb69532d2f991482ec6
5
5
  SHA512:
6
- metadata.gz: f4a53fe0a6346889d69ccf9fa1933c4743ae4932afbde85799237ac837be6c10bb538cb58b14d202a2a53a12b9a4b2e1c79e2dcbe0a0b380312b93badc712eb3
7
- data.tar.gz: 4890023cfae6d8c76e4fa97fa9cceb14f39930a37861b73f7a35eea57b0f96eaaf0d114a6ff684ff283b0083d9c5d11d9e572e933e8c3b12d31fd1c907c47f36
6
+ metadata.gz: 39f6d055963b1e84e99362f32c9d0093cb92cd001867e26acb33b2734b97cf7935821ae4087d70441634a62298e49a144b4f2565dfb5ac48cdeae93f9d07e567
7
+ data.tar.gz: e40b47bd3410c0b27a073fc7e42feb67e5d455b4171a28acb240fdcd5888eab8d02498282acaf4881130072a299e38b7c5501d25d637b752cd010d0e9ce76356
@@ -62,15 +62,16 @@ module BarkingIguana
62
62
 
63
63
  def clean_up
64
64
  return unless run_from
65
- wrapper_playbook.close
66
- wrapper_playbook.delete
65
+ FileUtils.remove_file wrapper_playbook, true
67
66
  end
68
67
 
68
+ # TODO: Symlink the playbook to wrapper_playbook.path
69
+ # so we can use the group_vars, host_vars, etc.
69
70
  def playbook_path
70
71
  return file unless run_from
71
- wrapper_playbook.write wrapper_playbook_content
72
- wrapper_playbook.rewind
73
- wrapper_playbook.path
72
+ tempfile = wrapper_playbook
73
+ FileUtils.symlink file, tempfile
74
+ tempfile
74
75
  end
75
76
 
76
77
  def wrapper_playbook_content
@@ -78,7 +79,15 @@ module BarkingIguana
78
79
  end
79
80
 
80
81
  def wrapper_playbook
81
- @wrapper_playbook ||= Tempfile.new(['wrapper-playbook-', '.yml'], run_from)
82
+ @wrapper_playbook ||= begin
83
+ name = [
84
+ 'playbook',
85
+ Process.pid,
86
+ Time.now.to_i,
87
+ rand(9_999_999_999).to_s.rjust(10, '0')
88
+ ].join('-') + '.yml'
89
+ File.expand_path(name, run_from)
90
+ end
82
91
  end
83
92
 
84
93
  def command
@@ -1,5 +1,5 @@
1
1
  module BarkingIguana
2
2
  module Compound
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barking_iguana-compound
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig R Webster
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2016-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler