rake_git_crypt 0.1.0.pre.21 → 0.1.0.pre.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rake_git_crypt/mixins/support.rb +14 -1
- data/lib/rake_git_crypt/tasks/add_user.rb +1 -1
- data/lib/rake_git_crypt/tasks/add_users.rb +4 -4
- data/lib/rake_git_crypt/tasks/install.rb +3 -3
- data/lib/rake_git_crypt/tasks/reinstall.rb +2 -2
- data/lib/rake_git_crypt/tasks/uninstall.rb +3 -3
- data/lib/rake_git_crypt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '074859dfdddfa3ad275cce11978fa65d40b6f52b2fe9a8df8881f553b94fd470'
|
4
|
+
data.tar.gz: a2d710bd98c76460502e6c1ce0c3b0c8af062bd82c7778695c35ee1c2dec7e94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3fdb597649ec0e5035f2acb49074b6d896d75042f026ee4481c248d486a5250af299a3f3706eb592977394b4ae778b1547282aee28ce7666dd60969051bd54
|
7
|
+
data.tar.gz: 03012e31d93410c37e2d5fe74ac9dd1ae5a531c9c0bfea45c266fe0ab0809154025fa000a40b6c0376ac478919a9b2d8a471adbc9e5790a8954e9a6b49c2ddd8
|
data/Gemfile.lock
CHANGED
@@ -11,12 +11,25 @@ module RakeGitCrypt
|
|
11
11
|
!task_by_name(task, name).nil?
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
14
|
+
def ensure_task_with_name_available(task, name)
|
15
15
|
raise_task_undefined(name) unless task_defined?(task, name)
|
16
|
+
end
|
16
17
|
|
18
|
+
def invoke_task_with_name(task, name, args)
|
19
|
+
ensure_task_with_name_available(task, name)
|
17
20
|
task_by_name(task, name).invoke(*args)
|
18
21
|
end
|
19
22
|
|
23
|
+
def reenable_task_with_name(task, name)
|
24
|
+
ensure_task_with_name_available(task, name)
|
25
|
+
task_by_name(task, name).reenable
|
26
|
+
end
|
27
|
+
|
28
|
+
def invoke_and_reenable_task_with_name(task, name, args)
|
29
|
+
invoke_task_with_name(task, name, args)
|
30
|
+
reenable_task_with_name(task, name)
|
31
|
+
end
|
32
|
+
|
20
33
|
def raise_task_undefined(name)
|
21
34
|
raise(
|
22
35
|
RakeFactory::DependencyTaskMissing,
|
@@ -129,10 +129,10 @@ module RakeGitCrypt
|
|
129
129
|
|
130
130
|
puts "Adding git-crypt users by type #{user_type}..."
|
131
131
|
add_user_task_name = task.send(:"add_user_by_#{user_type}_task_name")
|
132
|
-
add_user_task = task.application[add_user_task_name, task.scope]
|
133
132
|
send(:"gpg_user_#{user_type}s").each do |detail|
|
134
|
-
|
135
|
-
|
133
|
+
invoke_and_reenable_task_with_name(
|
134
|
+
task, add_user_task_name, [detail, *args]
|
135
|
+
)
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
@@ -164,7 +164,7 @@ module RakeGitCrypt
|
|
164
164
|
def maybe_commit(task, args)
|
165
165
|
return unless commit_task_name
|
166
166
|
|
167
|
-
|
167
|
+
invoke_and_reenable_task_with_name(
|
168
168
|
task, commit_task_name,
|
169
169
|
[commit_message(task), *args]
|
170
170
|
)
|
@@ -30,17 +30,17 @@ module RakeGitCrypt
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def init_git_crypt(task, args)
|
33
|
-
|
33
|
+
invoke_and_reenable_task_with_name(task, init_task_name, args)
|
34
34
|
end
|
35
35
|
|
36
36
|
def add_users_to_git_crypt(task, args)
|
37
|
-
|
37
|
+
invoke_and_reenable_task_with_name(task, add_users_task_name, args)
|
38
38
|
end
|
39
39
|
|
40
40
|
def maybe_commit(task, args)
|
41
41
|
return unless commit_task_name
|
42
42
|
|
43
|
-
|
43
|
+
invoke_and_reenable_task_with_name(
|
44
44
|
task, commit_task_name,
|
45
45
|
[commit_message(task), *args]
|
46
46
|
)
|
@@ -31,12 +31,12 @@ module RakeGitCrypt
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def uninstall_git_crypt(task, args)
|
34
|
-
|
34
|
+
invoke_and_reenable_task_with_name(task, uninstall_task_name, args)
|
35
35
|
end
|
36
36
|
|
37
37
|
def install_git_crypt(task, args)
|
38
38
|
install_task_names.each do |install_task_name|
|
39
|
-
|
39
|
+
invoke_and_reenable_task_with_name(task, install_task_name, args)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -31,7 +31,7 @@ module RakeGitCrypt
|
|
31
31
|
private
|
32
32
|
|
33
33
|
def lock_git_crypt(task, args)
|
34
|
-
|
34
|
+
invoke_and_reenable_task_with_name(task, lock_task_name, args)
|
35
35
|
end
|
36
36
|
|
37
37
|
def delete_git_crypt_directories
|
@@ -42,13 +42,13 @@ module RakeGitCrypt
|
|
42
42
|
def maybe_delete_secrets(task, args)
|
43
43
|
return unless delete_secrets_task_name
|
44
44
|
|
45
|
-
|
45
|
+
invoke_and_reenable_task_with_name(task, delete_secrets_task_name, args)
|
46
46
|
end
|
47
47
|
|
48
48
|
def maybe_commit(task, args)
|
49
49
|
return unless commit_task_name
|
50
50
|
|
51
|
-
|
51
|
+
invoke_and_reenable_task_with_name(
|
52
52
|
task, commit_task_name,
|
53
53
|
[commit_message(task), *args]
|
54
54
|
)
|