entitlements-gitrepo-auditor-plugin 0.2.1 → 0.3.0

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: 1a04171eaad46e4bd9f866a2df0d3ddb460df0e8fcc9adaf6724caa60669b367
4
- data.tar.gz: ff4d9404cad86943b5f4bbd7840c8e87b7420c136385ac2c40d2c47b1e5a8a7a
3
+ metadata.gz: cec2139fc013bc07143df36a94c202b19885c321a865dc04f4cc4b7fcd89ff84
4
+ data.tar.gz: 322e32c601936b2c92e5e0fd75eba4d45e47f9f6c71a288615dd9a190f7cf935
5
5
  SHA512:
6
- metadata.gz: df87659f140bcafe1b5067d28293c3e67c5dde86f8a0c9c256a4dd28746a34517f897da7892aff2fe51c7b1d08aa504783cc17483286483c75d2bd7e8caf211c
7
- data.tar.gz: 8007a2f167b3555f33e704ab4328c61f38a2abed2faca438de0f059c7e0af95f59791168bc019f3e2902c1234edc75e5b31a191e7d2abf646c073c4598fc5f6b
6
+ metadata.gz: d8c2c6cba3b20be04281e9841ecee40fe64489d1e359aa79fdadaf3fec3c5c578b11a5141696f0560a27a9891a6f24c5ac3ceda6ddc4a5ad2c95322abb43c002
7
+ data.tar.gz: 7a38198735a8e682a562ed4f711d0c9e8e8167b9b8d543930e51bafce3c0fba4ebb0286799ce28f8c5246abc2c1bf785aa3e98bbfca5344107f73c1e748f582d
@@ -26,7 +26,7 @@ module Entitlements
26
26
  @repo = Entitlements::Util::GitRepo.new(
27
27
  repo: config["repo"],
28
28
  sshkey: Base64.decode64(config["sshkey"]),
29
- logger: logger
29
+ logger:
30
30
  )
31
31
  @repo.github = config["github_override"] if config["github_override"]
32
32
  @repo.send(operation, checkout_directory)
@@ -59,10 +59,10 @@ module Entitlements
59
59
  %w[update_files delete_files].each do |m|
60
60
  send(
61
61
  m.to_sym,
62
- action_hash: action_hash,
63
- successful_actions: successful_actions,
64
- sync_changes: sync_changes,
65
- valid_changes: valid_changes
62
+ action_hash:,
63
+ successful_actions:,
64
+ sync_changes:,
65
+ valid_changes:
66
66
  )
67
67
  end
68
68
 
@@ -38,6 +38,7 @@ module Entitlements
38
38
  @repo = repo
39
39
  @sshkey = sshkey
40
40
  @github = "git@github.com:"
41
+ @tmpdir_prefix = ENV.fetch("ENTITLEMENTS_TMPDIR_PREFIX", "/data/entitlements_deploys")
41
42
  end
42
43
 
43
44
  # Run "git add" on a file.
@@ -206,7 +207,11 @@ module Entitlements
206
207
  # else custom that might be going on in the environment. Turn off prompts for the SSH key for
207
208
  # github.com being trusted or not, only use the provided key as the identity, and ignore any
208
209
  # ~/.ssh/config file the user running this might have set up.
209
- tempdir = Dir.mktmpdir
210
+
211
+ # if the @tmpdir_prefix doesn't exist, create it
212
+ FileUtils.mkdir_p(@tmpdir_prefix) unless File.directory?(@tmpdir_prefix)
213
+ tempdir = Dir.mktmpdir(nil, @tmpdir_prefix)
214
+
210
215
  File.open(File.join(tempdir, "key"), "w") { |f| f.write(sshkey) }
211
216
  File.open(File.join(tempdir, "ssh"), "w") do |f|
212
217
  f.puts "#!/bin/sh"
data/lib/version.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Entitlements
4
+ module Version
5
+ VERSION = "0.3.0"
6
+ end
7
+ end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements-gitrepo-auditor-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc. Security Ops
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: entitlements
14
+ name: contracts
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: '0.17'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: '0.17'
27
27
  - !ruby/object:Gem::Dependency
28
- name: contracts
28
+ name: entitlements
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0.17'
33
+ version: 0.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0.17'
40
+ version: 0.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -192,20 +192,20 @@ dependencies:
192
192
  - - '='
193
193
  - !ruby/object:Gem::Version
194
194
  version: 3.4.2
195
- description: ''
195
+ description: Entitlements plugin for a robust audit log
196
196
  email: opensource+entitlements-app@github.com
197
197
  executables: []
198
198
  extensions: []
199
199
  extra_rdoc_files: []
200
200
  files:
201
- - VERSION
202
201
  - lib/entitlements/auditor/gitrepo.rb
203
202
  - lib/entitlements/util/gitrepo.rb
203
+ - lib/version.rb
204
204
  homepage: https://github.com/github/entitlements-gitrepo-auditor-plugin
205
205
  licenses:
206
206
  - MIT
207
207
  metadata: {}
208
- post_install_message:
208
+ post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths:
211
211
  - lib
@@ -220,8 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubygems_version: 3.1.6
224
- signing_key:
223
+ rubygems_version: 3.3.7
224
+ signing_key:
225
225
  specification_version: 4
226
226
  summary: Entitlements GitRepo Auditor
227
227
  test_files: []
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.1