use_packs 0.0.13 → 0.0.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb4b5cfe33a3c5881971d27c78fefe591378e9728baf6513beffc14058ef23d6
|
4
|
+
data.tar.gz: 15144da46c38e628af6bfc3c5243d8d0c42a46b2fa739b66339fb120e31c6d36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce3dbd0c9c3b103887e0ff3e84421396cc3e711b4cac3626e34e622d403ab806eb63ec50e3bb4daf64b647d7f991d940e5973e60cd28e1a8b1a4880635be2525
|
7
|
+
data.tar.gz: 9f38e2e00c87dc857a279a726bd7539d5344a0a51dbd5acfeac4153194dcaef5bcab1e577c9a11417963602f652d7559e33a9dba5a77f6372bec066e8ac058c2
|
data/README.md
CHANGED
@@ -50,16 +50,16 @@ Releases happen automatically through github actions once a version update is co
|
|
50
50
|
To keep things organized, here are some recommended homes:
|
51
51
|
|
52
52
|
### Issues:
|
53
|
-
https://github.com/
|
53
|
+
https://github.com/rubyatscale/use_packs/issues
|
54
54
|
|
55
55
|
### Questions:
|
56
|
-
https://github.com/
|
56
|
+
https://github.com/rubyatscale/use_packs/discussions/categories/q-a
|
57
57
|
|
58
58
|
### General discussions:
|
59
|
-
https://github.com/
|
59
|
+
https://github.com/rubyatscale/use_packs/discussions/categories/general
|
60
60
|
|
61
61
|
### Ideas, new features, requests for change:
|
62
|
-
https://github.com/
|
62
|
+
https://github.com/rubyatscale/use_packs/discussions/categories/ideas
|
63
63
|
|
64
64
|
### Showcasing your work:
|
65
|
-
https://github.com/
|
65
|
+
https://github.com/rubyatscale/use_packs/discussions/categories/show-and-tell
|
@@ -17,14 +17,13 @@ module UsePacks
|
|
17
17
|
relative_path_to_destination = file_move_operation.destination_pathname
|
18
18
|
|
19
19
|
code_owners_allow_list_file = Pathname.new('config/code_ownership.yml')
|
20
|
+
return if !code_owners_allow_list_file.exist?
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
)
|
27
|
-
end
|
22
|
+
UsePacks.replace_in_file(
|
23
|
+
file: code_owners_allow_list_file.to_s,
|
24
|
+
find: relative_path_to_origin,
|
25
|
+
replace_with: relative_path_to_destination
|
26
|
+
)
|
28
27
|
|
29
28
|
team = CodeOwnership.for_file(relative_path_to_origin.to_s)
|
30
29
|
|
@@ -6,9 +6,10 @@ module UsePacks
|
|
6
6
|
class TeamSelector
|
7
7
|
extend T::Sig
|
8
8
|
|
9
|
-
sig { params(prompt: TTY::Prompt, question_text: String).returns(CodeTeams::Team) }
|
9
|
+
sig { params(prompt: TTY::Prompt, question_text: String).returns(T.nilable(CodeTeams::Team)) }
|
10
10
|
def self.single_select(prompt, question_text: 'Please use space to select a team owner')
|
11
11
|
teams = CodeTeams.all.sort_by(&:name).to_h { |t| [t.name, t] }
|
12
|
+
return nil if teams.count == 0
|
12
13
|
|
13
14
|
team_selection = T.let(prompt.select(
|
14
15
|
question_text,
|
data/lib/use_packs/private.rb
CHANGED
@@ -366,13 +366,21 @@ module UsePacks
|
|
366
366
|
if existing_package.nil?
|
367
367
|
should_enforce_dependenceies = enforce_dependencies.nil? ? UsePacks.config.enforce_dependencies : enforce_dependencies
|
368
368
|
|
369
|
+
# TODO: This should probably be `if defined?(CodeOwnership) && CodeOwnership.configured?`
|
370
|
+
# but we'll need to add an API to CodeOwnership to do this
|
371
|
+
if Pathname.new('config/code_ownership.yml').exist?
|
372
|
+
metadata = {
|
373
|
+
'owner' => team.nil? ? 'MyTeam' : team.name
|
374
|
+
}
|
375
|
+
else
|
376
|
+
metadata = {}
|
377
|
+
end
|
378
|
+
|
369
379
|
package = ParsePackwerk::Package.new(
|
370
380
|
enforce_dependencies: should_enforce_dependenceies,
|
371
381
|
enforce_privacy: enforce_privacy,
|
372
382
|
dependencies: [],
|
373
|
-
metadata:
|
374
|
-
'owner' => team.nil? ? 'MyTeam' : team.name
|
375
|
-
},
|
383
|
+
metadata: metadata,
|
376
384
|
name: pack_name,
|
377
385
|
config: {}
|
378
386
|
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: use_packs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code_ownership
|