itamae 1.3.0 → 1.3.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: c397241971b3e1b540afb880beea976590b695d2
4
- data.tar.gz: d6eaaf608b351425fdf569327457963001acb960
3
+ metadata.gz: 78b2ddcd33e7a561766eee7a9eca3402bea98134
4
+ data.tar.gz: 798f438bb9737dc2ca19406127a458de7f720cd2
5
5
  SHA512:
6
- metadata.gz: b00b8116c33f76d55dbe822200e18f15fe820727d96053e2c93805c0f9bc9b3f16a5e0ecc5624f187788f26a39a3b19c8da771f4f1ed19988eaa266e242e2242
7
- data.tar.gz: 88dad5ca366a3ce5c20735abb82db8e416d29af713c32bd0f346d4f27224564df802e4286732f894568b078cd9521c961740a08586c93b64f353421166232cbd
6
+ metadata.gz: af22254be79638d88283d7cc0e4d65ad959bd075ef1b515bf70bf1fffb664daa9285a7cc375de7bc89296699ab9d5a1bbb1f62dc49ff15715b9c73be250efef2
7
+ data.tar.gz: d9c99923c430edc17c7186f4130f0132879c005c45bdfa642ec571e2060fcb6ce2fcc23b0951afe3acc2a466a03d3567a425a1cf96e950a8162250ec00d66508
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v1.3.1
2
+
3
+ Features
4
+
5
+ - [Add `delete` action to `directory` resource (by @rrreeeyyy)](https://github.com/itamae-kitchen/itamae/pull/139)
6
+
1
7
  ## v1.3.0
2
8
 
3
9
  Improvements
@@ -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
@@ -1 +1 @@
1
- 1.3.0
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.0
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-15 00:00:00.000000000 Z
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.4.5
280
+ rubygems_version: 2.2.2
281
281
  signing_key:
282
282
  specification_version: 4
283
283
  summary: Simple Configuration Management Tool