itamae-mitsurin 0.45 → 0.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itamae-mitsurin/mitsurin/itamae_task.rb +3 -3
- data/lib/itamae-mitsurin/mitsurin/itamae_with_git_task.rb +3 -3
- data/lib/itamae-mitsurin/mitsurin/itamae_with_target_task.rb +3 -3
- data/lib/itamae-mitsurin/resource/file.rb +12 -13
- data/lib/itamae-mitsurin/version.txt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d1f6d29ae9b227945bb222e0eb972c819039c5b
|
4
|
+
data.tar.gz: 9acdc555933504a72946673268da92c337ee7647
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 618c953d6cac86794aa74fcc8637e48b9a079848a44fba14dfa17f644fedac7ed78e576637b0aa3995d6e4cf55f654547fe1ea47be0bea2c69e435b690b32581
|
7
|
+
data.tar.gz: f20681d4563b280058249ae489677edaf94534fd587bd85d50f424ff719d6cb43eeb6da342d7a625bf36d1b760fac044a7524625c8c96dd406238edbda02dc39
|
@@ -111,9 +111,9 @@ module ItamaeMitsurin
|
|
111
111
|
command_recipe = []
|
112
112
|
recipes.each do |recipe_h|
|
113
113
|
target_recipe = "site-cookbooks/**/#{recipe_h.keys.join}/recipes/#{recipe_h[recipe_h.keys.join]}.rb"
|
114
|
-
|
115
|
-
|
116
|
-
|
114
|
+
if Dir.glob(target_recipe).empty?
|
115
|
+
raise "Recipe load error, nodefile: #{node_file}, reason: Does not exist " +
|
116
|
+
recipe_h.keys.join + '::' +recipe_h.values.join
|
117
117
|
end
|
118
118
|
Dir.glob(target_recipe).join("\s").split.each do |target|
|
119
119
|
unless File.exists?(target)
|
@@ -120,9 +120,9 @@ module ItamaeMitsurin
|
|
120
120
|
command_recipe = []
|
121
121
|
recipes.each do |recipe_h|
|
122
122
|
target_recipe = "site-cookbooks/**/#{recipe_h.keys.join}/recipes/#{recipe_h[recipe_h.keys.join]}.rb"
|
123
|
-
|
124
|
-
|
125
|
-
|
123
|
+
if Dir.glob(target_recipe).empty?
|
124
|
+
raise "Recipe load error, nodefile: #{node_file}, reason: Does not exist " +
|
125
|
+
recipe_h.keys.join + '::' +recipe_h.values.join
|
126
126
|
end
|
127
127
|
Dir.glob(target_recipe).join("\s").split.each do |target|
|
128
128
|
unless File.exists?(target)
|
@@ -138,9 +138,9 @@ module ItamaeMitsurin
|
|
138
138
|
command_recipe = []
|
139
139
|
recipes.each do |recipe_h|
|
140
140
|
target_recipe = "site-cookbooks/**/#{recipe_h.keys.join}/recipes/#{recipe_h[recipe_h.keys.join]}.rb"
|
141
|
-
|
142
|
-
|
143
|
-
|
141
|
+
if Dir.glob(target_recipe).empty?
|
142
|
+
raise "Recipe load error, nodefile: #{node_file}, reason: Does not exist " +
|
143
|
+
recipe_h.keys.join + '::' +recipe_h.values.join
|
144
144
|
end
|
145
145
|
Dir.glob(target_recipe).join("\s").split.each do |target|
|
146
146
|
unless File.exists?(target)
|
@@ -84,23 +84,22 @@ module ItamaeMitsurin
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def action_edit(options)
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
mode = run_specinfra(:get_file_mode, attributes.path).stdout.chomp
|
91
|
-
run_specinfra(:change_file_mode,
|
87
|
+
change_target = attributes.modified ? @temppath : attributes.path
|
88
|
+
|
89
|
+
if attributes.mode || attributes.modified
|
90
|
+
mode = attributes.mode || run_specinfra(:get_file_mode, attributes.path).stdout.chomp
|
91
|
+
run_specinfra(:change_file_mode, change_target, mode)
|
92
92
|
end
|
93
93
|
|
94
|
-
if attributes.owner || attributes.group
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
group = run_specinfra(:get_file_owner_group, attributes.path).stdout.chomp
|
99
|
-
run_specinfra(:change_file_owner, @temppath, owner)
|
100
|
-
run_specinfra(:change_file_group, @temppath, group)
|
94
|
+
if attributes.owner || attributes.group || attributes.modified
|
95
|
+
owner = attributes.owner || run_specinfra(:get_file_owner_user, attributes.path).stdout.chomp
|
96
|
+
group = attributes.group || run_specinfra(:get_file_owner_group, attributes.path).stdout.chomp
|
97
|
+
run_specinfra(:change_file_owner, change_target, owner, group)
|
101
98
|
end
|
102
99
|
|
103
|
-
|
100
|
+
if attributes.modified
|
101
|
+
run_specinfra(:move_file, @temppath, attributes.path)
|
102
|
+
end
|
104
103
|
end
|
105
104
|
|
106
105
|
private
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.46
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-mitsurin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.46'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akihiro Kamiyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|