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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c20059b32c6b5f59ff0cace33fa2e3cec8c925676e0a7efbd280a03cca620cd5
4
- data.tar.gz: e32abb023fc9b2ed03d36df9fa6f3b80024b866cda2e32cb2956ff10fed6d564
3
+ metadata.gz: '074859dfdddfa3ad275cce11978fa65d40b6f52b2fe9a8df8881f553b94fd470'
4
+ data.tar.gz: a2d710bd98c76460502e6c1ce0c3b0c8af062bd82c7778695c35ee1c2dec7e94
5
5
  SHA512:
6
- metadata.gz: 3ee25e6fd5bb25c08da05c3165b8eb7462e9804406b010d8d8ffe0944c271254338e6ec6c148c95326fd6fd623f865da3853787ee5fafe1f4c8eb1bc5d82ac7f
7
- data.tar.gz: 5cd3f1a6b97c309b6b6253458b85c32953d3141e7ac279274cd2a96a149728bcd7f324f4572a2cbb0cd8c4e536d5afc0aa49e2106e19815c312986ed2598d7a4
6
+ metadata.gz: de3fdb597649ec0e5035f2acb49074b6d896d75042f026ee4481c248d486a5250af299a3f3706eb592977394b4ae778b1547282aee28ce7666dd60969051bd54
7
+ data.tar.gz: 03012e31d93410c37e2d5fe74ac9dd1ae5a531c9c0bfea45c266fe0ab0809154025fa000a40b6c0376ac478919a9b2d8a471adbc9e5790a8954e9a6b49c2ddd8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_git_crypt (0.1.0.pre.21)
4
+ rake_git_crypt (0.1.0.pre.22)
5
5
  colored2 (~> 3.1)
6
6
  rake_factory (= 0.32.0.pre.2)
7
7
  ruby_git_crypt (= 0.1.0.pre.2)
@@ -11,12 +11,25 @@ module RakeGitCrypt
11
11
  !task_by_name(task, name).nil?
12
12
  end
13
13
 
14
- def invoke_task_with_name(task, name, args)
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,
@@ -99,7 +99,7 @@ module RakeGitCrypt
99
99
  def maybe_commit(task, args)
100
100
  return unless commit_task_name
101
101
 
102
- invoke_task_with_name(
102
+ invoke_and_reenable_task_with_name(
103
103
  task, commit_task_name,
104
104
  [commit_message(task), *args]
105
105
  )
@@ -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
- add_user_task.invoke(detail, *args)
135
- add_user_task.reenable
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
- invoke_task_with_name(
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
- invoke_task_with_name(task, init_task_name, args)
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
- invoke_task_with_name(task, add_users_task_name, args)
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
- invoke_task_with_name(
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
- invoke_task_with_name(task, uninstall_task_name, args)
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
- invoke_task_with_name(task, install_task_name, args)
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
- invoke_task_with_name(task, lock_task_name, args)
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
- invoke_task_with_name(task, delete_secrets_task_name, args)
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
- invoke_task_with_name(
51
+ invoke_and_reenable_task_with_name(
52
52
  task, commit_task_name,
53
53
  [commit_message(task), *args]
54
54
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RakeGitCrypt
4
- VERSION = '0.1.0.pre.21'
4
+ VERSION = '0.1.0.pre.22'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_git_crypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.21
4
+ version: 0.1.0.pre.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers