itamae 1.3.0 → 1.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/itamae/resource/directory.rb +8 -0
- data/lib/itamae/version.txt +1 -1
- data/spec/integration/default_spec.rb +4 -0
- data/spec/integration/recipes/default.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78b2ddcd33e7a561766eee7a9eca3402bea98134
|
|
4
|
+
data.tar.gz: 798f438bb9737dc2ca19406127a458de7f720cd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af22254be79638d88283d7cc0e4d65ad959bd075ef1b515bf70bf1fffb664daa9285a7cc375de7bc89296699ab9d5a1bbb1f62dc49ff15715b9c73be250efef2
|
|
7
|
+
data.tar.gz: d9c99923c430edc17c7186f4130f0132879c005c45bdfa642ec571e2060fcb6ce2fcc23b0951afe3acc2a466a03d3567a425a1cf96e950a8162250ec00d66508
|
data/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,8 @@ module Itamae
|
|
|
13
13
|
case @current_action
|
|
14
14
|
when :create
|
|
15
15
|
attributes.exist = true
|
|
16
|
+
when :delete
|
|
17
|
+
attributes.exist = false
|
|
16
18
|
end
|
|
17
19
|
end
|
|
18
20
|
|
|
@@ -49,6 +51,12 @@ module Itamae
|
|
|
49
51
|
run_specinfra(:change_file_owner, attributes.path, attributes.owner, attributes.group)
|
|
50
52
|
end
|
|
51
53
|
end
|
|
54
|
+
|
|
55
|
+
def action_delete(options)
|
|
56
|
+
if run_specinfra(:check_file_is_directory, attributes.path)
|
|
57
|
+
run_specinfra(:remove_file, attributes.path)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
52
60
|
end
|
|
53
61
|
end
|
|
54
62
|
end
|
data/lib/itamae/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.3.
|
|
1
|
+
1.3.1
|
|
@@ -37,6 +37,10 @@ describe file('/tmp/directory') do
|
|
|
37
37
|
it { should be_grouped_into "itamae" }
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
describe file('/tmp/directory_never_exist1') do
|
|
41
|
+
it { should_not be_directory }
|
|
42
|
+
end
|
|
43
|
+
|
|
40
44
|
%w!/tmp/template /tmp/template_auto!.each do |f|
|
|
41
45
|
describe file(f) do
|
|
42
46
|
it { should be_file }
|
|
@@ -115,6 +115,14 @@ directory "/tmp/directory" do
|
|
|
115
115
|
group "itamae"
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
directory "/tmp/directory_never_exist1" do
|
|
119
|
+
action :create
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
directory "/tmp/directory_never_exist1" do
|
|
123
|
+
action :delete
|
|
124
|
+
end
|
|
125
|
+
|
|
118
126
|
template "/tmp/template" do
|
|
119
127
|
source "hello.erb"
|
|
120
128
|
variables goodbye: "Good bye"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: itamae
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryota Arai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
277
277
|
version: '0'
|
|
278
278
|
requirements: []
|
|
279
279
|
rubyforge_project:
|
|
280
|
-
rubygems_version: 2.
|
|
280
|
+
rubygems_version: 2.2.2
|
|
281
281
|
signing_key:
|
|
282
282
|
specification_version: 4
|
|
283
283
|
summary: Simple Configuration Management Tool
|